diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 9c60669..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @transferwise/sp-connect diff --git a/.github/tw-rules.yaml b/.github/tw-rules.yaml deleted file mode 100644 index 295545d..0000000 --- a/.github/tw-rules.yaml +++ /dev/null @@ -1 +0,0 @@ -runChecks: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3de56df..0de2e2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: "Build and Test" +name: "Build" on: pull_request: @@ -11,29 +11,18 @@ on: jobs: build: name: "Build" - runs-on: - - ubuntu-latest - env: - GRADLE_OPTS: "-Djava.security.egd=file:/dev/./urandom -Dorg.gradle.parallel=true" - container: - image: azul/zulu-openjdk:11 + runs-on: ubuntu-latest + permissions: + contents: read steps: - - name: "Install packages" - run: apt-get update && apt-get install -y git - - name: Checkout repository - uses: actions/checkout@v4 - - name: "Validate version tag doesn't exist" - run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew validateVersion --console=plain --no-daemon - - name: "Gradle cache" - uses: actions/cache@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-java@v6 with: - path: | - ~/.gradle - key: gradle-v1-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', '**/*.gradle*') }} - - name: "Assemble jar" - run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew assemble --console=plain --no-daemon - - name: "Test if publishing works" - run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew publishToMavenLocal --console=plain --no-daemon --stacktrace - - name: "Tag release" - if: github.ref == 'refs/heads/main' - run: GRADLE_USER_HOME=$HOME/.gradle ./gradlew tagRelease --console=plain --no-daemon + distribution: zulu + java-version: 25 + - uses: bufbuild/buf-action@v1 + with: + setup_only: true + - uses: gradle/actions/setup-gradle@v6 + - name: "Build and publish locally" + run: ./gradlew build publishToMavenLocal --console=plain diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1ef72c2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,87 @@ +name: "Release" + +# Publishes every Envoy release (as labelled in the Buf registry) that has no v tag here yet. +# Does nothing until the repository variable PUBLISH is set to "true" and the Maven Central secrets exist. + +on: + schedule: + - cron: "17 6 * * *" + workflow_dispatch: + inputs: + envoy_version: + description: "Publish only this Envoy version, e.g. 1.40.0 (default: every unpublished release)" + required: false + build_number: + description: "Rebuild suffix, publishing - (only with envoy_version)" + required: false + +concurrency: release + +jobs: + release: + name: "Release" + if: vars.PUBLISH == 'true' + runs-on: ubuntu-latest + permissions: + contents: write # push release tags + env: + MIN_ENVOY_VERSION: "1.31.0" # oldest release Envoy labels in the Buf registry + MAX_RELEASES_PER_RUN: "5" # a build takes several minutes; later runs catch up on a backlog + SONATYPE_USER: ${{ secrets.SONATYPE_USER }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + OSS_SIGNING_KEY: ${{ secrets.OSS_SIGNING_KEY }} + OSS_SIGNING_PASSWORD: ${{ secrets.OSS_SIGNING_PASSWORD }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 # tags + - uses: actions/setup-java@v6 + with: + distribution: zulu + java-version: 25 + - uses: bufbuild/buf-action@v1 + with: + setup_only: true + - uses: gradle/actions/setup-gradle@v6 + - name: "Publish unpublished Envoy releases" + env: + ENVOY_VERSION: ${{ inputs.envoy_version }} + BUILD_NUMBER: ${{ inputs.build_number }} + run: | + set -euo pipefail + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + if [ -n "${ENVOY_VERSION}" ]; then + versions="${ENVOY_VERSION}" + else + versions=$(curl -sSf -X POST https://buf.build/buf.registry.module.v1.LabelService/ListLabels \ + -H 'Content-Type: application/json' \ + -d '{"pageSize":250,"resourceRef":{"name":{"owner":"envoyproxy","module":"envoy"}}}' \ + | jq -r '.labels[].name' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sed 's/^v//' | sort -V) + fi + + published=0 + for v in ${versions}; do + if [ "${published}" -ge "${MAX_RELEASES_PER_RUN}" ]; then + echo "Published ${published}; leaving the rest for the next run" + break + fi + if [ "$(printf '%s\n%s\n' "${MIN_ENVOY_VERSION}" "${v}" | sort -V | head -1)" != "${MIN_ENVOY_VERSION}" ]; then + continue + fi + release="${v}${BUILD_NUMBER:+-${BUILD_NUMBER}}" + if git rev-parse -q --verify "refs/tags/v${release}" >/dev/null; then + continue + fi + echo "::group::Envoy ${v} as ${release}" + args=(-PenvoyVersion="${v}" --console=plain) + if [ -n "${BUILD_NUMBER}" ]; then + args+=(-PbuildNumber="${BUILD_NUMBER}") + fi + ./gradlew "${args[@]}" clean publishToSonatype closeAndReleaseSonatypeStagingRepository + git tag -a "v${release}" -m "Envoy ${v}" + git push origin "v${release}" + published=$((published + 1)) + echo "::endgroup::" + done diff --git a/README.md b/README.md index ae34ad4..2308ab5 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,36 @@ # Envoy Java API -This builds a grpc library for the envoy xDS API. +Java protobuf and gRPC classes for the [Envoy](https://www.envoyproxy.io/) xDS API, published as +`net.woaf.jono.envoy:envoy-api`. ## Versioning -Major and minor version follow the envoy version against which they are built. The patch version is this library's patch version. Use the latest patch version for the envoy major.minor you run, e.g. use the latest 1.17.x for this library if you run envoy 1.17.y, regardless of what y is. -## Building +Each release is built from one Envoy release and carries its version: `1.40.0` is Envoy 1.40.0's API. A rebuild of the +same Envoy release gets a suffix, e.g. `1.40.0-1`. Use the version matching the Envoy you run, or any later one: the v3 +API only grows, and older Envoys ignore fields they don't know (see Envoy's +[API versioning policy](https://github.com/envoyproxy/envoy/blob/main/api/API_VERSIONING.md)). -The `tools` directory follows https://github.com/envoyproxy/java-control-plane/commits/main/tools as closely as possible. +The classes are generated with protoc 3.25, so they run on protobuf-java 3.25+ and 4.x. -1. Grab the Commit ID of the envoy version you are going to use and update it into the `API_SHAS` file. -2. Next see its Bazel dependencices `https://github.com/envoyproxy/envoy/blob/{GITHUB_COMMIT_ID}/api/bazel/repository_locations.bzl` -3. Update the remaining SHAs and Versions in the `API_SHAS` file. -4. This is an alternate : you can also use the run `update-sha.sh MAJOR.MINOR.PATCH`, paste the end of its output to `API_SHAS`. -5. Update the proto files using `update-api.sh`. This will remove the old `src/main/proto` and fetch a new set of protos. -6. Bump the library version according to `Versioning` above in `gradle.properties`. -7. Now it should build on CI. Can try locally using `./gradlew assemble`, but see GHA workflow for specific steps. -8. You may need to add or remove protos depending on the failures and you would want to refer to the bazel dependencies file to figure out what failed, finally udpate the scripts to have the change. +## How it's built -Note: until we catch up with Envoy head version, slight adjustments might be needed for these scripts, towards matching upstream more closely. -https://github.com/envoyproxy/envoy/blob/6fe1905459ff267a43a8a26d042ae03a8aa7bc98/api/bazel/repository_locations.bzl \ No newline at end of file +Envoy publishes every release to the [Buf registry](https://buf.build/envoyproxy/envoy) together with its third-party +proto dependencies (xds, udpa, protoc-gen-validate, googleapis, cel, OpenTelemetry, Prometheus), pinned by Envoy's +`api/buf.lock`. The build exports one release from there and compiles it: + +``` +./gradlew build -PenvoyVersion=1.40.0 +``` + +This needs the [`buf` CLI](https://buf.build/docs/cli/installation/) on your `PATH`. + +`google/api/annotations.proto`, `google/api/http.proto` and `google/rpc/status.proto` are not bundled: they come from +`com.google.api.grpc:proto-google-common-protos`, which gRPC already depends on, so the classes aren't duplicated. + +## Releasing + +`.github/workflows/release.yml` runs daily. It publishes every Envoy release from 1.31.0 on that has no `v` +tag in this repository yet, then tags it. Run it by hand to publish one version, or a rebuild with a build number. + +It does nothing until the repository variable `PUBLISH` is `true`, and needs these secrets: +`SONATYPE_USER`, `SONATYPE_PASSWORD` (a Maven Central Portal user token), `OSS_SIGNING_KEY` and `OSS_SIGNING_PASSWORD`. diff --git a/build.gradle b/build.gradle index 33859af..627cf8f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,26 +1,22 @@ -import org.eclipse.jgit.api.errors.RefAlreadyExistsException - plugins { - id 'java' - id 'com.google.protobuf' version '0.9.4' + id 'java-library' + id 'com.google.protobuf' version '0.9.5' id 'idea' - id 'org.ajoberstar.grgit' version '5.2.2' - id 'io.github.gradle-nexus.publish-plugin' version "1.3.0" + id 'io.github.gradle-nexus.publish-plugin' version "2.0.0" } -group = "com.transferwise.envoy" +group = "net.woaf.jono.envoy" -ext.projectName = "envoy-api" -ext.projectDescription = "envoy-api" -ext.projectArtifactName = "envoy-api" -ext.projectGitHubRepoName = "envoy-api-java" -ext.projectScmUrl = "https://github.com/transferwise/${projectGitHubRepoName}" -ext.projectScmConnection = "scm:git:git://github.com/transferwise/${projectGitHubRepoName}.git" +// The Envoy release to build, e.g. -PenvoyVersion=1.40.0. -PbuildNumber=1 publishes a rebuild as 1.40.0-1. +def envoyVersion = providers.gradleProperty("envoyVersion").get() +def buildNumber = providers.gradleProperty("buildNumber").getOrNull() +version = buildNumber ? "${envoyVersion}-${buildNumber}" : envoyVersion +ext.projectScmUrl = "https://github.com/JonathanO/envoy-api-java" +ext.projectScmConnection = "scm:git:git://github.com/JonathanO/envoy-api-java.git" repositories { mavenCentral() - mavenLocal() } idea.project { @@ -48,40 +44,60 @@ tasks.withType(Javadoc).configureEach { } def grpcVersion = '1.79.0' +// Generated code runs on this protobuf-java major and the next, so 3.x gencode suits both 3.x and 4.x users. def protobufVersion = '3.25.9' -def protocVersion = protobufVersion dependencies { - implementation "com.google.protobuf:protobuf-java:${protobufVersion}" - implementation "io.grpc:grpc-protobuf:${grpcVersion}" - implementation "io.grpc:grpc-stub:${grpcVersion}" + api "com.google.protobuf:protobuf-java:${protobufVersion}" + // Also provides google/api/{annotations,http}.proto and google/rpc/status.proto, which we therefore don't bundle. + api "io.grpc:grpc-protobuf:${grpcVersion}" + api "io.grpc:grpc-stub:${grpcVersion}" implementation 'javax.annotation:javax.annotation-api:1.3.2' runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}" } -protobuf { - protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" } - plugins { - grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } - } - generateProtoTasks { - all()*.plugins { grpc {} } +// Envoy pushes every release to the Buf registry, with its third-party proto dependencies pinned in api/buf.lock. +// Exporting a release label gives exactly the protos that release needs. +def exportedProtos = layout.buildDirectory.dir("envoy-protos") +def exportProtos = tasks.register("exportProtos", Exec) { + inputs.property("envoyVersion", envoyVersion) + outputs.dir(exportedProtos) + def out = exportedProtos.get().asFile + doFirst { delete out } + commandLine "buf", "export", "buf.build/envoyproxy/envoy:v${envoyVersion}", "--output", out + doLast { + delete fileTree(out) { + include "bazel/**" // Envoy's Bazel test data + include "google/api/annotations.proto", "google/api/http.proto", "google/rpc/status.proto" // from proto-google-common-protos + } } } sourceSets { main { - java { - srcDirs 'build/generated/source/proto/main/grpc' - srcDirs 'build/generated/source/proto/main/java' + proto { + srcDir exportedProtos } } } +tasks.named("extractProto") { dependsOn exportProtos } +tasks.named("processResources") { dependsOn exportProtos } + +protobuf { + protoc { artifact = "com.google.protobuf:protoc:${protobufVersion}" } + plugins { + grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } + } + generateProtoTasks { + all()*.plugins { grpc {} } + } +} + jar { manifest { attributes( - "Implementation-Title": projectName, + "Implementation-Title": "envoy-api", "Implementation-Version": archiveVersion ) } @@ -90,12 +106,12 @@ jar { apply plugin: "maven-publish" apply plugin: "signing" -ext.artifactoryUser = project.hasProperty("artifactoryUser") ? project.artifactoryUser : System.env.ARTIFACTORY_USER as String -ext.artifactoryPassword = project.hasProperty("artifactoryPassword") ? project.artifactoryPassword : System.env.ARTIFACTORY_PASSWORD as String - nexusPublishing { repositories { sonatype { + // Maven Central Portal's OSSRH-compatible staging API + nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/") + snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/") username = System.getenv("SONATYPE_USER") password = System.getenv("SONATYPE_PASSWORD") } @@ -106,13 +122,11 @@ publishing { publications { mavenJava(MavenPublication) { from components.java - afterEvaluate { - artifactId = projectArtifactName - } + artifactId = "envoy-api" pom { - name = projectName - description = projectDescription + name = "envoy-api" + description = "Java protobuf and gRPC classes for the Envoy xDS API, built from Envoy release ${envoyVersion}" url = projectScmUrl packaging = "jar" licenses { @@ -125,9 +139,7 @@ publishing { developer { id = 'JonathanO' name = 'Jonathan Oddy' - email = "jonathan.oddy@transferwise.com" - organization = "Transferwise Ltd" - organizationUrl = "https://github.com/transferwise" + email = "jonathan@woaf.net" } } scm { @@ -138,51 +150,11 @@ publishing { } } } - - if (System.getenv("OSS_SIGNING_KEY")) { - signing { - useInMemoryPgpKeys(System.getenv("OSS_SIGNING_KEY"), System.getenv("OSS_SIGNING_PASSWORD")) - sign publishing.publications.mavenJava - } - } - - repositories { - maven { - url System.getenv("MAVEN_URL") - credentials { - username = System.getenv("MAVEN_USER") - password = System.getenv("MAVEN_PASSWORD") - } - } - } } -task tagRelease { - doLast { - try { - grgit.tag.add { - name = "v$version" - message = "Release of ${version}" - } - grgit.push(refsOrSpecs: ["v$version"]) - } - catch (RefAlreadyExistsException ignored) { - logger.warn("Tag v$version already exists.") - } +if (System.getenv("OSS_SIGNING_KEY")) { + signing { + useInMemoryPgpKeys(System.getenv("OSS_SIGNING_KEY"), System.getenv("OSS_SIGNING_PASSWORD")) + sign publishing.publications.mavenJava } } - -task validateVersion { - doLast { - def tagName = "v$version" - def remoteTags = grgit.lsremote(tags: true) - - def refName = "refs/tags/${tagName}" - def remoteHasTag = remoteTags.keySet().any { ref -> ref.fullName == refName } - - if (remoteHasTag) { - throw new GradleException("Tag ${tagName} already exists. Bump the version in gradle.properties.") - } - logger.lifecycle("✓ Version ${version} is valid (tag ${tagName} does not exist yet)") - } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f9e420b..8c531f4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=1.37.5-1 +envoyVersion=1.40.0 org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b9..249e583 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e2847c8..566107b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip -networkTimeout=10000 -validateDistributionUrl=true +distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index f5feea6..a69d9cb 100755 --- a/gradlew +++ b/gradlew @@ -15,8 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# SPDX-License-Identifier: Apache-2.0 -# ############################################################################## # @@ -57,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -82,12 +80,13 @@ do esac done -# This is normally unused -# shellcheck disable=SC2034 +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s -' "$PWD" ) || exit + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -134,29 +133,22 @@ location of your Java installation." fi else JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,15 +193,11 @@ if "$cygwin" || "$msys" ; then done fi - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 9b42019..53a6b23 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,6 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem -@rem SPDX-License-Identifier: Apache-2.0 -@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -28,7 +26,6 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -45,11 +42,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. goto fail @@ -59,11 +56,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. goto fail diff --git a/renovate.json b/renovate.json index ce65a06..5db72dd 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "local>transferwise/renovate-config" + "config:recommended" ] } diff --git a/src/main/proto/cel/expr/checked.proto b/src/main/proto/cel/expr/checked.proto deleted file mode 100644 index 0105b93..0000000 --- a/src/main/proto/cel/expr/checked.proto +++ /dev/null @@ -1,392 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr; - -import "cel/expr/syntax.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr"; -option java_multiple_files = true; -option java_outer_classname = "DeclProto"; -option java_package = "dev.cel.expr"; - -// Protos for representing CEL declarations and typed checked expressions. - -// A CEL expression which has been successfully type checked. -message CheckedExpr { - // A map from expression ids to resolved references. - // - // The following entries are in this table: - // - // - An Ident or Select expression is represented here if it resolves to a - // declaration. For instance, if `a.b.c` is represented by - // `select(select(id(a), b), c)`, and `a.b` resolves to a declaration, - // while `c` is a field selection, then the reference is attached to the - // nested select expression (but not to the id or or the outer select). - // In turn, if `a` resolves to a declaration and `b.c` are field selections, - // the reference is attached to the ident expression. - // - Every Call expression has an entry here, identifying the function being - // called. - // - Every CreateStruct expression for a message has an entry, identifying - // the message. - map reference_map = 2; - - // A map from expression ids to types. - // - // Every expression node which has a type different than DYN has a mapping - // here. If an expression has type DYN, it is omitted from this map to save - // space. - map type_map = 3; - - // The source info derived from input that generated the parsed `expr` and - // any optimizations made during the type-checking pass. - SourceInfo source_info = 5; - - // The expr version indicates the major / minor version number of the `expr` - // representation. - // - // The most common reason for a version change will be to indicate to the CEL - // runtimes that transformations have been performed on the expr during static - // analysis. In some cases, this will save the runtime the work of applying - // the same or similar transformations prior to evaluation. - string expr_version = 6; - - // The checked expression. Semantically equivalent to the parsed `expr`, but - // may have structural differences. - Expr expr = 4; -} - -// Represents a CEL type. -message Type { - // List type with typed elements, e.g. `list`. - message ListType { - // The element type. - Type elem_type = 1; - } - - // Map type with parameterized key and value types, e.g. `map`. - message MapType { - // The type of the key. - Type key_type = 1; - - // The type of the value. - Type value_type = 2; - } - - // Function type with result and arg types. - message FunctionType { - // Result type of the function. - Type result_type = 1; - - // Argument types of the function. - repeated Type arg_types = 2; - } - - // Application defined abstract type. - message AbstractType { - // The fully qualified name of this abstract type. - string name = 1; - - // Parameter types for this abstract type. - repeated Type parameter_types = 2; - } - - // CEL primitive types. - enum PrimitiveType { - // Unspecified type. - PRIMITIVE_TYPE_UNSPECIFIED = 0; - - // Boolean type. - BOOL = 1; - - // Int64 type. - // - // 32-bit integer values are widened to int64. - INT64 = 2; - - // Uint64 type. - // - // 32-bit unsigned integer values are widened to uint64. - UINT64 = 3; - - // Double type. - // - // 32-bit float values are widened to double values. - DOUBLE = 4; - - // String type. - STRING = 5; - - // Bytes type. - BYTES = 6; - } - - // Well-known protobuf types treated with first-class support in CEL. - enum WellKnownType { - // Unspecified type. - WELL_KNOWN_TYPE_UNSPECIFIED = 0; - - // Well-known protobuf.Any type. - // - // Any types are a polymorphic message type. During type-checking they are - // treated like `DYN` types, but at runtime they are resolved to a specific - // message type specified at evaluation time. - ANY = 1; - - // Well-known protobuf.Timestamp type, internally referenced as `timestamp`. - TIMESTAMP = 2; - - // Well-known protobuf.Duration type, internally referenced as `duration`. - DURATION = 3; - } - - // The kind of type. - oneof type_kind { - // Dynamic type. - google.protobuf.Empty dyn = 1; - - // Null value. - google.protobuf.NullValue null = 2; - - // Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`. - PrimitiveType primitive = 3; - - // Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`. - PrimitiveType wrapper = 4; - - // Well-known protobuf type such as `google.protobuf.Timestamp`. - WellKnownType well_known = 5; - - // Parameterized list with elements of `list_type`, e.g. `list`. - ListType list_type = 6; - - // Parameterized map with typed keys and values. - MapType map_type = 7; - - // Function type. - FunctionType function = 8; - - // Protocol buffer message type. - // - // The `message_type` string specifies the qualified message type name. For - // example, `google.type.PhoneNumber`. - string message_type = 9; - - // Type param type. - // - // The `type_param` string specifies the type parameter name, e.g. `list` - // would be a `list_type` whose element type was a `type_param` type - // named `E`. - string type_param = 10; - - // Type type. - // - // The `type` value specifies the target type. e.g. int is type with a - // target type of `Primitive.INT64`. - Type type = 11; - - // Error type. - // - // During type-checking if an expression is an error, its type is propagated - // as the `ERROR` type. This permits the type-checker to discover other - // errors present in the expression. - google.protobuf.Empty error = 12; - - // Abstract, application defined type. - // - // An abstract type has no accessible field names, and it can only be - // inspected via helper / member functions. - AbstractType abstract_type = 14; - } -} - -// Represents a declaration of a named value or function. -// -// A declaration is part of the contract between the expression, the agent -// evaluating that expression, and the caller requesting evaluation. -message Decl { - // Identifier declaration which specifies its type and optional `Expr` value. - // - // An identifier without a value is a declaration that must be provided at - // evaluation time. An identifier with a value should resolve to a constant, - // but may be used in conjunction with other identifiers bound at evaluation - // time. - message IdentDecl { - // Required. The type of the identifier. - Type type = 1; - - // The constant value of the identifier. If not specified, the identifier - // must be supplied at evaluation time. - Constant value = 2; - - // Documentation string for the identifier. - // - // Provide a brief description of what the variable represents and whether - // there are any constraints on the formatting or supported value range. - // - // Examples: - // - // 'request.auth.principal' - string which uniquely identifies an - // authenticated principal. For JSON Web Tokens (JWTs), the principal - // is the combination of the issuer ('iss') and subject ('sub') token - // fields concatenated by a forward slash: iss + `/` + sub. - // - // 'min_cpus' - integer value indicates the minimum number of CPUs - // required for a compute cluster. The 'min_cpus' value must be - // greater than zero and less than 'max_cpus' or 64 whichever is less. - string doc = 3; - } - - // Function declaration specifies one or more overloads which indicate the - // function's parameter types and return type. - // - // Functions have no observable side-effects (there may be side-effects like - // logging which are not observable from CEL). - message FunctionDecl { - // An overload indicates a function's parameter types and return type, and - // may optionally include a function body described in terms of - // [Expr][cel.expr.Expr] values. - // - // Functions overloads are declared in either a function or method - // call-style. For methods, the `params[0]` is the expected type of the - // target receiver. - // - // Overloads must have non-overlapping argument types after erasure of all - // parameterized type variables (similar as type erasure in Java). - message Overload { - // Required. Globally unique overload name of the function which reflects - // the function name and argument types. - // - // This will be used by a [Reference][cel.expr.Reference] to - // indicate the `overload_id` that was resolved for the function `name`. - string overload_id = 1; - - // List of function parameter [Type][cel.expr.Type] values. - // - // Param types are disjoint after generic type parameters have been - // replaced with the type `DYN`. Since the `DYN` type is compatible with - // any other type, this means that if `A` is a type parameter, the - // function types `int` and `int` are not disjoint. Likewise, - // `map` is not disjoint from `map`. - // - // When the `result_type` of a function is a generic type param, the - // type param name also appears as the `type` of on at least one params. - repeated Type params = 2; - - // The type param names associated with the function declaration. - // - // For example, `function ex(K key, map map) : V` would yield - // the type params of `K, V`. - repeated string type_params = 3; - - // Required. The result type of the function. For example, the operator - // `string.isEmpty()` would have `result_type` of `kind: BOOL`. - Type result_type = 4; - - // Whether the function is to be used in a method call-style `x.f(...)` - // of a function call-style `f(x, ...)`. - // - // For methods, the first parameter declaration, `params[0]` is the - // expected type of the target receiver. - bool is_instance_function = 5; - - // Documentation string for the overload. - // - // Provide examples of the overload behavior, preferring to use literal - // values as input with a comment on the return value. - // - // Examples: - // - // // Determine whether a value of type exists within a list. - // 2 in [1, 2, 3] // returns true - // - // // Determine whether a key of type exists within a map. - // 'hello' in {'hi': 'you', 'hello': 'there'} // returns true - // 'help' in {'hi': 'you', 'hello': 'there'} // returns false - // - // // Take the substring of a string starting at a specific character - // // offset (inclusive). - // "tacocat".substring(1) // returns "acocat" - // "tacocat".substring(20) // error - // - // // Take the substring of a string starting at a specific character - // // offset (inclusive) and ending at the given offset (exclusive). - // "tacocat".substring(1, 6) // returns "acoca" - string doc = 6; - } - - // Required. List of function overloads, must contain at least one overload. - repeated Overload overloads = 1; - - // Documentation string for the function that indicates the general purpose - // of the function and its behavior. - // - // Documentation strings for the function should be general purpose with - // specific examples provided in the overload doc string. - // - // Examples: - // - // The 'in' operator tests whether an item exists in a collection. - // - // The 'substring' function returns a substring of a target string. - string doc = 2; - } - - // The fully qualified name of the declaration. - // - // Declarations are organized in containers and this represents the full path - // to the declaration in its container, as in `cel.expr.Decl`. - // - // Declarations used as - // [FunctionDecl.Overload][cel.expr.Decl.FunctionDecl.Overload] - // parameters may or may not have a name depending on whether the overload is - // function declaration or a function definition containing a result - // [Expr][cel.expr.Expr]. - string name = 1; - - // Required. The declaration kind. - oneof decl_kind { - // Identifier declaration. - IdentDecl ident = 2; - - // Function declaration. - FunctionDecl function = 3; - } -} - -// Describes a resolved reference to a declaration. -message Reference { - // The fully qualified name of the declaration. - string name = 1; - - // For references to functions, this is a list of `Overload.overload_id` - // values which match according to typing rules. - // - // If the list has more than one element, overload resolution among the - // presented candidates must happen at runtime because of dynamic types. The - // type checker attempts to narrow down this list as much as possible. - // - // Empty if this is not a reference to a - // [Decl.FunctionDecl][cel.expr.Decl.FunctionDecl]. - repeated string overload_id = 3; - - // For references to constants, this may contain the value of the - // constant if known at compile time. - Constant value = 4; -} diff --git a/src/main/proto/cel/expr/conformance/conformance_service.proto b/src/main/proto/cel/expr/conformance/conformance_service.proto deleted file mode 100644 index 2564c10..0000000 --- a/src/main/proto/cel/expr/conformance/conformance_service.proto +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr.conformance; - -import "cel/expr/checked.proto"; -import "cel/expr/eval.proto"; -import "cel/expr/syntax.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance"; -option java_multiple_files = true; -option java_outer_classname = "ConformanceServiceProto"; -option java_package = "dev.cel.expr.conformance"; - -// Access a CEL implementation from another process or machine. -// A CEL implementation is decomposed as a parser, a static checker, -// and an evaluator. Every CEL implementation is expected to provide -// a server for this API. The API will be used for conformance testing -// and other utilities. -service ConformanceService { - // Transforms CEL source text into a parsed representation. - rpc Parse(ParseRequest) returns (ParseResponse) { - } - - // Runs static checks on a parsed CEL representation and return - // an annotated representation, or a set of issues. - rpc Check(CheckRequest) returns (CheckResponse) { - } - - // Evaluates a parsed or annotation CEL representation given - // values of external bindings. - rpc Eval(EvalRequest) returns (EvalResponse) { - } -} - -// Request message for the Parse method. -message ParseRequest { - // Required. Source text in CEL syntax. - string cel_source = 1; - - // Tag for version of CEL syntax, for future use. - string syntax_version = 2; - - // File or resource for source text, used in [SourceInfo][google.api.SourceInfo]. - string source_location = 3; - - // Prevent macro expansion. See "Macros" in Language Defiinition. - bool disable_macros = 4; -} - -// Response message for the Parse method. -message ParseResponse { - // The parsed representation, or unset if parsing failed. - cel.expr.ParsedExpr parsed_expr = 1; - - // Any number of issues with [StatusDetails][] as the details. - cel.expr.ErrorSet issues = 2; -} - -// Request message for the Check method. -message CheckRequest { - // Required. The parsed representation of the CEL program. - cel.expr.ParsedExpr parsed_expr = 1; - - // Declarations of types for external variables and functions. - // Required if program uses external variables or functions - // not in the default environment. - repeated cel.expr.Decl type_env = 2; - - // The protocol buffer context. See "Name Resolution" in the - // Language Definition. - string container = 3; - - // If true, use only the declarations in [type_env][cel.expr.conformance.CheckRequest.type_env]. If false (default), - // add declarations for the standard definitions to the type environment. See - // "Standard Definitions" in the Language Definition. - bool no_std_env = 4; -} - -// Response message for the Check method. -message CheckResponse { - // The annotated representation, or unset if checking failed. - cel.expr.CheckedExpr checked_expr = 1; - - // Any number of issues with [StatusDetails][] as the details. - cel.expr.ErrorSet issues = 2; -} - -// Request message for the Eval method. -message EvalRequest { - // Required. Either the parsed or annotated representation of the CEL program. - oneof expr_kind { - // Evaluate based on the parsed representation. - cel.expr.ParsedExpr parsed_expr = 1; - - // Evaluate based on the checked representation. - cel.expr.CheckedExpr checked_expr = 2; - } - - // Bindings for the external variables. The types SHOULD be compatible - // with the type environment in [CheckRequest][cel.expr.conformance.CheckRequest], if checked. - map bindings = 3; - - // SHOULD be the same container as used in [CheckRequest][cel.expr.conformance.CheckRequest], if checked. - string container = 4; -} - -// Response message for the Eval method. -message EvalResponse { - // The execution result, or unset if execution couldn't start. - cel.expr.ExprValue result = 1; - - // Any number of issues with [StatusDetails][] as the details. - // Note that CEL execution errors are reified into [ExprValue][]. - // Nevertheless, we'll allow out-of-band issues to be raised, - // which also makes the replies more regular. - cel.expr.ErrorSet issues = 2; -} - -// A specific position in source. -message SourcePosition { - // The source location name (e.g. file name). - string location = 1; - - // The UTF-8 code unit offset. - int32 offset = 2; - - // The 1-based index of the starting line in the source text - // where the issue occurs, or 0 if unknown. - int32 line = 3; - - // The 0-based index of the starting position within the line of source text - // where the issue occurs. Only meaningful if line is nonzero. - int32 column = 4; -} - -// Warnings or errors in service execution are represented by -// [google.rpc.Status][google.rpc.Status] messages, with the following message -// in the details field. -message IssueDetails { - // Severities of issues. - enum Severity { - // An unspecified severity. - SEVERITY_UNSPECIFIED = 0; - - // Deprecation issue for statements and method that may no longer be - // supported or maintained. - DEPRECATION = 1; - - // Warnings such as: unused variables. - WARNING = 2; - - // Errors such as: unmatched curly braces or variable redefinition. - ERROR = 3; - } - - // The severity of the issue. - Severity severity = 1; - - // Position in the source, if known. - SourcePosition position = 2; - - // Expression ID from [Expr][], 0 if unknown. - int64 id = 3; -} diff --git a/src/main/proto/cel/expr/conformance/env_config.proto b/src/main/proto/cel/expr/conformance/env_config.proto deleted file mode 100644 index dce0df6..0000000 --- a/src/main/proto/cel/expr/conformance/env_config.proto +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr.conformance; - -import "cel/expr/checked.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/descriptor.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance"; -option java_multiple_files = true; -option java_outer_classname = "EnvironmentProto"; -option java_package = "cel.dev.expr.conformance"; - -// Representation of a CEL Environment, defining what features and extensions -// are available for conformance testing. -message Environment { - // Name of the environment - string name = 1; - - // Description for the current environment - string description = 2; - - // Sets the namespace (container) for the expression. - // This is used to simplify resolution. - // For example with container - // `google.rpc.context` - // an identifier of `google.rpc.context.AttributeContext` could be referred - // to simply as `AttributeContext` in the CEL expression. - string container = 3; - - // Import represents a type name that will be abbreviated by its simple name - // making it easier to reference simple type names from packages other than - // the expression container. - // For ex: - // Import{name: 'google.rpc.Status'} - // The above import will ensure that `google.rpc.Status` is available by the - // simple name `Status` within CEL expressions. - message Import { - // Qualified type name which will be abbreviated - string name = 1; - } - - // List of abbreviations to be added to the CEL environment - repeated Import imports = 4; - - // Set of options to subset a subsettable library - LibrarySubset stdlib = 5; - - // List of extensions to enable in the CEL environment. - repeated Extension extensions = 6; - - // ContextVariable represents a message type to be made available as a - // context variable to the CEL environment. - message ContextVariable { - // Fully qualified type name of the context proto. - string type_name = 1; - } - - // If set, adds a context declaration from a proto message. - // - // Context messages have all of their top-level fields available as variables - // in the type checker. - ContextVariable context_variable = 7; - - // List of declarations to be configured in the CEL environment. - // - // Note: The CEL environment can be configured with either the - // context_variable or a set of ident_decls provided as part of declarations. - // Providing both will result in an error. - repeated cel.expr.Decl declarations = 8; - - // List of validators for validating the parsed ast. - repeated Validator validators = 9; - - // List of feature flags to be enabled or disabled. - repeated Feature features = 10; - - // Disables including the declarations from the standard CEL environment. - // - // NOTE: Do not disable the standard CEL declarations unless you are aware of - // the implications and have discussed your use case on cel-discuss@ - // or with the members of the cel-governance-team@ - // - // Deprecated: Use LibrarySubset to disable standard cel declarations instead: - // stdlib = LibrarySubset{ disable: true } - bool disable_standard_cel_declarations = 11; - - // If provided, uses the provided FileDescriptorSet to extend types available - // the CEL expression. All "well-known" protobuf messages (google.protobuf.*) - // are known to the CEL compiler, but all others must be provided for type - // checking. - google.protobuf.FileDescriptorSet message_type_extension = 12; - - // When macro call tracking is enabled, the resulting SourceInfo in the - // CheckedExpr will contain a collection of expressions representing the - // function calls which were replaced by macros. - // - // Deprecated: Use Feature to enable macro call tracking - // Feature{ name: "cel.feature.macro_call_tracking", enabled: true } - bool enable_macro_call_tracking = 13; -} - -// Represents a named validator with an optional map-based configuration object. -// Naming convention followed by validators: -// .validator. -// For ex: -// `cel.validator.timestamp` -// -// Note: the map-keys must directly correspond to the internal representation of -// the original validator, and should only use primitive scalar types as values -// at this time. -message Validator { - string name = 1; - - // Additional configurations to be included as part of the validation - map config = 2; -} - -// Represents a named boolean feature flag supported by CEL. -// Naming convention followed by features: -// .feature. -// For ex: -// `cel.feature.cross_type_numeric_comparisons` -message Feature { - // Name of the feature flag. - string name = 1; - - // State of the feature flab. - bool enabled = 2; -} - -// Extension represents a versioned extension library reference to enable in the -// CEL environment. -message Extension { - // Name of the extension library. - string name = 1; - // Version of the extension library. - string version = 2; -} - -// LibrarySubset indicates a subset of the macros and functions supported by a -// subsettable library. -message LibrarySubset { - // Indicates whether the library has been disabled, typically only - // used for default-enabled libraries like stdlib. - bool disabled = 1; - - // Disables macros for the given library. - bool disable_macros = 2; - - // Specifies a set of macro function names to include in the subset. - repeated string include_macros = 3; - - // Specifies a set of macro function names to exclude from the subset. - // Note: if IncludeMacros is non-empty, then ExcludeFunctions is ignored. - repeated string exclude_macros = 4; - - // Specifies a set of functions to include in the subset. - // - // Note: the overloads specified in the subset need only specify their ID. - // Note: if IncludeFunctions is non-empty, then ExcludeFunctions is ignored. - repeated cel.expr.Decl include_functions = 5; - - // Specifies the set of functions to exclude from the subset. - // - // Note: the overloads specified in the subset need only specify their ID. - repeated cel.expr.Decl exclude_functions = 6; -} diff --git a/src/main/proto/cel/expr/conformance/proto2/test_all_types.proto b/src/main/proto/cel/expr/conformance/proto2/test_all_types.proto deleted file mode 100644 index 620a1e4..0000000 --- a/src/main/proto/cel/expr/conformance/proto2/test_all_types.proto +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto2"; - -package cel.expr.conformance.proto2; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance/proto2"; -option java_multiple_files = true; -option java_outer_classname = "TestAllTypesProto"; -option java_package = "dev.cel.expr.conformance.proto2"; - -// This proto includes every type of field in both singular and repeated -// forms. -message TestAllTypes { - message NestedMessage { - // The field name "b" fails to compile in proto1 because it conflicts with - // a local variable named "b" in one of the generated methods. - // This file needs to compile in proto1 to test backwards-compatibility. - optional int32 bb = 1; - } - - enum NestedEnum { - FOO = 0; - BAR = 1; - BAZ = 2; - } - - // Singular - optional int32 single_int32 = 1 [default = -32]; - optional int64 single_int64 = 2 [default = -64]; - optional uint32 single_uint32 = 3 [default = 32]; - optional uint64 single_uint64 = 4 [default = 64]; - optional sint32 single_sint32 = 5; - optional sint64 single_sint64 = 6; - optional fixed32 single_fixed32 = 7; - optional fixed64 single_fixed64 = 8; - optional sfixed32 single_sfixed32 = 9; - optional sfixed64 single_sfixed64 = 10; - optional float single_float = 11 [default = 3.0]; - optional double single_double = 12 [default = 6.4]; - optional bool single_bool = 13 [default = true]; - optional string single_string = 14 [default = "empty"]; - optional bytes single_bytes = 15 [default = "none"]; - - // Collides with 'in' operator. - optional bool in = 18; - - // Wellknown. - optional google.protobuf.Any single_any = 100; - optional google.protobuf.Duration single_duration = 101; - optional google.protobuf.Timestamp single_timestamp = 102; - optional google.protobuf.Struct single_struct = 103; - optional google.protobuf.Value single_value = 104; - optional google.protobuf.Int64Value single_int64_wrapper = 105; - optional google.protobuf.Int32Value single_int32_wrapper = 106; - optional google.protobuf.DoubleValue single_double_wrapper = 107; - optional google.protobuf.FloatValue single_float_wrapper = 108; - optional google.protobuf.UInt64Value single_uint64_wrapper = 109; - optional google.protobuf.UInt32Value single_uint32_wrapper = 110; - optional google.protobuf.StringValue single_string_wrapper = 111; - optional google.protobuf.BoolValue single_bool_wrapper = 112; - optional google.protobuf.BytesValue single_bytes_wrapper = 113; - optional google.protobuf.ListValue list_value = 114; - optional google.protobuf.NullValue null_value = 115; - optional google.protobuf.NullValue optional_null_value = 116; - optional google.protobuf.FieldMask field_mask = 117; - optional google.protobuf.Empty empty = 118; - - // Nested messages - oneof nested_type { - NestedMessage single_nested_message = 21; - NestedEnum single_nested_enum = 22 [default = BAR]; - } - optional NestedMessage standalone_message = 23; - optional NestedEnum standalone_enum = 24; - - // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; - repeated sfixed32 repeated_sfixed32 = 39; - repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; - - // Repeated and nested - repeated NestedMessage repeated_nested_message = 51; - repeated NestedEnum repeated_nested_enum = 52; - repeated string repeated_string_piece = 53 [ctype = STRING_PIECE]; - repeated string repeated_cord = 54 [ctype = CORD]; - repeated NestedMessage repeated_lazy_message = 55; - - // Repeated wellknown. - repeated google.protobuf.Any repeated_any = 120; - repeated google.protobuf.Duration repeated_duration = 121; - repeated google.protobuf.Timestamp repeated_timestamp = 122; - repeated google.protobuf.Struct repeated_struct = 123; - repeated google.protobuf.Value repeated_value = 124; - repeated google.protobuf.Int64Value repeated_int64_wrapper = 125; - repeated google.protobuf.Int32Value repeated_int32_wrapper = 126; - repeated google.protobuf.DoubleValue repeated_double_wrapper = 127; - repeated google.protobuf.FloatValue repeated_float_wrapper = 128; - repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 129; - repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 130; - repeated google.protobuf.StringValue repeated_string_wrapper = 131; - repeated google.protobuf.BoolValue repeated_bool_wrapper = 132; - repeated google.protobuf.BytesValue repeated_bytes_wrapper = 133; - repeated google.protobuf.ListValue repeated_list_value = 134; - repeated google.protobuf.NullValue repeated_null_value = 135; - - // Map - map map_int64_nested_type = 62; - - map map_bool_bool = 63; - map map_bool_string = 64; - map map_bool_bytes = 65; - map map_bool_int32 = 66; - map map_bool_int64 = 67; - map map_bool_uint32 = 68; - map map_bool_uint64 = 69; - map map_bool_float = 70; - map map_bool_double = 71; - map map_bool_enum = 72; - map map_bool_message = 73; - map map_bool_duration = 228; - map map_bool_timestamp = 229; - map map_bool_null_value = 230; - map map_bool_any = 246; - map map_bool_struct = 247; - map map_bool_value = 248; - map map_bool_list_value = 249; - map map_bool_int64_wrapper = 250; - map map_bool_int32_wrapper = 251; - map map_bool_double_wrapper = 252; - map map_bool_float_wrapper = 253; - map map_bool_uint64_wrapper = 254; - map map_bool_uint32_wrapper = 255; - map map_bool_string_wrapper = 256; - map map_bool_bool_wrapper = 257; - map map_bool_bytes_wrapper = 258; - - map map_int32_bool = 74; - map map_int32_string = 75; - map map_int32_bytes = 76; - map map_int32_int32 = 77; - map map_int32_int64 = 78; - map map_int32_uint32 = 79; - map map_int32_uint64 = 80; - map map_int32_float = 81; - map map_int32_double = 82; - map map_int32_enum = 83; - map map_int32_message = 84; - map map_int32_duration = 231; - map map_int32_timestamp = 232; - map map_int32_null_value = 233; - map map_int32_any = 259; - map map_int32_struct = 260; - map map_int32_value = 261; - map map_int32_list_value = 262; - map map_int32_int64_wrapper = 263; - map map_int32_int32_wrapper = 264; - map map_int32_double_wrapper = 265; - map map_int32_float_wrapper = 266; - map map_int32_uint64_wrapper = 267; - map map_int32_uint32_wrapper = 268; - map map_int32_string_wrapper = 269; - map map_int32_bool_wrapper = 270; - map map_int32_bytes_wrapper = 271; - - map map_int64_bool = 85; - map map_int64_string = 86; - map map_int64_bytes = 87; - map map_int64_int32 = 88; - map map_int64_int64 = 89; - map map_int64_uint32 = 90; - map map_int64_uint64 = 91; - map map_int64_float = 92; - map map_int64_double = 93; - map map_int64_enum = 94; - map map_int64_message = 95; - map map_int64_duration = 234; - map map_int64_timestamp = 235; - map map_int64_null_value = 236; - map map_int64_any = 272; - map map_int64_struct = 273; - map map_int64_value = 274; - map map_int64_list_value = 275; - map map_int64_int64_wrapper = 276; - map map_int64_int32_wrapper = 277; - map map_int64_double_wrapper = 278; - map map_int64_float_wrapper = 279; - map map_int64_uint64_wrapper = 280; - map map_int64_uint32_wrapper = 281; - map map_int64_string_wrapper = 282; - map map_int64_bool_wrapper = 283; - map map_int64_bytes_wrapper = 284; - - map map_uint32_bool = 96; - map map_uint32_string = 97; - map map_uint32_bytes = 98; - map map_uint32_int32 = 99; - map map_uint32_int64 = 200; - map map_uint32_uint32 = 201; - map map_uint32_uint64 = 202; - map map_uint32_float = 203; - map map_uint32_double = 204; - map map_uint32_enum = 205; - map map_uint32_message = 206; - map map_uint32_duration = 237; - map map_uint32_timestamp = 238; - map map_uint32_null_value = 239; - map map_uint32_any = 285; - map map_uint32_struct = 286; - map map_uint32_value = 287; - map map_uint32_list_value = 288; - map map_uint32_int64_wrapper = 289; - map map_uint32_int32_wrapper = 290; - map map_uint32_double_wrapper = 291; - map map_uint32_float_wrapper = 292; - map map_uint32_uint64_wrapper = 293; - map map_uint32_uint32_wrapper = 294; - map map_uint32_string_wrapper = 295; - map map_uint32_bool_wrapper = 296; - map map_uint32_bytes_wrapper = 297; - - map map_uint64_bool = 207; - map map_uint64_string = 208; - map map_uint64_bytes = 209; - map map_uint64_int32 = 210; - map map_uint64_int64 = 211; - map map_uint64_uint32 = 212; - map map_uint64_uint64 = 213; - map map_uint64_float = 214; - map map_uint64_double = 215; - map map_uint64_enum = 216; - map map_uint64_message = 217; - map map_uint64_duration = 240; - map map_uint64_timestamp = 241; - map map_uint64_null_value = 242; - map map_uint64_any = 298; - map map_uint64_struct = 299; - map map_uint64_value = 300; - map map_uint64_list_value = 301; - map map_uint64_int64_wrapper = 302; - map map_uint64_int32_wrapper = 303; - map map_uint64_double_wrapper = 304; - map map_uint64_float_wrapper = 305; - map map_uint64_uint64_wrapper = 306; - map map_uint64_uint32_wrapper = 307; - map map_uint64_string_wrapper = 308; - map map_uint64_bool_wrapper = 309; - map map_uint64_bytes_wrapper = 310; - - map map_string_bool = 218; - map map_string_string = 61; - map map_string_bytes = 219; - map map_string_int32 = 220; - map map_string_int64 = 221; - map map_string_uint32 = 222; - map map_string_uint64 = 223; - map map_string_float = 224; - map map_string_double = 225; - map map_string_enum = 226; - map map_string_message = 227; - map map_string_duration = 243; - map map_string_timestamp = 244; - map map_string_null_value = 245; - map map_string_any = 311; - map map_string_struct = 312; - map map_string_value = 313; - map map_string_list_value = 314; - map map_string_int64_wrapper = 315; - map map_string_int32_wrapper = 316; - map map_string_double_wrapper = 317; - map map_string_float_wrapper = 318; - map map_string_uint64_wrapper = 319; - map map_string_uint32_wrapper = 320; - map map_string_string_wrapper = 321; - map map_string_bool_wrapper = 322; - map map_string_bytes_wrapper = 323; - - oneof kind { - NestedTestAllTypes oneof_type = 400; - NestedMessage oneof_msg = 401; - bool oneof_bool = 402; - } - - optional group NestedGroup = 403 { - optional int32 single_id = 404; - optional string single_name = 405; - } - - // Field names formerly defined as reserved CEL identifiers. - optional bool as = 500; - optional bool break = 501; - optional bool const = 502; - optional bool continue = 503; - optional bool else = 504; - optional bool for = 505; - optional bool function = 506; - optional bool if = 507; - optional bool import = 508; - optional bool let = 509; - optional bool loop = 510; - optional bool package = 511; - optional bool namespace = 512; - optional bool return = 513; - optional bool var = 514; - optional bool void = 515; - optional bool while = 516; - - extensions 1000 to max; -} - -// This proto includes a recursively nested message. -message NestedTestAllTypes { - optional NestedTestAllTypes child = 1; - optional TestAllTypes payload = 2; -} - -// This proto has a required field. -message TestRequired { - required int32 required_int32 = 1; -} - -// This proto tests that global enums are resolved correctly. -enum GlobalEnum { - GOO = 0; - GAR = 1; - GAZ = 2; -} diff --git a/src/main/proto/cel/expr/conformance/proto2/test_all_types_extensions.proto b/src/main/proto/cel/expr/conformance/proto2/test_all_types_extensions.proto deleted file mode 100644 index 1c37f4f..0000000 --- a/src/main/proto/cel/expr/conformance/proto2/test_all_types_extensions.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto2"; - -package cel.expr.conformance.proto2; - -import "cel/expr/conformance/proto2/test_all_types.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance/proto2"; -option java_outer_classname = "TestAllTypesExtensions"; -option java_package = "dev.cel.expr.conformance.proto2"; -option java_multiple_files = true; - -// Package scoped extensions -extend TestAllTypes { - optional int32 int32_ext = 1000; - optional TestAllTypes nested_ext = 1001; - optional TestAllTypes test_all_types_ext = 1002; - optional TestAllTypes.NestedEnum nested_enum_ext = 1003; - repeated TestAllTypes repeated_test_all_types = 1004; -} - -// Message scoped extensions -message Proto2ExtensionScopedMessage { - extend TestAllTypes { - optional int64 int64_ext = 1005; - optional TestAllTypes message_scoped_nested_ext = 1006; - optional TestAllTypes.NestedEnum nested_enum_ext = 1007; - repeated TestAllTypes message_scoped_repeated_test_all_types = 1008; - } -} diff --git a/src/main/proto/cel/expr/conformance/proto3/test_all_types.proto b/src/main/proto/cel/expr/conformance/proto3/test_all_types.proto deleted file mode 100644 index ff6f31a..0000000 --- a/src/main/proto/cel/expr/conformance/proto3/test_all_types.proto +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr.conformance.proto3; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance/proto3"; -option java_multiple_files = true; -option java_outer_classname = "TestAllTypesProto"; -option java_package = "dev.cel.expr.conformance.proto3"; - -// This proto includes every type of field in both singular and repeated -// forms. -message TestAllTypes { - message NestedMessage { - // The field name "b" fails to compile in proto1 because it conflicts with - // a local variable named "b" in one of the generated methods. - // This file needs to compile in proto1 to test backwards-compatibility. - int32 bb = 1; - } - - enum NestedEnum { - FOO = 0; - BAR = 1; - BAZ = 2; - } - - // Singular - int32 single_int32 = 1; - int64 single_int64 = 2; - uint32 single_uint32 = 3; - uint64 single_uint64 = 4; - sint32 single_sint32 = 5; - sint64 single_sint64 = 6; - fixed32 single_fixed32 = 7; - fixed64 single_fixed64 = 8; - sfixed32 single_sfixed32 = 9; - sfixed64 single_sfixed64 = 10; - float single_float = 11; - double single_double = 12; - bool single_bool = 13; - string single_string = 14; - bytes single_bytes = 15; - optional bool optional_bool = 16; - optional string optional_string = 17; - - // Collides with 'in' operator. - bool in = 18; - - // Wellknown. - google.protobuf.Any single_any = 100; - google.protobuf.Duration single_duration = 101; - google.protobuf.Timestamp single_timestamp = 102; - google.protobuf.Struct single_struct = 103; - google.protobuf.Value single_value = 104; - google.protobuf.Int64Value single_int64_wrapper = 105; - google.protobuf.Int32Value single_int32_wrapper = 106; - google.protobuf.DoubleValue single_double_wrapper = 107; - google.protobuf.FloatValue single_float_wrapper = 108; - google.protobuf.UInt64Value single_uint64_wrapper = 109; - google.protobuf.UInt32Value single_uint32_wrapper = 110; - google.protobuf.StringValue single_string_wrapper = 111; - google.protobuf.BoolValue single_bool_wrapper = 112; - google.protobuf.BytesValue single_bytes_wrapper = 113; - google.protobuf.ListValue list_value = 114; - google.protobuf.NullValue null_value = 115; - optional google.protobuf.NullValue optional_null_value = 116; - google.protobuf.FieldMask field_mask = 117; - google.protobuf.Empty empty = 118; - - // Nested messages - oneof nested_type { - NestedMessage single_nested_message = 21; - NestedEnum single_nested_enum = 22; - } - NestedMessage standalone_message = 23; - NestedEnum standalone_enum = 24; - - // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; - repeated sfixed32 repeated_sfixed32 = 39; - repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; - - // Repeated and nested - repeated NestedMessage repeated_nested_message = 51; - repeated NestedEnum repeated_nested_enum = 52; - repeated string repeated_string_piece = 53 [ctype = STRING_PIECE]; - repeated string repeated_cord = 54 [ctype = CORD]; - repeated NestedMessage repeated_lazy_message = 55; - - // Repeated wellknown. - repeated google.protobuf.Any repeated_any = 120; - repeated google.protobuf.Duration repeated_duration = 121; - repeated google.protobuf.Timestamp repeated_timestamp = 122; - repeated google.protobuf.Struct repeated_struct = 123; - repeated google.protobuf.Value repeated_value = 124; - repeated google.protobuf.Int64Value repeated_int64_wrapper = 125; - repeated google.protobuf.Int32Value repeated_int32_wrapper = 126; - repeated google.protobuf.DoubleValue repeated_double_wrapper = 127; - repeated google.protobuf.FloatValue repeated_float_wrapper = 128; - repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 129; - repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 130; - repeated google.protobuf.StringValue repeated_string_wrapper = 131; - repeated google.protobuf.BoolValue repeated_bool_wrapper = 132; - repeated google.protobuf.BytesValue repeated_bytes_wrapper = 133; - repeated google.protobuf.ListValue repeated_list_value = 134; - repeated google.protobuf.NullValue repeated_null_value = 135; - - // Map - map map_int64_nested_type = 62; - - map map_bool_bool = 63; - map map_bool_string = 64; - map map_bool_bytes = 65; - map map_bool_int32 = 66; - map map_bool_int64 = 67; - map map_bool_uint32 = 68; - map map_bool_uint64 = 69; - map map_bool_float = 70; - map map_bool_double = 71; - map map_bool_enum = 72; - map map_bool_message = 73; - map map_bool_duration = 228; - map map_bool_timestamp = 229; - map map_bool_null_value = 230; - map map_bool_any = 246; - map map_bool_struct = 247; - map map_bool_value = 248; - map map_bool_list_value = 249; - map map_bool_int64_wrapper = 250; - map map_bool_int32_wrapper = 251; - map map_bool_double_wrapper = 252; - map map_bool_float_wrapper = 253; - map map_bool_uint64_wrapper = 254; - map map_bool_uint32_wrapper = 255; - map map_bool_string_wrapper = 256; - map map_bool_bool_wrapper = 257; - map map_bool_bytes_wrapper = 258; - - map map_int32_bool = 74; - map map_int32_string = 75; - map map_int32_bytes = 76; - map map_int32_int32 = 77; - map map_int32_int64 = 78; - map map_int32_uint32 = 79; - map map_int32_uint64 = 80; - map map_int32_float = 81; - map map_int32_double = 82; - map map_int32_enum = 83; - map map_int32_message = 84; - map map_int32_duration = 231; - map map_int32_timestamp = 232; - map map_int32_null_value = 233; - map map_int32_any = 259; - map map_int32_struct = 260; - map map_int32_value = 261; - map map_int32_list_value = 262; - map map_int32_int64_wrapper = 263; - map map_int32_int32_wrapper = 264; - map map_int32_double_wrapper = 265; - map map_int32_float_wrapper = 266; - map map_int32_uint64_wrapper = 267; - map map_int32_uint32_wrapper = 268; - map map_int32_string_wrapper = 269; - map map_int32_bool_wrapper = 270; - map map_int32_bytes_wrapper = 271; - - map map_int64_bool = 85; - map map_int64_string = 86; - map map_int64_bytes = 87; - map map_int64_int32 = 88; - map map_int64_int64 = 89; - map map_int64_uint32 = 90; - map map_int64_uint64 = 91; - map map_int64_float = 92; - map map_int64_double = 93; - map map_int64_enum = 94; - map map_int64_message = 95; - map map_int64_duration = 234; - map map_int64_timestamp = 235; - map map_int64_null_value = 236; - map map_int64_any = 272; - map map_int64_struct = 273; - map map_int64_value = 274; - map map_int64_list_value = 275; - map map_int64_int64_wrapper = 276; - map map_int64_int32_wrapper = 277; - map map_int64_double_wrapper = 278; - map map_int64_float_wrapper = 279; - map map_int64_uint64_wrapper = 280; - map map_int64_uint32_wrapper = 281; - map map_int64_string_wrapper = 282; - map map_int64_bool_wrapper = 283; - map map_int64_bytes_wrapper = 284; - - map map_uint32_bool = 96; - map map_uint32_string = 97; - map map_uint32_bytes = 98; - map map_uint32_int32 = 99; - map map_uint32_int64 = 200; - map map_uint32_uint32 = 201; - map map_uint32_uint64 = 202; - map map_uint32_float = 203; - map map_uint32_double = 204; - map map_uint32_enum = 205; - map map_uint32_message = 206; - map map_uint32_duration = 237; - map map_uint32_timestamp = 238; - map map_uint32_null_value = 239; - map map_uint32_any = 285; - map map_uint32_struct = 286; - map map_uint32_value = 287; - map map_uint32_list_value = 288; - map map_uint32_int64_wrapper = 289; - map map_uint32_int32_wrapper = 290; - map map_uint32_double_wrapper = 291; - map map_uint32_float_wrapper = 292; - map map_uint32_uint64_wrapper = 293; - map map_uint32_uint32_wrapper = 294; - map map_uint32_string_wrapper = 295; - map map_uint32_bool_wrapper = 296; - map map_uint32_bytes_wrapper = 297; - - map map_uint64_bool = 207; - map map_uint64_string = 208; - map map_uint64_bytes = 209; - map map_uint64_int32 = 210; - map map_uint64_int64 = 211; - map map_uint64_uint32 = 212; - map map_uint64_uint64 = 213; - map map_uint64_float = 214; - map map_uint64_double = 215; - map map_uint64_enum = 216; - map map_uint64_message = 217; - map map_uint64_duration = 240; - map map_uint64_timestamp = 241; - map map_uint64_null_value = 242; - map map_uint64_any = 298; - map map_uint64_struct = 299; - map map_uint64_value = 300; - map map_uint64_list_value = 301; - map map_uint64_int64_wrapper = 302; - map map_uint64_int32_wrapper = 303; - map map_uint64_double_wrapper = 304; - map map_uint64_float_wrapper = 305; - map map_uint64_uint64_wrapper = 306; - map map_uint64_uint32_wrapper = 307; - map map_uint64_string_wrapper = 308; - map map_uint64_bool_wrapper = 309; - map map_uint64_bytes_wrapper = 310; - - map map_string_bool = 218; - map map_string_string = 61; - map map_string_bytes = 219; - map map_string_int32 = 220; - map map_string_int64 = 221; - map map_string_uint32 = 222; - map map_string_uint64 = 223; - map map_string_float = 224; - map map_string_double = 225; - map map_string_enum = 226; - map map_string_message = 227; - map map_string_duration = 243; - map map_string_timestamp = 244; - map map_string_null_value = 245; - map map_string_any = 311; - map map_string_struct = 312; - map map_string_value = 313; - map map_string_list_value = 314; - map map_string_int64_wrapper = 315; - map map_string_int32_wrapper = 316; - map map_string_double_wrapper = 317; - map map_string_float_wrapper = 318; - map map_string_uint64_wrapper = 319; - map map_string_uint32_wrapper = 320; - map map_string_string_wrapper = 321; - map map_string_bool_wrapper = 322; - map map_string_bytes_wrapper = 323; - - oneof kind { - NestedTestAllTypes oneof_type = 400; - NestedMessage oneof_msg = 401; - bool oneof_bool = 402; - } - - // Field names formerly defined as reserved CEL identifiers. - bool as = 500; - bool break = 501; - bool const = 502; - bool continue = 503; - bool else = 504; - bool for = 505; - bool function = 506; - bool if = 507; - bool import = 508; - bool let = 509; - bool loop = 510; - bool package = 511; - bool namespace = 512; - bool return = 513; - bool var = 514; - bool void = 515; - bool while = 516; -} - -// This proto includes a recursively nested message. -message NestedTestAllTypes { - NestedTestAllTypes child = 1; - TestAllTypes payload = 2; -} - -// This proto tests that global enums are resolved correctly. -enum GlobalEnum { - GOO = 0; - GAR = 1; - GAZ = 2; -} diff --git a/src/main/proto/cel/expr/conformance/test/simple.proto b/src/main/proto/cel/expr/conformance/test/simple.proto deleted file mode 100644 index 227fc09..0000000 --- a/src/main/proto/cel/expr/conformance/test/simple.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Simple end-to-end conformance tests. - -syntax = "proto3"; - -package cel.expr.conformance.test; - -import "cel/expr/checked.proto"; -import "cel/expr/eval.proto"; -import "cel/expr/value.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance/test"; -option java_multiple_files = true; -option java_outer_classname = "SimpleProto"; -option java_package = "dev.cel.expr.conformance.test"; - -// The format of a simple test file, expected to be stored in text format. -// A file is the unit of granularity for selecting conformance tests, -// so tests of optional features should be segregated into separate files. -// -// Deprecated: Use cel.expr.conformance.test.Suite -message SimpleTestFile { - // Required. The name of the file. Should match the filename. - string name = 1; - - // A description of the file. - string description = 2; - - // The contained sections. - repeated SimpleTestSection section = 3; -} - -// A collection of related SimpleTests. -// -// The section is the unit of organization within a test file, and should -// guide where new tests are added. -message SimpleTestSection { - // Required. The name of the section. - string name = 1; - - // A description of the section. - string description = 2; - - // The contained tests. - repeated SimpleTest test = 3; -} - -// A test which should run the given CEL program through parsing, -// optionally through checking, then evaluation, with the results -// of the pipeline validated by the given result matcher. -message SimpleTest { - // Required. The name of the test, which should be unique in the test file. - string name = 1; - - // A description of the test. - string description = 2; - - // Required. The text of the CEL expression. - string expr = 3; - - // Disables all macro expansion in parsing. - bool disable_macros = 4; - - // Disables the check phase. - bool disable_check = 5; - - // Disables the evaluate phase. - bool check_only = 15; - - // The type environment to use for the check phase. - repeated cel.expr.Decl type_env = 6; - - // The container for name resolution. - string container = 13; - - // The locale to use for the evaluation phase. - string locale = 14; - - // Variable bindings to use for the eval phase. - map bindings = 7; - - // An unspecified result defaults to a matcher for the true boolean value. - oneof result_matcher { - // A normal value, which must match the evaluation result exactly - // via value equality semantics. This coincides with proto equality, - // except for: - // * maps are order-agnostic. - // * a floating point NaN should match any NaN. - cel.expr.Value value = 8; - - // A result and deduced expression type. - TypedResult typed_result = 16; - - // Matches error evaluation results. - cel.expr.ErrorSet eval_error = 9; - - // Matches one of several error results. - // (Using explicit message since oneof can't handle repeated.) - ErrorSetMatcher any_eval_errors = 10; - - // Matches unknown evaluation results. - cel.expr.UnknownSet unknown = 11; - - // Matches one of several unknown results. - // (Using explicit message since oneof can't handle repeated.) - UnknownSetMatcher any_unknowns = 12; - } - // Next is 17. -} - -// Matches a result along with deduced expression type. -message TypedResult { - // A normal value, which must match the evaluation result exactly - // via value equality semantics. This is ignored if the test is `check_only`. - cel.expr.Value result = 1; - - // The deduced type of the expression as reported by the checker. - cel.expr.Type deduced_type = 2; -} - -// Matches error results from Eval. -message ErrorSetMatcher { - // Success if we match any of these sets. - repeated cel.expr.ErrorSet errors = 1; -} - -// Matches unknown results from Eval. -message UnknownSetMatcher { - // Success if we match any of these sets. - repeated cel.expr.UnknownSet unknowns = 1; -} diff --git a/src/main/proto/cel/expr/conformance/test/suite.proto b/src/main/proto/cel/expr/conformance/test/suite.proto deleted file mode 100644 index f9feab4..0000000 --- a/src/main/proto/cel/expr/conformance/test/suite.proto +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Unit tests and end-to-end conformance tests. - -syntax = "proto3"; - -package cel.expr.conformance.test; - -import "cel/expr/checked.proto"; -import "cel/expr/eval.proto"; -import "cel/expr/value.proto"; -import "cel/expr/conformance/env_config.proto"; -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr/conformance/test"; -option java_multiple_files = true; -option java_outer_classname = "SuiteProto"; -option java_package = "dev.cel.expr.conformance.test"; - -// A test suite is a collection of tests designed to evaluate the correctness of -// a CEL policy, a CEL expression or the conformance of a CEL implementation to -// the standard specification. -message TestSuite { - // The name of the test suite. - string name = 1; - - // Description of the test suite. - string description = 2; - - // Test sections of the test suite. - // Each section represents a behavior to be tested. - repeated TestSection sections = 3; -} - -// A collection of related test cases. -message TestSection { - // Name of the test section. - string name = 1; - - // Description of the test section. - string description = 2; - - // Test cases of the test section. - // Each test case represents a test scenario. - repeated TestCase tests = 3; -} - -// A test to validate a CEL policy or expression. The test case encompasses -// evaluation of the compiled expression using the provided input bindings and -// asserting the result against the expected result. -// It can also validate a raw CEL expression string through parse, check and -// eval stages, making use of the augmenting CEL environment if provided. -message TestCase { - // Name of the test case. - string name = 1; - - // A description of the test. - string description = 2; - - // The text of the CEL expression. - string expr = 3; - - // Serialized environment to be used for compilation and evaluation of the - // CEL expression for the current test case. - // This option allows validating the same expression against multiple - // environments. - cel.expr.conformance.Environment env = 4; - - // A map representing a variable binding where the key is the name of the - // input variable. - map input = 5; - - // Input in the form of a context proto for the test case. - // Note: Only one of `input_bindings` and `input_context` can be provided. Providing - // both should result in an error. - InputContext input_context = 6; - - // Expected result of the test case. - TestOutput output = 7; - - // If specified validates that the deduced type at check time matches - // If the result kind is not set and this field is set, the test is considered - // "check-only". - cel.expr.Type deduced_type = 8; - - // Bypass the type-checking and only attempt to evaluate the parsed - // expression. - bool disable_check = 9; -} - -// Input context proto for the test case -message InputContext { - // The type of input context for the test case - oneof input_context_kind { - // A context message represents an input kind in the form of a proto - // message whose type is defined at runtime. - google.protobuf.Any context_message = 1; - - // A context expression representing a context proto variable. The - // fields of the input proto.Messages are used as top-level variables within - // an Activation. The expression is evaluated using the cel environment - // configured for the test suite. - string context_expr = 2; - } -} - -// The input value for a variable binding -message InputValue { - // The type of input value that can be used for a variable binding - oneof kind { - // A simple literal value for a variable binding - cel.expr.Value value = 1; - - // An expression which evaluates to the value of the variable binding. - // The expression is evaluated using the same runtime environment as the - // one used for evaluating the expression under test. - string expr = 2; - } -} - -// Expected result of the test case. -message TestOutput { - // Type of expected result of the test case. - oneof result_kind { - // A normal value, which must match the evaluation result exactly via value - // equality semantics. This coincides with proto equality, except for: - // * maps are order-agnostic - // * a floating point NaN should match any NaN - cel.expr.Value result_value = 8; - - // An expression to be evaluated using the cel environment configured for - // the test suite. The result of this expression must match the result of - // the test case. - string result_expr = 9; - - // An error evaluation result set. Success if we match all of the errors in - // the set. - cel.expr.ErrorSet eval_error = 10; - - // An unknown evaluation result. - cel.expr.UnknownSet unknown = 11; - } -} diff --git a/src/main/proto/cel/expr/eval.proto b/src/main/proto/cel/expr/eval.proto deleted file mode 100644 index 8ad8698..0000000 --- a/src/main/proto/cel/expr/eval.proto +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr; - -import "google/protobuf/any.proto"; -import "cel/expr/value.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr"; -option java_multiple_files = true; -option java_outer_classname = "EvalProto"; -option java_package = "dev.cel.expr"; - -// The state of an evaluation. -// -// Can represent an initial, partial, or completed state of evaluation. -message EvalState { - // A single evaluation result. - message Result { - // The id of the expression this result if for. - int64 expr = 1; - - // The index in `values` of the resulting value. - int64 value = 2; - } - - // The unique values referenced in this message. - repeated ExprValue values = 1; - - // An ordered list of results. - // - // Tracks the flow of evaluation through the expression. - // May be sparse. - repeated Result results = 3; -} - -// The value of an evaluated expression. -message ExprValue { - // An expression can resolve to a value, error or unknown. - oneof kind { - Value value = 1; - - // The set of errors in the critical path of evaluation. - // - // Only errors in the critical path are included. For example, - // `( || true) && ` will only result in ``, - // while ` || ` will result in both `` and - // ``. - // - // Errors cause by the presence of other errors are not included in the - // set. For example `.foo`, `foo()`, and ` + 1` will - // only result in ``. - // - // Multiple errors *might* be included when evaluation could result - // in different errors. For example ` + ` and - // `foo(, )` may result in ``, `` or both. - // The exact subset of errors included for this case is unspecified and - // depends on the implementation details of the evaluator. - ErrorSet error = 2; - - // The set of unknowns in the critical path of evaluation. - // - // Unknown behaves identically to Error with regards to propagation. - // Specifically, only unknowns in the critical path are included, unknowns - // caused by the presence of other unknowns are not included, and multiple - // unknowns *might* be included when evaluation could result in - // different unknowns. For example: - // - // ( || true) && -> - // || -> - // .foo -> - // foo() -> - // + -> or - // - // Unknown takes precedence over Error in cases where a `Value` can short - // circuit the result: - // - // || -> - // && -> - // - // Errors take precedence in all other cases: - // - // + -> - // foo(, ) -> - UnknownSet unknown = 3; - } -} - -// A set of errors. -// -// The errors included depend on the context. See `ExprValue.error`. -message ErrorSet { - // Errors that could come up during evaluation phase. - repeated Status errors = 1; -} - - // Each `Status` message contains three pieces of data: error code, error message, - // and error details. - // - // You can find out more about this error model and how to work with it in the - // [API Design Guide](https://cloud.google.com/apis/design/errors). - // - // Status value is intended to be wire and field compatible with `google.rpc.Status`. - message Status { - // The status code, which should be an enum value of [google.rpc.Code][]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [Status.details][] field, or localized by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; - } - -// A set of expressions for which the value is unknown. -// -// The unknowns included depend on the context. See `ExprValue.unknown`. -message UnknownSet { - // The ids of the expressions with unknown values. - repeated int64 exprs = 1; -} diff --git a/src/main/proto/cel/expr/explain.proto b/src/main/proto/cel/expr/explain.proto deleted file mode 100644 index aa4ba94..0000000 --- a/src/main/proto/cel/expr/explain.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr; - -import "cel/expr/value.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr"; -option java_multiple_files = true; -option java_outer_classname = "ExplainProto"; -option java_package = "dev.cel.expr"; - -// Values of intermediate expressions produced when evaluating expression. -message Explain { - option deprecated = true; - - // ID and value index of one step. - message ExprStep { - // ID of corresponding Expr node. - int64 id = 1; - - // Index of the value in the values list. - int32 value_index = 2; - } - - // All of the observed values. - // - // The field value_index is an index in the values list. - // Separating values from steps is needed to remove redundant values. - repeated Value values = 1; - - // List of steps. - // - // Repeated evaluations of the same expression generate new ExprStep - // instances. The order of such ExprStep instances matches the order of - // elements returned by Comprehension.iter_range. - repeated ExprStep expr_steps = 2; -} diff --git a/src/main/proto/cel/expr/syntax.proto b/src/main/proto/cel/expr/syntax.proto deleted file mode 100644 index 00635e6..0000000 --- a/src/main/proto/cel/expr/syntax.proto +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr"; -option java_multiple_files = true; -option java_outer_classname = "SyntaxProto"; -option java_package = "dev.cel.expr"; - -// A representation of the abstract syntax of the Common Expression Language. - -// An expression together with source information as returned by the parser. -message ParsedExpr { - // The parsed expression. - Expr expr = 2; - - // The source info derived from input that generated the parsed `expr`. - SourceInfo source_info = 3; -} - -// An abstract representation of a common expression. -// -// Expressions are abstractly represented as a collection of identifiers, -// select statements, function calls, literals, and comprehensions. All -// operators with the exception of the '.' operator are modelled as function -// calls. This makes it easy to represent new operators into the existing AST. -// -// All references within expressions must resolve to a -// [Decl][cel.expr.Decl] provided at type-check for an expression to be -// valid. A reference may either be a bare identifier `name` or a qualified -// identifier `google.api.name`. References may either refer to a value or a -// function declaration. -// -// For example, the expression `google.api.name.startsWith('expr')` references -// the declaration `google.api.name` within a -// [Expr.Select][cel.expr.Expr.Select] expression, and the function -// declaration `startsWith`. -message Expr { - // An identifier expression. e.g. `request`. - message Ident { - // Required. Holds a single, unqualified identifier, possibly preceded by a - // '.'. - // - // Qualified names are represented by the - // [Expr.Select][cel.expr.Expr.Select] expression. - string name = 1; - } - - // A field selection expression. e.g. `request.auth`. - message Select { - // Required. The target of the selection expression. - // - // For example, in the select expression `request.auth`, the `request` - // portion of the expression is the `operand`. - Expr operand = 1; - - // Required. The name of the field to select. - // - // For example, in the select expression `request.auth`, the `auth` portion - // of the expression would be the `field`. - string field = 2; - - // Whether the select is to be interpreted as a field presence test. - // - // This results from the macro `has(request.auth)`. - bool test_only = 3; - } - - // A call expression, including calls to predefined functions and operators. - // - // For example, `value == 10`, `size(map_value)`. - message Call { - // The target of an method call-style expression. For example, `x` in - // `x.f()`. - Expr target = 1; - - // Required. The name of the function or method being called. - string function = 2; - - // The arguments. - repeated Expr args = 3; - } - - // A list creation expression. - // - // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g. - // `dyn([1, 'hello', 2.0])` - message CreateList { - // The elements part of the list. - repeated Expr elements = 1; - - // The indices within the elements list which are marked as optional - // elements. - // - // When an optional-typed value is present, the value it contains - // is included in the list. If the optional-typed value is absent, the list - // element is omitted from the CreateList result. - repeated int32 optional_indices = 2; - } - - // A map or message creation expression. - // - // Maps are constructed as `{'key_name': 'value'}`. Message construction is - // similar, but prefixed with a type name and composed of field ids: - // `types.MyType{field_id: 'value'}`. - message CreateStruct { - // Represents an entry. - message Entry { - // Required. An id assigned to this node by the parser which is unique - // in a given expression tree. This is used to associate type - // information and other attributes to the node. - int64 id = 1; - - // The `Entry` key kinds. - oneof key_kind { - // The field key for a message creator statement. - string field_key = 2; - - // The key expression for a map creation statement. - Expr map_key = 3; - } - - // Required. The value assigned to the key. - // - // If the optional_entry field is true, the expression must resolve to an - // optional-typed value. If the optional value is present, the key will be - // set; however, if the optional value is absent, the key will be unset. - Expr value = 4; - - // Whether the key-value pair is optional. - bool optional_entry = 5; - } - - // The type name of the message to be created, empty when creating map - // literals. - string message_name = 1; - - // The entries in the creation expression. - repeated Entry entries = 2; - } - - // A comprehension expression applied to a list or map. - // - // Comprehensions are not part of the core syntax, but enabled with macros. - // A macro matches a specific call signature within a parsed AST and replaces - // the call with an alternate AST block. Macro expansion happens at parse - // time. - // - // The following macros are supported within CEL: - // - // Aggregate type macros may be applied to all elements in a list or all keys - // in a map: - // - // * `all`, `exists`, `exists_one` - test a predicate expression against - // the inputs and return `true` if the predicate is satisfied for all, - // any, or only one value `list.all(x, x < 10)`. - // * `filter` - test a predicate expression against the inputs and return - // the subset of elements which satisfy the predicate: - // `payments.filter(p, p > 1000)`. - // * `map` - apply an expression to all elements in the input and return the - // output aggregate type: `[1, 2, 3].map(i, i * i)`. - // - // The `has(m.x)` macro tests whether the property `x` is present in struct - // `m`. The semantics of this macro depend on the type of `m`. For proto2 - // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the - // macro tests whether the property is set to its default. For map and struct - // types, the macro tests whether the property `x` is defined on `m`. - // - // Comprehensions for the standard environment macros evaluation can be best - // visualized as the following pseudocode: - // - // ``` - // let `accu_var` = `accu_init` - // for (let `iter_var` in `iter_range`) { - // if (!`loop_condition`) { - // break - // } - // `accu_var` = `loop_step` - // } - // return `result` - // ``` - // - // Comprehensions for the optional V2 macros which support map-to-map - // translation differ slightly from the standard environment macros in that - // they expose both the key or index in addition to the value for each list - // or map entry: - // - // ``` - // let `accu_var` = `accu_init` - // for (let `iter_var`, `iter_var2` in `iter_range`) { - // if (!`loop_condition`) { - // break - // } - // `accu_var` = `loop_step` - // } - // return `result` - // ``` - message Comprehension { - // The name of the first iteration variable. - // For the single iteration variable macros, when iter_range is a list, this - // variable is the list element and when the iter_range is a map, this - // variable is the map key. - string iter_var = 1; - - // The name of the second iteration variable, empty if not set. - // This field is only set for comprehension v2 macros. - string iter_var2 = 8; - - // The range over which the comprehension iterates. - Expr iter_range = 2; - - // The name of the variable used for accumulation of the result. - string accu_var = 3; - - // The initial value of the accumulator. - Expr accu_init = 4; - - // An expression which can contain iter_var, iter_var2, and accu_var. - // - // Returns false when the result has been computed and may be used as - // a hint to short-circuit the remainder of the comprehension. - Expr loop_condition = 5; - - // An expression which can contain iter_var, iter_var2, and accu_var. - // - // Computes the next value of accu_var. - Expr loop_step = 6; - - // An expression which can contain accu_var. - // - // Computes the result. - Expr result = 7; - } - - // Required. An id assigned to this node by the parser which is unique in a - // given expression tree. This is used to associate type information and other - // attributes to a node in the parse tree. - int64 id = 2; - - // Required. Variants of expressions. - oneof expr_kind { - // A constant expression. - Constant const_expr = 3; - - // An identifier expression. - Ident ident_expr = 4; - - // A field selection expression, e.g. `request.auth`. - Select select_expr = 5; - - // A call expression, including calls to predefined functions and operators. - Call call_expr = 6; - - // A list creation expression. - CreateList list_expr = 7; - - // A map or message creation expression. - CreateStruct struct_expr = 8; - - // A comprehension expression. - Comprehension comprehension_expr = 9; - } -} - -// Represents a primitive literal. -// -// Named 'Constant' here for backwards compatibility. -// -// This is similar as the primitives supported in the well-known type -// `google.protobuf.Value`, but richer so it can represent CEL's full range of -// primitives. -// -// Lists and structs are not included as constants as these aggregate types may -// contain [Expr][cel.expr.Expr] elements which require evaluation and -// are thus not constant. -// -// Examples of constants include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, -// `true`, `null`. -message Constant { - // Required. The valid constant kinds. - oneof constant_kind { - // null value. - google.protobuf.NullValue null_value = 1; - - // boolean value. - bool bool_value = 2; - - // int64 value. - int64 int64_value = 3; - - // uint64 value. - uint64 uint64_value = 4; - - // double value. - double double_value = 5; - - // string value. - string string_value = 6; - - // bytes value. - bytes bytes_value = 7; - - // protobuf.Duration value. - // - // Deprecated: duration is no longer considered a builtin cel type. - google.protobuf.Duration duration_value = 8 [deprecated = true]; - - // protobuf.Timestamp value. - // - // Deprecated: timestamp is no longer considered a builtin cel type. - google.protobuf.Timestamp timestamp_value = 9 [deprecated = true]; - } -} - -// Source information collected at parse time. -message SourceInfo { - // The syntax version of the source, e.g. `cel1`. - string syntax_version = 1; - - // The location name. All position information attached to an expression is - // relative to this location. - // - // The location could be a file, UI element, or similar. For example, - // `acme/app/AnvilPolicy.cel`. - string location = 2; - - // Monotonically increasing list of code point offsets where newlines - // `\n` appear. - // - // The line number of a given position is the index `i` where for a given - // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The - // column may be derived from `id_positions[id] - line_offsets[i]`. - repeated int32 line_offsets = 3; - - // A map from the parse node id (e.g. `Expr.id`) to the code point offset - // within the source. - map positions = 4; - - // A map from the parse node id where a macro replacement was made to the - // call `Expr` that resulted in a macro expansion. - // - // For example, `has(value.field)` is a function call that is replaced by a - // `test_only` field selection in the AST. Likewise, the call - // `list.exists(e, e > 10)` translates to a comprehension expression. The key - // in the map corresponds to the expression id of the expanded macro, and the - // value is the call `Expr` that was replaced. - map macro_calls = 5; - - // A list of tags for extensions that were used while parsing or type checking - // the source expression. For example, optimizations that require special - // runtime support may be specified. - // - // These are used to check feature support between components in separate - // implementations. This can be used to either skip redundant work or - // report an error if the extension is unsupported. - repeated Extension extensions = 6; - - // An extension that was requested for the source expression. - message Extension { - // Version - message Version { - // Major version changes indicate different required support level from - // the required components. - int64 major = 1; - // Minor version changes must not change the observed behavior from - // existing implementations, but may be provided informationally. - int64 minor = 2; - } - - // CEL component specifier. - enum Component { - // Unspecified, default. - COMPONENT_UNSPECIFIED = 0; - // Parser. Converts a CEL string to an AST. - COMPONENT_PARSER = 1; - // Type checker. Checks that references in an AST are defined and types - // agree. - COMPONENT_TYPE_CHECKER = 2; - // Runtime. Evaluates a parsed and optionally checked CEL AST against a - // context. - COMPONENT_RUNTIME = 3; - } - - // Identifier for the extension. Example: constant_folding - string id = 1; - - // If set, the listed components must understand the extension for the - // expression to evaluate correctly. - // - // This field has set semantics, repeated values should be deduplicated. - repeated Component affected_components = 2; - - // Version info. May be skipped if it isn't meaningful for the extension. - // (for example constant_folding might always be v0.0). - Version version = 3; - } -} diff --git a/src/main/proto/cel/expr/value.proto b/src/main/proto/cel/expr/value.proto deleted file mode 100644 index 8315c2c..0000000 --- a/src/main/proto/cel/expr/value.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.expr; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option go_package = "cel.dev/expr"; -option java_multiple_files = true; -option java_outer_classname = "ValueProto"; -option java_package = "dev.cel.expr"; - -// Contains representations for CEL runtime values. - -// Represents a CEL value. -// -// This is similar to `google.protobuf.Value`, but can represent CEL's full -// range of values. -message Value { - // Required. The valid kinds of values. - oneof kind { - // Null value. - google.protobuf.NullValue null_value = 1; - - // Boolean value. - bool bool_value = 2; - - // Signed integer value. - int64 int64_value = 3; - - // Unsigned integer value. - uint64 uint64_value = 4; - - // Floating point value. - double double_value = 5; - - // UTF-8 string value. - string string_value = 6; - - // Byte string value. - bytes bytes_value = 7; - - // An enum value. - EnumValue enum_value = 9; - - // The proto message backing an object value. - google.protobuf.Any object_value = 10; - - // Map value. - MapValue map_value = 11; - - // List value. - ListValue list_value = 12; - - // Type value. - string type_value = 15; - } -} - -// An enum value. -message EnumValue { - // The fully qualified name of the enum type. - string type = 1; - - // The value of the enum. - int32 value = 2; -} - -// A list. -// -// Wrapped in a message so 'not set' and empty can be differentiated, which is -// required for use in a 'oneof'. -message ListValue { - // The ordered values in the list. - repeated Value values = 1; -} - -// A map. -// -// Wrapped in a message so 'not set' and empty can be differentiated, which is -// required for use in a 'oneof'. -message MapValue { - message Entry { - // The key. - // - // Must be unique with in the map. - // Currently only boolean, int, uint, and string values can be keys. - Value key = 1; - - // The value. - Value value = 2; - } - - // The set of map entries. - // - // CEL has fewer restrictions on keys, so a protobuf map representation - // cannot be used. - repeated Entry entries = 1; -} diff --git a/src/main/proto/cel/policy/policy.proto b/src/main/proto/cel/policy/policy.proto deleted file mode 100644 index e6a45f9..0000000 --- a/src/main/proto/cel/policy/policy.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2025 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package cel.policy; - -option cc_enable_arenas = true; -option go_package = "cel.dev/policy"; -option java_multiple_files = true; -option java_package = "dev.cel.policy"; - -message PolicySpec { - message Import { - string name = 1; - } - - message Variable { - string name = 1; - - string description = 2; - - string expression = 3; - } - - message Rule { - string id = 1; - - string description = 2; - - repeated Variable variables = 3; - - repeated Match match = 4; - } - - message Match { - // If unset, the default is "true". - optional string condition = 1; - - oneof action { - string output = 2; - - Rule rule = 3; - } - - string explanation = 4; - } - - string name = 1; - - repeated Import imports = 2; - - // If set, [PolicySpec][match] and [PolicySpec][rule] must be unset. - repeated Variable variables = 3; - // If set, [PolicySpec][match] and [PolicySpec][rule] must be unset. - optional string output = 4; - // If set, [PolicySpec][match] and [PolicySpec][rule] must be unset. - optional string description = 5; - // If set, [PolicySpec][match] and [PolicySpec][rule] must be unset. - optional string explanation = 6; - - // If set, [PolicySpec][variables], [PolicySpec][output], [PolicySpec][description], - // [PolicySpec][explanation], and [PolicySpec][rule] must be unset. - repeated Match match = 7; - - // If set, [PolicySpec][variables], [PolicySpec][output], [PolicySpec][description], - // [PolicySpec][explanation], and [PolicySpec][match] must be unset. - Rule rule = 8; -} diff --git a/src/main/proto/contrib/envoy/extensions/compression/qatzip/compressor/v3alpha/qatzip.proto b/src/main/proto/contrib/envoy/extensions/compression/qatzip/compressor/v3alpha/qatzip.proto deleted file mode 100644 index 5c8a3df..0000000 --- a/src/main/proto/contrib/envoy/extensions/compression/qatzip/compressor/v3alpha/qatzip.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.qatzip.compressor.v3alpha; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.qatzip.compressor.v3alpha"; -option java_outer_classname = "QatzipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/compression/qatzip/compressor/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Qatzip Compressor] -// Qatzip :ref:`configuration overview `. -// [#extension: envoy.compression.qatzip.compressor] - -// [#next-free-field: 6] -message Qatzip { - enum HardwareBufferSize { - DEFAULT = 0; - SZ_4K = 1; - SZ_8K = 2; - SZ_32K = 3; - SZ_64K = 4; - SZ_128K = 5; - SZ_512K = 6; - } - - // Value from 1 to 9 that controls the main compression speed-density lever. - // The higher quality, the slower compression. The default value is 1. - google.protobuf.UInt32Value compression_level = 1 [(validate.rules).uint32 = {lte: 9 gte: 1}]; - - // A size of qat hardware buffer. This field will be set to "DEFAULT" if not specified. - HardwareBufferSize hardware_buffer_size = 2 [(validate.rules).enum = {defined_only: true}]; - - // Threshold of compression service’s input size for software failover. - // If the size of input request less than the threshold, qatzip will route the request to software - // compressor. The default value is 1024. The maximum value is 512*1024. - google.protobuf.UInt32Value input_size_threshold = 3 - [(validate.rules).uint32 = {lte: 524288 gte: 128}]; - - // A size of stream buffer. The default value is 128 * 1024. The maximum value is 2*1024*1024 - - // 5*1024 - google.protobuf.UInt32Value stream_buffer_size = 4 - [(validate.rules).uint32 = {lte: 2092032 gte: 1024}]; - - // Value for compressor's next output buffer. If not set, defaults to 4096. - google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/src/main/proto/contrib/envoy/extensions/compression/qatzstd/compressor/v3alpha/qatzstd.proto b/src/main/proto/contrib/envoy/extensions/compression/qatzstd/compressor/v3alpha/qatzstd.proto deleted file mode 100644 index 182722d..0000000 --- a/src/main/proto/contrib/envoy/extensions/compression/qatzstd/compressor/v3alpha/qatzstd.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.qatzstd.compressor.v3alpha; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.qatzstd.compressor.v3alpha"; -option java_outer_classname = "QatzstdProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/compression/qatzstd/compressor/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Qatzstd Compressor] -// Qatzstd :ref:`configuration overview `. -// [#extension: envoy.compression.qatzstd.compressor] - -// [#next-free-field: 8] -message Qatzstd { - // Reference to http://facebook.github.io/zstd/zstd_manual.html - enum Strategy { - DEFAULT = 0; - FAST = 1; - DFAST = 2; - GREEDY = 3; - LAZY = 4; - LAZY2 = 5; - BTLAZY2 = 6; - BTOPT = 7; - BTULTRA = 8; - BTULTRA2 = 9; - } - - // Set compression parameters according to pre-defined compression level table. - // Note that exact compression parameters are dynamically determined, - // depending on both compression level and source content size (when known). - // Value 0 means default, and default level is 3. - // - // Setting a level does not automatically set all other compression parameters - // to default. Setting this will however eventually dynamically impact the compression - // parameters which have not been manually set. The manually set - // ones will 'stick'. - google.protobuf.UInt32Value compression_level = 1 [(validate.rules).uint32 = {lte: 22 gte: 1}]; - - // A 32-bits checksum of content is written at end of frame. If not set, defaults to false. - bool enable_checksum = 2; - - // The higher the value of selected strategy, the more complex it is, - // resulting in stronger and slower compression. - // - // Special: value 0 means "use default strategy". - Strategy strategy = 3 [(validate.rules).enum = {defined_only: true}]; - - // Value for compressor's next output buffer. If not set, defaults to 4096. - google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; - - // Enable QAT to accelerate Zstd compression or not. If not set, defaults to false. - // - // This is useful in the case that users want to enable QAT for a period of time and disable QAT for another period of time, - // they don't have to change the config too much or prepare for another config that has software zstd compressor and just changing the value of this filed. - bool enable_qat_zstd = 6; - - // Fallback to software for Qatzstd when input size is less than this value. - // Valid only ``enable_qat_zstd`` is ``true``. 0 means no fallback at all. If not set, defaults to 4000. - google.protobuf.UInt32Value qat_zstd_fallback_threshold = 7 - [(validate.rules).uint32 = {lte: 65536 gte: 0}]; -} diff --git a/src/main/proto/contrib/envoy/extensions/config/v3alpha/kv_store_xds_delegate_config.proto b/src/main/proto/contrib/envoy/extensions/config/v3alpha/kv_store_xds_delegate_config.proto deleted file mode 100644 index bc98274..0000000 --- a/src/main/proto/contrib/envoy/extensions/config/v3alpha/kv_store_xds_delegate_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.config.v3alpha; - -import "envoy/config/common/key_value/v3/config.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.config.v3alpha"; -option java_outer_classname = "KvStoreXdsDelegateConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/config/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#extension: envoy.xds_delegates.kv_store] -// -// Configuration for a KeyValueStore-based XdsResourcesDelegate implementation. This implementation -// updates the underlying KV store with xDS resources received from the configured management -// servers, enabling configuration to be persisted locally and used on startup in case connectivity -// with the xDS management servers could not be established. -// -// The KV Store based delegate's handling of wildcard resources (empty resource list or "*") is -// designed for use with O(100) resources or fewer, so it's not currently advised to use this -// feature for large configurations with heavy use of wildcard resources. -message KeyValueStoreXdsDelegateConfig { - // Configuration for the KeyValueStore that holds the xDS resources. - // [#allow-fully-qualified-name:] - .envoy.config.common.key_value.v3.KeyValueStoreConfig key_value_store_config = 1; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/common/workload_discovery/v3/discovery.proto b/src/main/proto/contrib/envoy/extensions/filters/common/workload_discovery/v3/discovery.proto deleted file mode 100644 index f64ebdf..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/common/workload_discovery/v3/discovery.proto +++ /dev/null @@ -1,249 +0,0 @@ -syntax = "proto3"; - -package istio.workload; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.istio.workload"; -option java_outer_classname = "DiscoveryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/istio/workload"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// -// Warning: Derived from -// https://github.com/istio/ztunnel/blob/e36680f1534fae3d158964500ae9185495ec5d7b/proto/workload.proto -// with the following changes: -// -// 1) change go_package; -// 2) append bootstrap extension stub; - -// NetworkMode indicates how the addresses of the workload should be treated. -enum NetworkMode { - // STANDARD means that the workload is uniquely identified by its address (within its network). - STANDARD = 0; - - // HOST_NETWORK means the workload has an IP address that is shared by many workloads. The data plane should avoid - // attempting to lookup these workloads by IP address (which could return the wrong result). - HOST_NETWORK = 1; -} - -enum WorkloadStatus { - // Workload is healthy and ready to serve traffic. - HEALTHY = 0; - - // Workload is unhealthy and NOT ready to serve traffic. - UNHEALTHY = 1; -} - -enum WorkloadType { - DEPLOYMENT = 0; - CRONJOB = 1; - POD = 2; - JOB = 3; -} - -// TunnelProtocol indicates the tunneling protocol for requests. -enum TunnelProtocol { - // NONE means requests should be forwarded as-is, without tunneling. - NONE = 0; - - // HBONE means requests should be tunneled over HTTP. - // This does not dictate HTTP/1.1 vs HTTP/2; ALPN should be used for that purpose. - HBONE = 1; - // Future options may include things like QUIC/HTTP3, etc. -} - -// Workload represents a workload - an endpoint (or collection behind a hostname). -// The xds primary key is "uid" as defined on the workload below. -// Secondary (alias) keys are the unique ``network/IP`` pairs that the workload can be reached at. -// [#next-free-field: 26] -message Workload { - reserved 15; - - // UID represents a globally unique opaque identifier for this workload. - // For k8s resources, it is recommended to use the more readable format: - // - // cluster/group/kind/namespace/name/section-name - // - // As an example, a ServiceEntry with two WorkloadEntries inlined could become - // two Workloads with the following UIDs: - // - cluster1/networking.istio.io/v1alpha3/ServiceEntry/default/external-svc/endpoint1 - // - cluster1/networking.istio.io/v1alpha3/ServiceEntry/default/external-svc/endpoint2 - // - // For VMs and other workloads other formats are also supported; for example, - // a single UID string: "0ae5c03d-5fb3-4eb9-9de8-2bd4b51606ba" - string uid = 20; - - // Name represents the name for the workload. - // For Kubernetes, this is the pod name. - // This is just for debugging and may be elided as an optimization. - string name = 1; - - // Namespace represents the namespace for the workload. - // This is just for debugging and may be elided as an optimization. - string namespace = 2; - - // Address represents the IPv4/IPv6 address for the workload. - // This should be globally unique. - // This should not have a port number. - // Each workload must have at least either an address or hostname; not both. - repeated bytes addresses = 3; - - // The hostname for the workload to be resolved by the ztunnel. - // DNS queries are sent on-demand by default. - // If the resolved DNS query has several endpoints, the request will be forwarded - // to the first response. - // - // At a minimum, each workload must have either an address or hostname. For example, - // a workload that backs a Kubernetes service will typically have only endpoints. A - // workload that backs a headless Kubernetes service, however, will have both - // addresses as well as a hostname used for direct access to the headless endpoint. - string hostname = 21; - - // Network represents the network this workload is on. This may be elided for the default network. - // A (network,address) pair makeup a unique key for a workload *at a point in time*. - string network = 4; - - // Protocol that should be used to connect to this workload. - TunnelProtocol tunnel_protocol = 5; - - // The SPIFFE identity of the workload. The identity is joined to form spiffe:///ns//sa/. - // TrustDomain of the workload. May be elided if this is the mesh wide default (typically cluster.local) - string trust_domain = 6; - - // ServiceAccount of the workload. May be elided if this is "default" - string service_account = 7; - - // If present, the waypoint proxy for this workload. - // All incoming requests must go through the waypoint. - GatewayAddress waypoint = 8; - - // If present, East West network gateway this workload can be reached through. - // Requests from remote networks should traverse this gateway. - GatewayAddress network_gateway = 19; - - // Name of the node the workload runs on - string node = 9; - - // CanonicalName for the workload. Used for telemetry. - string canonical_name = 10; - - // CanonicalRevision for the workload. Used for telemetry. - string canonical_revision = 11; - - // WorkloadType represents the type of the workload. Used for telemetry. - WorkloadType workload_type = 12; - - // WorkloadName represents the name for the workload (of type WorkloadType). Used for telemetry. - string workload_name = 13; - - // If set, this indicates a workload expects to directly receive tunnel traffic. - // In ztunnel, this means: - // * Requests *from* this workload do not need to be tunneled if they already are tunneled by the tunnel_protocol. - // * Requests *to* this workload, via the tunnel_protocol, do not need to be de-tunneled. - bool native_tunnel = 14; - - // If an application, such as a sandwiched waypoint proxy, supports directly - // receiving information from zTunnel they can set application_protocol. - ApplicationTunnel application_tunnel = 23; - - // The services for which this workload is an endpoint. - // The key is the NamespacedHostname string of the format namespace/hostname. - map services = 22; - - // A list of authorization policies applicable to this workload. - // NOTE: this *only* includes Selector based policies. Namespace and global polices - // are returned out of band. - // Authorization policies are only valid for workloads with ``addresses`` rather than ``hostname``. - repeated string authorization_policies = 16; - - WorkloadStatus status = 17; - - // The cluster ID that the workload instance belongs to - string cluster_id = 18; - - // The Locality defines information about where a workload is geographically deployed - Locality locality = 24; - - NetworkMode network_mode = 25; -} - -message Locality { - string region = 1; - - string zone = 2; - - string subzone = 3; -} - -// This represents the ports for a service -message PortList { - repeated Port ports = 1; -} - -message Port { - // Port the service is reached at (frontend). - uint32 service_port = 1; - - // Port the service forwards to (backend). - uint32 target_port = 2; -} - -// ApplicationProtocol specifies a workload (application or gateway) can -// consume tunnel information. -message ApplicationTunnel { - enum Protocol { - // Bytes are copied from the inner stream without modification. - NONE = 0; - - // Prepend PROXY protocol headers before copying bytes - // Standard PROXY source and destination information - // is included, along with potential extra TLV headers: - // 0xD0 - The SPIFFE identity of the source workload - // 0xD1 - The FQDN or Hostname of the targeted Service - PROXY = 1; - } - - // A target natively handles this type of traffic. - Protocol protocol = 1; - - // optional: if set, traffic should be sent to this port after the last zTunnel hop - uint32 port = 2; -} - -// GatewayAddress represents the address of a gateway -message GatewayAddress { - reserved 4; - - reserved "hbone_single_tls_port"; - - // address can either be a hostname (ex: gateway.example.com) or an IP (ex: 1.2.3.4). - oneof destination { - // TODO: add support for hostname lookup - NamespacedHostname hostname = 1; - - NetworkAddress address = 2; - } - - // port to reach the gateway at for mTLS HBONE connections - uint32 hbone_mtls_port = 3; -} - -// NetworkAddress represents an address bound to a specific network. -message NetworkAddress { - // Network represents the network this address is on. - string network = 1; - - // Address presents the IP (v4 or v6). - bytes address = 2; -} - -// NamespacedHostname represents a service bound to a specific namespace. -message NamespacedHostname { - // The namespace the service is in. - string namespace = 1; - - // hostname (ex: gateway.example.com) - string hostname = 2; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/common/workload_discovery/v3/extension.proto b/src/main/proto/contrib/envoy/extensions/filters/common/workload_discovery/v3/extension.proto deleted file mode 100644 index 1b6c114..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/common/workload_discovery/v3/extension.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package istio.workload; - -import "envoy/config/core/v3/config_source.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.istio.workload"; -option java_outer_classname = "ExtensionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/istio/workload"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -message BootstrapExtension { - envoy.config.core.v3.ConfigSource config_source = 1; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/alpn/v3/alpn.proto b/src/main/proto/contrib/envoy/extensions/filters/http/alpn/v3/alpn.proto deleted file mode 100644 index bb3ec50..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/alpn/v3/alpn.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package istio.envoy.config.filter.http.alpn.v2alpha1; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.istio.envoy.config.filter.http.alpn.v2alpha1"; -option java_outer_classname = "AlpnProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/istio/envoy/config/filter/http/alpn/v2alpha1"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ALPN HTTP filter] -// -// ALPN HTTP filter from Istio. -// -// [#extension: envoy.filters.http.alpn] - -// FilterConfig is the config for Istio-specific filter. -message FilterConfig { - // Upstream protocols - enum Protocol { - HTTP10 = 0; - HTTP11 = 1; - HTTP2 = 2; - } - - message AlpnOverride { - // Upstream protocol - Protocol upstream_protocol = 1; - - // A list of ALPN that will override the ALPN for upstream TLS connections. - repeated string alpn_override = 2; - } - - // Map from upstream protocol to list of ALPN - repeated AlpnOverride alpn_override = 1; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/checksum/v3alpha/checksum.proto b/src/main/proto/contrib/envoy/extensions/filters/http/checksum/v3alpha/checksum.proto deleted file mode 100644 index 4255437..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/checksum/v3alpha/checksum.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.checksum.v3alpha; - -import "envoy/type/matcher/v3/string.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.checksum.v3alpha"; -option java_outer_classname = "ChecksumProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/checksum/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Checksum HTTP filter] -// -// Filter to reject responses that don't match a specified checksum. -// To avoid holding the entire response in memory, the rejection occurs at the end of the stream. -// [#extension: envoy.filters.http.checksum] - -message ChecksumConfig { - message Checksum { - oneof matcher { - // A matcher for a path that is expected to have a specific checksum, as specified - // in the ``sha256`` field. - type.matcher.v3.StringMatcher path_matcher = 1 [(validate.rules).message = {required: true}]; - } - - // A hex-encoded sha256 string required to match the sha256sum of the response body - // of the path specified in the ``path_matcher`` field. - string sha256 = 2 [(validate.rules).string = {pattern: "^[a-fA-F0-9]{64}"}]; - } - - // A set of matcher and checksum pairs for which, if a path matching ``path_matcher`` - // is requested and the checksum of the response body does not match the ``sha256``, the - // response will be replaced with a 403 Forbidden status. - // - // If multiple matchers match the same path, the first to match takes precedence. - repeated Checksum checksums = 1; - - // If a request doesn't match any of the specified checksum paths and reject_unmatched is - // true, the request is rejected immediately with 403 Forbidden. - bool reject_unmatched = 2; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/dynamo/v3/dynamo.proto b/src/main/proto/contrib/envoy/extensions/filters/http/dynamo/v3/dynamo.proto deleted file mode 100644 index d0d4c8c..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/dynamo/v3/dynamo.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.dynamo.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.dynamo.v3"; -option java_outer_classname = "DynamoProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/dynamo/v3;dynamov3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamo] -// Dynamo :ref:`configuration overview `. -// [#extension: envoy.filters.http.dynamo] - -// Dynamo filter config. -message Dynamo { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.dynamo.v2.Dynamo"; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/golang/v3alpha/golang.proto b/src/main/proto/contrib/envoy/extensions/filters/http/golang/v3alpha/golang.proto deleted file mode 100644 index 84e87ff..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/golang/v3alpha/golang.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.golang.v3alpha; - -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; - -import "google/protobuf/any.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.golang.v3alpha"; -option java_outer_classname = "GolangProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/golang/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Golang HTTP filter] -// -// For an overview of the Golang HTTP filter please see the :ref:`configuration reference documentation `. -// [#extension: envoy.filters.http.golang] - -// [#next-free-field: 7] -message Config { - // The meanings are as follows: - // - // :``MERGE_VIRTUALHOST_ROUTER_FILTER``: Pass all configuration into Go plugin. - // :``MERGE_VIRTUALHOST_ROUTER``: Pass merged Virtual host and Router configuration into Go plugin. - // :``OVERRIDE``: Pass merged Virtual host, Router, and plugin configuration into Go plugin. - // - // [#not-implemented-hide:] - enum MergePolicy { - MERGE_VIRTUALHOST_ROUTER_FILTER = 0; - MERGE_VIRTUALHOST_ROUTER = 1; - OVERRIDE = 3; - } - - // Globally unique ID for a dynamic library file. - string library_id = 1 [(validate.rules).string = {min_len: 1}]; - - // Path to a dynamic library implementing the - // :repo:`StreamFilter API ` - // interface. - // [#comment:TODO(wangfakang): Support for downloading libraries from remote repositories.] - string library_path = 2 [(validate.rules).string = {min_len: 1}]; - - // Globally unique name of the Go plugin. - // - // This name **must** be consistent with the name registered in ``http::RegisterHttpFilterConfigFactory``, - // and can be used to associate :ref:`route and virtualHost plugin configuration - // `. - // - string plugin_name = 3 [(validate.rules).string = {min_len: 1}]; - - // Configuration for the Go plugin. - // - // .. note:: - // This configuration is only parsed in the go plugin, and is therefore not validated - // by Envoy. - // - // See the :repo:`StreamFilter API ` - // for more information about how the plugin's configuration data can be accessed. - // - google.protobuf.Any plugin_config = 4; - - // Merge policy for plugin configuration. - // - // The Go plugin configuration supports three dimensions: - // - // * Virtual host’s :ref:`typed_per_filter_config ` - // * Route’s :ref:`typed_per_filter_config ` - // * The filter's :ref:`plugin_config ` - // - // [#not-implemented-hide:] - MergePolicy merge_policy = 5 [(validate.rules).enum = {defined_only: true}]; - - // Generic secret list available to the plugin. - // Looks into SDS or static bootstrap configuration. - // - // See :repo:`StreamFilter API ` - // for more information about how to access secrets from Go. - repeated transport_sockets.tls.v3.SdsSecretConfig generic_secrets = 6; -} - -message RouterPlugin { - oneof override { - option (validate.required) = true; - - // [#not-implemented-hide:] - // Disable the filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // The config field is used for setting per-route and per-virtualhost plugin config. - google.protobuf.Any config = 2; - } -} - -message ConfigsPerRoute { - // Configuration of the Go plugin at the per-router or per-virtualhost level, - // keyed on the :ref:`plugin_name ` - // of the Go plugin. - // - map plugins_config = 1; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/istio_stats/v3/istio_stats.proto b/src/main/proto/contrib/envoy/extensions/filters/http/istio_stats/v3/istio_stats.proto deleted file mode 100644 index 27c528d..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/istio_stats/v3/istio_stats.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package stats; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.stats"; -option java_outer_classname = "IstioStatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/stats"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Istio stats HTTP filter] -// -// Istio stats HTTP filter for collecting and reporting metrics. -// [#extension: envoy.filters.http.istio_stats] - -enum MetricType { - COUNTER = 0; - GAUGE = 1; - HISTOGRAM = 2; -} - -// Specifies the proxy deployment type. -enum Reporter { - // Default value is inferred from the listener direction, as either client or - // server sidecar. - UNSPECIFIED = 0; - - // Shared server gateway, e.g. "waypoint". - SERVER_GATEWAY = 1; -} - -// Metric instance configuration overrides. -// The metric value and the metric type are optional and permit changing the -// reported value for an existing metric. -// The standard metrics are optimized and reported through a "fast-path". -// The customizations allow full configurability, at the cost of a "slower" -// path. -// [#next-free-field: 6] -message MetricConfig { - // (Optional) Collection of tag names and tag expressions to include in the - // metric. Conflicts are resolved by the tag name by overriding previously - // supplied values. - map dimensions = 1; - - // (Optional) Metric name to restrict the override to a metric. If not - // specified, applies to all. - string name = 2; - - // (Optional) A list of tags to remove. - repeated string tags_to_remove = 3; - - // NOT IMPLEMENTED. (Optional) Conditional enabling the override. - string match = 4; - - // (Optional) If this is set to true, the metric(s) selected by this - // configuration will not be generated or reported. - bool drop = 5; -} - -message MetricDefinition { - // Metric name. - string name = 1; - - // Metric value expression. - string value = 2; - - // Metric type. - MetricType type = 3; -} - -// [#next-free-field: 13] -message PluginConfig { - reserved 1, 2, 3, 4, 5; - - reserved "debug", "max_peer_cache_size", "stat_prefix", "field_separator", "value_separator"; - - // Optional: Disable using host header as a fallback if destination service is - // not available from the control plane. Disable the fallback if the host - // header originates outsides the mesh, like at ingress. - bool disable_host_header_fallback = 6; - - // Optional. Allows configuration of the time between calls out to for TCP - // metrics reporting. The default duration is ``5s``. - google.protobuf.Duration tcp_reporting_duration = 7; - - // Metric overrides. - repeated MetricConfig metrics = 8; - - // Metric definitions. - repeated MetricDefinition definitions = 9; - - // Proxy deployment type. - Reporter reporter = 10; - - // Metric scope rotation interval. Set to 0 to disable the metric scope rotation. - // Defaults to 0. - // DEPRECATED. - google.protobuf.Duration rotation_interval = 11; - - // Metric expiry graceful deletion interval. No-op if the metric rotation is disabled. - // Defaults to 5m. Must be >=1s. - // DEPRECATED. - google.protobuf.Duration graceful_deletion_interval = 12; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/language/v3alpha/language.proto b/src/main/proto/contrib/envoy/extensions/filters/http/language/v3alpha/language.proto deleted file mode 100644 index 74d3282..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/language/v3alpha/language.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.language.v3alpha; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.language.v3alpha"; -option java_outer_classname = "LanguageProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/language/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Language] -// Language :ref:`configuration overview `. -// [#extension: envoy.filters.http.language] - -// Language detection filter config. -message Language { - // The default language to be used as a fallback. - // The value will be included in the list of the supported languages. - // - // See https://unicode-org.github.io/icu/userguide/locale/ - string default_language = 1 [(validate.rules).string = {min_len: 2}]; - - // The set of supported languages. There is no order priority. - // The order will be determined by the Accept-Language header priority list - // of the client. - // - // See https://unicode-org.github.io/icu/userguide/locale/ - repeated string supported_languages = 2 [(validate.rules).repeated = { - min_items: 1 - unique: true - items {string {min_len: 2}} - }]; - - // If the x-language header is altered, clear the route cache for the current request. - // This should be set if the route configuration may depend on the x-language header. - // Otherwise it should be unset to avoid the performance cost of route recalculation. - bool clear_route_cache = 3; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/peak_ewma/v3alpha/peak_ewma.proto b/src/main/proto/contrib/envoy/extensions/filters/http/peak_ewma/v3alpha/peak_ewma.proto deleted file mode 100644 index 4c989b9..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/peak_ewma/v3alpha/peak_ewma.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.peak_ewma.v3alpha; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.peak_ewma.v3alpha"; -option java_outer_classname = "PeakEwmaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/peak_ewma/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Peak EWMA HTTP Filter] -// Configuration for the Peak EWMA HTTP filter. -// This filter measures request RTT and provides timing data to the Peak EWMA load balancer. - -// [#extension: envoy.filters.http.peak_ewma] -message PeakEwmaConfig { - option (xds.annotations.v3.message_status).work_in_progress = true; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/peer_metadata/v3/peer_metadata.proto b/src/main/proto/contrib/envoy/extensions/filters/http/peer_metadata/v3/peer_metadata.proto deleted file mode 100644 index 099daf2..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/peer_metadata/v3/peer_metadata.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; - -package io.istio.http.peer_metadata; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.io.istio.http.peer_metadata"; -option java_outer_classname = "PeerMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/io/istio/http/peer_metadata"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Peer metadata HTTP filter] -// -// Peer metadata HTTP filter for deriving and propagating peer telemetry attributes. -// [#extension: envoy.filters.http.peer_metadata] - -// Peer metadata provider filter. This filter encapsulates the discovery of the -// peer telemetry attributes for consumption by the telemetry filters. -// [#next-free-field: 7] -message Config { - // DEPRECATED. - // This method uses ``baggage`` header encoding. - message Baggage { - } - - // This method uses the workload metadata xDS. Requires that the bootstrap extension is enabled. - // For downstream discovery, the remote address is the lookup key in xDS. - // For upstream discovery: - // - // * If the upstream host address is an IP, this IP is used as the lookup key; - // * If the upstream host address is internal, uses the - // ``filter_metadata.tunnel.destination`` dynamic metadata value as the lookup key. - // - message WorkloadDiscovery { - } - - // This method uses Istio HTTP metadata exchange headers, e.g. ``x-envoy-peer-metadata``. Removes these headers if found. - message IstioHeaders { - // Strip ``x-envoy-peer-metadata`` and ``x-envoy-peer-metadata-id`` headers on HTTP requests to services outside the mesh. - // Detects upstream clusters with ``istio`` and ``external`` filter metadata fields - bool skip_external_clusters = 1; - } - - // An exhaustive list of the derivation methods. - message DiscoveryMethod { - oneof method_specifier { - Baggage baggage = 1; - - WorkloadDiscovery workload_discovery = 2; - - IstioHeaders istio_headers = 3; - } - } - - // An exhaustive list of the metadata propagation methods. - message PropagationMethod { - oneof method_specifier { - IstioHeaders istio_headers = 1; - } - } - - // The order of the derivation of the downstream peer metadata, in the precedence order. - // First successful lookup wins. - repeated DiscoveryMethod downstream_discovery = 1; - - // The order of the derivation of the upstream peer metadata, in the precedence order. - // First successful lookup wins. - repeated DiscoveryMethod upstream_discovery = 2; - - // Downstream injection of the metadata via a response header. - repeated PropagationMethod downstream_propagation = 3; - - // Upstream injection of the metadata via a request header. - repeated PropagationMethod upstream_propagation = 4; - - // True to enable sharing with the upstream. - bool shared_with_upstream = 5; - - // Additional labels to be added to the peer metadata to help your understand the traffic. - // e.g. ``role``, ``location`` etc. - repeated string additional_labels = 6; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/http/sxg/v3alpha/sxg.proto b/src/main/proto/contrib/envoy/extensions/filters/http/sxg/v3alpha/sxg.proto deleted file mode 100644 index 7f8dd14..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/http/sxg/v3alpha/sxg.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.sxg.v3alpha; - -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.sxg.v3alpha"; -option java_outer_classname = "SxgProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/sxg/v3alpha"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Signed HTTP Exchange Filter] -// SXG :ref:`configuration overview `. -// [#extension: envoy.filters.http.sxg] - -// [#next-free-field: 10] -message SXG { - // The SDS configuration for the public key data for the SSL certificate that will be used to sign the - // SXG response. - transport_sockets.tls.v3.SdsSecretConfig certificate = 1; - - // The SDS configuration for the private key data for the SSL certificate that will be used to sign the - // SXG response. - transport_sockets.tls.v3.SdsSecretConfig private_key = 2; - - // The duration for which the generated SXG package will be valid. Default is 604800s (7 days in seconds). - // Note that in order to account for clock skew, the timestamp will be backdated by a day. So, if duration - // is set to 7 days, that will be 7 days from 24 hours ago (6 days from now). Also note that while 6/7 days - // is appropriate for most content, if the downstream service is serving Javascript, or HTML with inline - // Javascript, 1 day (so, with backdated expiry, 2 days, or 172800 seconds) is more appropriate. - google.protobuf.Duration duration = 3; - - // The SXG response payload is Merkle Integrity Content Encoding (MICE) encoded (specification is [here](https://datatracker.ietf.org/doc/html/draft-thomson-http-mice-03)) - // This value indicates the record size in the encoded payload. The default value is 4096. - uint64 mi_record_size = 4; - - // The URI of certificate CBOR file published. Since it is required that the certificate CBOR file - // be served from the same domain as the SXG document, this should be a relative URI. - string cbor_url = 5 [(validate.rules).string = {min_len: 1 prefix: "/"}]; - - // URL to retrieve validity data for signature, a CBOR map. See specification [here](https://tools.ietf.org/html/draft-yasskin-httpbis-origin-signed-exchanges-impl-00#section-3.6) - string validity_url = 6 [(validate.rules).string = {min_len: 1 prefix: "/"}]; - - // Header that will be set if it is determined that the client can accept SXG (typically ``accept: application/signed-exchange;v=b3``) - // If not set, filter will default to: ``x-client-can-accept-sxg`` - string client_can_accept_sxg_header = 7 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false ignore_empty: true} - ]; - - // Header set by downstream service to signal that the response should be transformed to SXG If not set, - // filter will default to: ``x-should-encode-sxg`` - string should_encode_sxg_header = 8 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false ignore_empty: true} - ]; - - // Headers that will be stripped from the SXG document, by listing a prefix (i.e. ``x-custom-`` will cause - // all headers prefixed by ``x-custom-`` to be omitted from the SXG document) - repeated string header_prefix_filters = 9 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/listener/postgres_inspector/v3alpha/postgres_inspector.proto b/src/main/proto/contrib/envoy/extensions/filters/listener/postgres_inspector/v3alpha/postgres_inspector.proto deleted file mode 100644 index 6063d3c..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/listener/postgres_inspector/v3alpha/postgres_inspector.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.postgres_inspector.v3alpha; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.postgres_inspector.v3alpha"; -option java_outer_classname = "PostgresInspectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/listener/postgres_inspector/v3alpha"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Postgres Inspector] -// Postgres Inspector :ref:`configuration overview `. -// [#extension: envoy.filters.listener.postgres_inspector] - -message PostgresInspector { - // Enable extraction of connection metadata (user, database, application name) from - // the startup message. This metadata is made available for access logging and stats. - // - // Defaults to ``true``. - google.protobuf.BoolValue enable_metadata_extraction = 1; - - // The maximum size of the startup message that the postgres inspector will accept. - // Messages larger than this will be rejected. If not specified, defaults to 10KB. - // - // PostgreSQL defines MAX_STARTUP_PACKET_LENGTH as 10KB. - // Valid range is 256 bytes to 10KB. - google.protobuf.UInt32Value max_startup_message_size = 2 - [(validate.rules).uint32 = {lte: 10000 gte: 256}]; - - // Timeout for the inspector to receive and process the startup message. - // The timeout starts when the connection is accepted by the listener. - // If the timeout is reached before the startup message is fully received and processed, - // the connection will be closed. - // - // If not specified, defaults to 10 seconds. Minimum is 1 second. - google.protobuf.Duration startup_timeout = 3 [(validate.rules).duration = {gte {seconds: 1}}]; -} - -// StartupMetadata stores connection attributes extracted from the PostgreSQL startup message. -// This is attached as typed dynamic metadata under the key ``envoy.postgres_inspector``. -message StartupMetadata { - // The username supplied in the startup message. - string user = 1; - - // The database name supplied in the startup message. If not provided, it may default to the user name. - string database = 2; - - // The application name supplied in the startup message. - string application_name = 3; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto b/src/main/proto/contrib/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto deleted file mode 100644 index 80fd093..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/client_ssl_auth/v3/client_ssl_auth.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.client_ssl_auth.v3; - -import "envoy/config/core/v3/address.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.client_ssl_auth.v3"; -option java_outer_classname = "ClientSslAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/client_ssl_auth/v3;client_ssl_authv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Client TLS authentication] -// Client TLS authentication -// :ref:`configuration overview `. -// [#extension: envoy.filters.network.client_ssl_auth] - -message ClientSSLAuth { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.client_ssl_auth.v2.ClientSSLAuth"; - - // The :ref:`cluster manager ` cluster that runs - // the authentication service. The filter will connect to the service every 60s to fetch the list - // of principals. The service must support the expected :ref:`REST API - // `. - string auth_api_cluster = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 2 [(validate.rules).string = {min_len: 1}]; - - // Time in milliseconds between principal refreshes from the - // authentication service. Default is 60000 (60s). The actual fetch time - // will be this value plus a random jittered value between - // 0-refresh_delay_ms milliseconds. - google.protobuf.Duration refresh_delay = 3; - - // An optional list of IP address and subnet masks that should be white - // listed for access by the filter. If no list is provided, there is no - // IP allowlist. - repeated config.core.v3.CidrRange ip_white_list = 4 - [(udpa.annotations.field_migrate).rename = "ip_allowlist"]; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3/kafka.proto b/src/main/proto/contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3/kafka.proto deleted file mode 100644 index 0e6998f..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3/kafka.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.codecs.kafka.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.codecs.kafka.v3"; -option java_outer_classname = "KafkaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/generic_proxy/codecs/kafka/v3;kafkav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Kafka codec configuration for Generic Proxy] -// [#extension: envoy.generic_proxy.codecs.kafka] - -// Configuration for Kafka codec. This codec gives the generic proxy the ability to proxy -// Kafka traffic. But note any route configuration for Kafka traffic is not supported yet. -// The generic proxy can only used to generate logs or metrics for Kafka traffic but cannot -// do matching or routing. -// -// .. note:: -// The codec can currently only be used in the sidecar mode. And to ensure the codec works -// properly, please make sure the following conditions are met: -// -// 1. The generic proxy must be configured with a wildcard route that matches all traffic. -// 2. The target cluster must be configured as a original destination cluster. -// 3. The :ref:`bind_upstream_connection -// ` -// of generic proxy router must be set to true to ensure same upstream connection is used -// for all traffic from same downstream connection. -message KafkaCodecConfig { -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/golang/v3alpha/golang.proto b/src/main/proto/contrib/envoy/extensions/filters/network/golang/v3alpha/golang.proto deleted file mode 100644 index e4ef538..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/golang/v3alpha/golang.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.golang.v3alpha; - -import "google/protobuf/any.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.golang.v3alpha"; -option java_outer_classname = "GolangProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/golang/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Golang network filter] -// -// Golang network filter :ref:`configuration overview `. -// [#extension: envoy.filters.network.golang] - -// [#next-free-field: 6] -message Config { - // Bool ``true`` if this filter must be the last filter in a filter chain, ``false`` otherwise. - bool is_terminal_filter = 1; - - // Globally unique ID for a dynamic library file. - string library_id = 2 [(validate.rules).string = {min_len: 1}]; - - // Path to a dynamic library implementing the - // :repo:`DownstreamFilter API ` - // interface. - // [#comment:TODO(wangfakang): Support for downloading libraries from remote repositories.] - string library_path = 3 [(validate.rules).string = {min_len: 1}]; - - // Globally unique name of the Go plugin. - // - // This name **must** be consistent with the name registered in ``network::RegisterNetworkFilterConfigFactory`` - // - string plugin_name = 4 [(validate.rules).string = {min_len: 1}]; - - // Configuration for the Go plugin. - // - // .. note:: - // This configuration is only parsed in the go plugin, and is therefore not validated - // by Envoy. - // - // See the :repo:`DownstreamFilter API ` - // for more information about how the plugin's configuration data can be accessed. - // - google.protobuf.Any plugin_config = 5; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto b/src/main/proto/contrib/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto deleted file mode 100644 index 926fdb5..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/kafka_broker/v3/kafka_broker.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.kafka_broker.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.kafka_broker.v3"; -option java_outer_classname = "KafkaBrokerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/kafka_broker/v3;kafka_brokerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Kafka Broker] -// Kafka Broker :ref:`configuration overview `. -// [#extension: envoy.filters.network.kafka_broker] -// [#next-free-field: 6] -message KafkaBroker { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.kafka_broker.v2alpha1.KafkaBroker"; - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Set to true if broker filter should attempt to serialize the received responses from the - // upstream broker instead of passing received bytes as is. - // Disabled by default. - bool force_response_rewrite = 2; - - // Optional broker address rewrite specification. - // Allows the broker filter to rewrite Kafka responses so that all connections established by - // the Kafka clients point to Envoy. - // This allows Kafka cluster not to configure its 'advertised.listeners' property - // (as the necessary re-pointing will be done by this filter). - // This collection of rules should cover all brokers in the cluster that is being proxied, - // otherwise some nodes' addresses might leak to the downstream clients. - oneof broker_address_rewrite_spec { - // Broker address rewrite rules that match by broker ID. - IdBasedBrokerRewriteSpec id_based_broker_address_rewrite_spec = 3; - } - - // Optional list of allowed Kafka API keys. Only requests with provided API keys will be - // routed, otherwise the connection will be closed. No effect if empty. - repeated uint32 api_keys_allowed = 4 - [(validate.rules).repeated = {items {uint32 {lte: 32767 gte: 0}}}]; - - // Optional list of denied Kafka API keys. Requests with API keys matching this list will have - // the connection closed. No effect if empty. - repeated uint32 api_keys_denied = 5 - [(validate.rules).repeated = {items {uint32 {lte: 32767 gte: 0}}}]; -} - -// Collection of rules matching by broker ID. -message IdBasedBrokerRewriteSpec { - repeated IdBasedBrokerRewriteRule rules = 1; -} - -// Defines a rule to rewrite broker address data. -message IdBasedBrokerRewriteRule { - // Broker ID to match. - uint32 id = 1 [(validate.rules).uint32 = {gte: 0}]; - - // The host value to use (resembling the host part of Kafka's advertised.listeners). - // The value should point to the Envoy (not Kafka) listener, so that all client traffic goes - // through Envoy. - string host = 2 [(validate.rules).string = {min_len: 1}]; - - // The port value to use (resembling the port part of Kafka's advertised.listeners). - // The value should point to the Envoy (not Kafka) listener, so that all client traffic goes - // through Envoy. - uint32 port = 3 [(validate.rules).uint32 = {lte: 65535}]; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/kafka_mesh/v3alpha/kafka_mesh.proto b/src/main/proto/contrib/envoy/extensions/filters/network/kafka_mesh/v3alpha/kafka_mesh.proto deleted file mode 100644 index 26336dc..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/kafka_mesh/v3alpha/kafka_mesh.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.kafka_mesh.v3alpha; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.kafka_mesh.v3alpha"; -option java_outer_classname = "KafkaMeshProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/kafka_mesh/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Kafka Mesh] -// Kafka Mesh :ref:`configuration overview `. -// [#extension: envoy.filters.network.kafka_mesh] - -// [#next-free-field: 6] -message KafkaMesh { - enum ConsumerProxyMode { - // Records received are going to be distributed amongst downstream consumer connections. - // In this mode Envoy uses librdkafka consumers pointing at upstream Kafka clusters, what means that these - // consumers' position is meaningful and affects what records are received from upstream. - // Users might want to take a look into these consumers' custom configuration to manage their auto-committing - // capabilities, as it will impact Envoy's behaviour in case of restarts. - StatefulConsumerProxy = 0; - } - - // Envoy's host that's advertised to clients. - // Has the same meaning as corresponding Kafka broker properties. - // Usually equal to filter chain's listener config, but needs to be reachable by clients - // (so 0.0.0.0 will not work). - string advertised_host = 1 [(validate.rules).string = {min_len: 1}]; - - // Envoy's port that's advertised to clients. - int32 advertised_port = 2 [(validate.rules).int32 = {gt: 0}]; - - // Upstream clusters this filter will connect to. - repeated KafkaClusterDefinition upstream_clusters = 3; - - // Rules that will decide which cluster gets which request. - repeated ForwardingRule forwarding_rules = 4; - - // How the consumer proxying should behave - this relates mostly to Fetch request handling. - ConsumerProxyMode consumer_proxy_mode = 5; -} - -// [#next-free-field: 6] -message KafkaClusterDefinition { - // Cluster name. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // Kafka cluster address. - string bootstrap_servers = 2 [(validate.rules).string = {min_len: 1}]; - - // Default number of partitions present in this cluster. - // This is especially important for clients that do not specify partition in their payloads and depend on this value for hashing. - // The same number of partitions is going to be used by upstream-pointing Kafka consumers for consumer proxying scenarios. - int32 partition_count = 3 [(validate.rules).int32 = {gt: 0}]; - - // Custom configuration passed to Kafka producer. - map producer_config = 4; - - // Custom configuration passed to Kafka consumer. - map consumer_config = 5; -} - -message ForwardingRule { - // Cluster name. - string target_cluster = 1; - - oneof trigger { - // Intended place for future types of forwarding rules. - string topic_prefix = 2; - } -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/metadata_exchange/v3/metadata_exchange.proto b/src/main/proto/contrib/envoy/extensions/filters/network/metadata_exchange/v3/metadata_exchange.proto deleted file mode 100644 index 2eb8171..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/metadata_exchange/v3/metadata_exchange.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.tcp.metadataexchange.config; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.tcp.metadataexchange.config"; -option java_outer_classname = "MetadataExchangeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/tcp/metadataexchange/config"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Metadata exchange TCP filter] -// -// Metadata exchange TCP filter for deriving and propagating peer telemetry attributes. -// [#extension: envoy.filters.network.metadata_exchange] - -// [#protodoc-title: MetadataExchange protocol match and data transfer] -// MetadataExchange protocol match and data transfer -message MetadataExchange { - // Protocol that Alpn should support on the server. - // [#comment:TODO(GargNupur): Make it a list.] - string protocol = 1; - - // If true, will attempt to use WDS in case the prefix peer metadata is not available. - bool enable_discovery = 2; - - // Additional labels to be added to the peer metadata to help your understand the traffic. - // e.g. ``role``, ``location`` etc. - repeated string additional_labels = 3; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto b/src/main/proto/contrib/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto deleted file mode 100644 index f3f2cef..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/mysql_proxy/v3/mysql_proxy.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.mysql_proxy.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.mysql_proxy.v3"; -option java_outer_classname = "MysqlProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/mysql_proxy/v3;mysql_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: MySQL proxy] -// MySQL Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.mysql_proxy] - -message MySQLProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.mysql_proxy.v1alpha1.MySQLProxy"; - - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // [#not-implemented-hide:] The optional path to use for writing MySQL access logs. - // If the access log field is empty, access logs will not be written. - string access_log = 2; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto b/src/main/proto/contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto deleted file mode 100644 index 2bd063a..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha/postgres_proxy.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.postgres_proxy.v3alpha; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.postgres_proxy.v3alpha"; -option java_outer_classname = "PostgresProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/postgres_proxy/v3alpha"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Postgres proxy] -// Postgres Proxy :ref:`configuration overview -// `. -// [#extension: envoy.filters.network.postgres_proxy] - -// [#next-free-field: 6] -message PostgresProxy { - // Downstream and Upstream SSL operational modes. - enum SSLMode { - // If used in downstream ssl, do not terminate SSL session initiated by a client. - // The Postgres proxy filter will pass all encrypted and unencrypted packets to the upstream server. - // If used in upstream ssl, do not encrypt upstream connection to the server. - DISABLE = 0; - - // If used in downstream ssl, the Postgres proxy filter will terminate SSL - // session and close downstream connections that refuse to upgrade to SSL. - // If used in upstream SSL, establish upstream SSL connection to the server. If the server does not - // accept the request for SSL connection, the session is terminated. - REQUIRE = 1; - - // If used in downstream SSL, the Postgres proxy filter will accept downstream - // client's encryption settings. If the client wants to use clear-text, - // Envoy will not enforce SSL encryption. - // If the client wants to use encryption, Envoy will terminate SSL. - ALLOW = 2; - } - - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Controls whether SQL statements received in Frontend Query messages - // are parsed. Parsing is required to produce Postgres proxy filter - // metadata. Defaults to true. - google.protobuf.BoolValue enable_sql_parsing = 2; - - // Controls whether to terminate SSL session initiated by a client. - // If the value is false, the Postgres proxy filter will not try to - // terminate SSL session, but will pass all the packets to the upstream server. - // If the value is true, the Postgres proxy filter will try to terminate SSL - // session. In order to do that, the filter chain must use :ref:`starttls transport socket - // `. - // If the filter does not manage to terminate the SSL session, it will close the connection from the client. - // Refer to official documentation for details - // `SSL Session Encryption Message Flow `_. - // This field is deprecated. - // Please use :ref:`downstream_ssl `. - bool terminate_ssl = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Controls whether to establish upstream SSL connection to the server. - // Envoy will try to establish upstream SSL connection to the server only when - // Postgres filter is able to read Postgres payload in clear-text. It happens when - // a client established a clear-text connection to Envoy or when a client established - // SSL connection to Envoy and Postgres filter is configured to terminate SSL. - // In order for upstream encryption to work, the corresponding cluster must be configured to use - // :ref:`starttls transport socket `. - // Defaults to ``DISABLE``. - SSLMode upstream_ssl = 4; - - // Controls whether to close downstream connections that refuse to upgrade to SSL. - // If enabled, the filter chain must use - // :ref:`starttls transport socket `. - // Defaults to ``DISABLE``. - SSLMode downstream_ssl = 5; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto b/src/main/proto/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto deleted file mode 100644 index cca6abb..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/rocketmq_proxy.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rocketmq_proxy.v3; - -import "contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v3"; -option java_outer_classname = "RocketmqProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3;rocketmq_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RocketMQ Proxy] -// RocketMQ Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.rocketmq_proxy] - -message RocketmqProxy { - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The route table for the connection manager is specified in this property. - RouteConfiguration route_config = 2; - - // The largest duration transient object expected to live, more than 10s is recommended. - google.protobuf.Duration transient_object_life_span = 3; - - // If develop_mode is enabled, this proxy plugin may work without dedicated traffic intercepting - // facility without considering backward compatibility of exiting RocketMQ client SDK. - bool develop_mode = 4; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto b/src/main/proto/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto deleted file mode 100644 index 2810aab..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3/route.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rocketmq_proxy.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rocketmq_proxy.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/rocketmq_proxy/v3;rocketmq_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rocketmq Proxy Route Configuration] -// Rocketmq Proxy :ref:`configuration overview `. - -message RouteConfiguration { - // The name of the route configuration. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; -} - -message Route { - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - // The name of the topic. - type.matcher.v3.StringMatcher topic = 1 [(validate.rules).message = {required: true}]; - - // Specifies a set of headers that the route should match on. The router will check the request’s - // headers against all the specified headers in the route config. A match will happen if all the - // headers in the route are present in the request with the same values (or based on presence if - // the value field is not in the config). - repeated config.route.v3.HeaderMatcher headers = 2; -} - -message RouteAction { - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. - config.core.v3.Metadata metadata_match = 2; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha/router.proto b/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha/router.proto deleted file mode 100644 index b4bb279..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha/router.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.sip_proxy.router.v3alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.router.v3alpha"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/sip_proxy/router/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Router] -// [#extension: envoy.filters.sip.router] - -message Router { -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto b/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto deleted file mode 100644 index daeff26..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto +++ /dev/null @@ -1,132 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.sip_proxy.tra.v3alpha; - -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/grpc_service.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.tra.v3alpha"; -option java_outer_classname = "TraProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: TRA] - -service TraService { - rpc Create(TraServiceRequest) returns (TraServiceResponse) { - } - - rpc Update(TraServiceRequest) returns (TraServiceResponse) { - } - - rpc Retrieve(TraServiceRequest) returns (TraServiceResponse) { - } - - rpc Delete(TraServiceRequest) returns (TraServiceResponse) { - } - - rpc Subscribe(TraServiceRequest) returns (stream TraServiceResponse) { - } -} - -message TraServiceConfig { - // Specifies the gRPC service that hosts the rate limit service. The client - // will connect to this cluster when it needs to make rate limit service - // requests. - config.core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; - - // API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and - // version of messages used on the wire. - config.core.v3.ApiVersion transport_api_version = 2 - [(validate.rules).enum = {defined_only: true}]; - - google.protobuf.Duration timeout = 3; -} - -// [#next-free-field: 7] -message TraServiceRequest { - string type = 1; - - oneof request { - CreateRequest create_request = 2; - - UpdateRequest update_request = 3; - - RetrieveRequest retrieve_request = 4; - - DeleteRequest delete_request = 5; - - SubscribeRequest subscribe_request = 6; - } -} - -// [#next-free-field: 9] -message TraServiceResponse { - string type = 1; - - int32 ret = 2; - - string reason = 3; - - oneof response { - CreateResponse create_response = 4; - - UpdateResponse update_response = 5; - - RetrieveResponse retrieve_response = 6; - - DeleteResponse delete_response = 7; - - SubscribeResponse subscribe_response = 8; - } -} - -message CreateRequest { - map data = 1; - - map context = 2; -} - -message CreateResponse { -} - -message UpdateRequest { - map data = 1; - - map context = 2; -} - -message UpdateResponse { -} - -message RetrieveRequest { - string key = 1; - - map context = 2; -} - -message RetrieveResponse { - map data = 1; -} - -message DeleteRequest { - string key = 1; - - map context = 2; -} - -message DeleteResponse { -} - -message SubscribeRequest { -} - -message SubscribeResponse { - map data = 1; -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto b/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto deleted file mode 100644 index 614f1c5..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.sip_proxy.v3alpha; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.v3alpha"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Sip Proxy Route Configuration] - -message RouteConfiguration { - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; -} - -message Route { - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - oneof match_specifier { - option (validate.required) = true; - - // The domain from Request URI or Route Header. - string domain = 1; - } - - // The header to get match parameter, default is "Route". - string header = 2; - - // The parameter to get domain, default is "host". - string parameter = 3; -} - -message RouteAction { - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates a single upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - } -} diff --git a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/sip_proxy.proto b/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/sip_proxy.proto deleted file mode 100644 index 99396f3..0000000 --- a/src/main/proto/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/sip_proxy.proto +++ /dev/null @@ -1,161 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.sip_proxy.v3alpha; - -import "contrib/envoy/extensions/filters/network/sip_proxy/tra/v3alpha/tra.proto"; -import "contrib/envoy/extensions/filters/network/sip_proxy/v3alpha/route.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sip_proxy.v3alpha"; -option java_outer_classname = "SipProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/network/sip_proxy/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Sip Proxy] -// [#extension: envoy.filters.network.sip_proxy] - -message SipProxy { - message SipSettings { - // transaction timeout timer [Timer B] unit is milliseconds, default value 64*T1. - // - // Session Initiation Protocol (SIP) timer summary - // - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer | Default value | Section | Meaning | - // +=========+=========================+==========+==============================================================================+ - // | T1 | 500 ms | 17.1.1.1 | Round-trip time (RTT) estimate | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | T2 | 4 sec | 17.1.2.2 | Maximum re-transmission interval for non-INVITE requests and INVITE responses| - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | T4 | 5 sec | 17.1.2.2 | Maximum duration that a message can remain in the network | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer A | initially T1 | 17.1.1.2 | INVITE request re-transmission interval, for UDP only | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer B | 64*T1 | 17.1.1.2 | INVITE transaction timeout timer | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer D | > 32 sec. for UDP | 17.1.1.2 | Wait time for response re-transmissions | - // | | 0 sec. for TCP and SCTP | | | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer E | initially T1 | 17.1.2.2 | Non-INVITE request re-transmission interval, UDP only | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer F | 64*T1 | 17.1.2.2 | Non-INVITE transaction timeout timer | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer G | initially T1 | 17.2.1 | INVITE response re-transmission interval | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer H | 64*T1 | 17.2.1 | Wait time for ACK receipt | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer I | T4 for UDP | 17.2.1 | Wait time for ACK re-transmissions | - // | | 0 sec. for TCP and SCTP | | | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer J | 64*T1 for UDP | 17.2.2 | Wait time for re-transmissions of non-INVITE requests | - // | | 0 sec. for TCP and SCTP | | | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - // | Timer K | T4 for UDP | 17.1.2.2 | Wait time for response re-transmissions | - // | | 0 sec. for TCP and SCTP | | | - // +---------+-------------------------+----------+------------------------------------------------------------------------------+ - google.protobuf.Duration transaction_timeout = 1; - - // The service to match for ep insert - repeated LocalService local_services = 2; - - tra.v3alpha.TraServiceConfig tra_service_config = 3; - - // Whether via header is operated, including add via for request and pop via for response - // False: sip service proxy - // True: sip load balancer - bool operate_via = 4; - } - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The route table for the connection manager is static and is specified in this property. - RouteConfiguration route_config = 2; - - // A list of individual Sip filters that make up the filter chain for requests made to the - // Sip proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no sip_filters are specified, a default Sip router filter - // (``envoy.filters.sip.router``) is used. - // [#extension-category: envoy.sip_proxy.filters] - repeated SipFilter sip_filters = 3; - - SipSettings settings = 4; -} - -// SipFilter configures a Sip filter. -message SipFilter { - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// SipProtocolOptions specifies Sip upstream protocol options. This object is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name ``envoy.filters.network.sip_proxy``. -message SipProtocolOptions { - // All sip messages in one dialog should go to the same endpoint. - bool session_affinity = 1; - - // The Register with Authorization header should go to the same endpoint which send out the 401 Unauthorized. - bool registration_affinity = 2; - - // Customized affinity - CustomizedAffinity customized_affinity = 3; -} - -// For affinity -message CustomizedAffinity { - // Affinity rules to conclude the upstream endpoint - repeated CustomizedAffinityEntry entries = 1; - - // Configures whether load balance should be stopped or continued after affinity handling. - bool stop_load_balance = 2; -} - -// [#next-free-field: 6] -message CustomizedAffinityEntry { - // The header name to match, e.g. "From", if not specified, default is "Route" - string header = 1; - - // Affinity key for TRA query/subscribe, e.g. "lskpmc", if key_name is "text" means use the header content as key. - string key_name = 2; - - // Whether subscribe to TRA is required - bool subscribe = 3; - - // Whether query to TRA is required - bool query = 4; - - // Local cache - Cache cache = 5; -} - -message Cache { - // Affinity local cache item max number - int32 max_cache_item = 1; - - // Whether query result can be added to local cache - bool add_query_to_cache = 2; -} - -// Local Service -message LocalService { - // The domain need to matched - string domain = 1; - - // The parameter to get domain - string parameter = 2; -} diff --git a/src/main/proto/contrib/envoy/extensions/load_balancing_policies/peak_ewma/v3alpha/peak_ewma.proto b/src/main/proto/contrib/envoy/extensions/load_balancing_policies/peak_ewma/v3alpha/peak_ewma.proto deleted file mode 100644 index 09886bd..0000000 --- a/src/main/proto/contrib/envoy/extensions/load_balancing_policies/peak_ewma/v3alpha/peak_ewma.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.peak_ewma.v3alpha; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.peak_ewma.v3alpha"; -option java_outer_classname = "PeakEwmaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/load_balancing_policies/peak_ewma/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Peak EWMA Load Balancer Configuration] -// Configuration for the Peak EWMA (Exponentially Weighted Moving Average) load balancing policy. -// -// This policy implements a latency-aware variant of the Power of Two Choices (P2C) algorithm. -// It selects the best host from two randomly chosen candidates based on a cost function: -// `Cost = RTT_peak_ewma * (active_requests + 1)`. -// -// The Peak EWMA algorithm is designed to: -// - Automatically route traffic away from slow or overloaded hosts -// - Adapt to changing host performance without manual configuration -// - Provide low-latency request routing with O(1) host selection complexity -// - Work effectively in heterogeneous environments with varying host capabilities -// -// RTT measurements are automatically collected from HTTP request timing and used to update -// the EWMA for each host. This provides real-time performance feedback for routing decisions. -// -// Important: This load balancer only considers latency and load when selecting hosts. It does -// not handle host health or error responses - these should be managed by Envoy's health checking -// and outlier detection systems. Peak EWMA operates on the pool of healthy hosts as determined -// by these other systems. -// -// [#extension: envoy.load_balancing_policies.peak_ewma] -// [#next-free-field: 6] -message PeakEwma { - option (xds.annotations.v3.message_status).work_in_progress = true; - - // The decay time for the RTT EWMA calculation. This specifies the time window over which - // latency observations are considered relevant. After this duration, older measurements - // have exponentially decayed to half their original weight. - // - // The Peak EWMA algorithm uses this to calculate the EWMA time constant (tau): - // `tau = decay_time_nanos`, and the EWMA reaches its half-life after `tau * ln(2)`. - // - // This parameter is more intuitive than a raw smoothing factor as it directly relates - // to the time duration over which you want to observe latency trends. - // - // If not specified, defaults to 10 seconds (following Finagle's default). - google.protobuf.Duration decay_time = 1; - - // The interval at which EWMA data is aggregated from worker threads to the main thread. - // This controls the frequency of cross-thread synchronization for the per-thread aggregation model. - // - // A shorter interval provides more up-to-date cross-worker information but increases - // synchronization overhead. A longer interval reduces overhead but may cause workers - // to operate with staler information about other workers' latency observations. - // - // If not specified, defaults to 100 milliseconds. - google.protobuf.Duration aggregation_interval = 2; - - // Maximum RTT samples to buffer per host per worker thread before overwriting oldest samples. - // This bounds memory usage while allowing burst traffic handling. - // - // Buffer capacity formula: max_samples_per_host / aggregation_interval = RPS capacity per host per worker - // Memory formula: max_samples_per_host × num_hosts × num_workers × 16 bytes - // Memory usage per worker = max_samples_per_host × num_hosts × 16 bytes - // - // If not specified, defaults to 1,000 samples per host per worker. - google.protobuf.UInt32Value max_samples_per_host = 3; - - // Default RTT value to use for hosts that don't have measured RTT yet. - // This provides a baseline for cost calculations until actual measurements are available. - // - // This value is critical for initial load balancing decisions when hosts first join - // the cluster or when RTT measurements are temporarily unavailable. It should reflect - // the expected baseline latency for your environment: - // - // If not specified, defaults to 10 milliseconds. - google.protobuf.Duration default_rtt = 4; - - // Penalty cost assigned to hosts that cannot provide valid cost calculations. - // This is used when a host has no RTT measurements or is unhealthy, ensuring - // the Power of Two Choices algorithm will prefer hosts with known performance. - // - // You probably should not change this value. - // - // The penalty should be significantly higher than any realistic RTT-based cost - // to ensure hosts with unknown performance are strongly deprioritized while - // still allowing them to receive traffic if no better alternatives exist. - // - // If not specified, defaults to 1,000,000.0 (1 million). - google.protobuf.DoubleValue penalty_value = 5; -} diff --git a/src/main/proto/contrib/envoy/extensions/matching/input_matchers/hyperscan/v3alpha/hyperscan.proto b/src/main/proto/contrib/envoy/extensions/matching/input_matchers/hyperscan/v3alpha/hyperscan.proto deleted file mode 100644 index 8336fdf..0000000 --- a/src/main/proto/contrib/envoy/extensions/matching/input_matchers/hyperscan/v3alpha/hyperscan.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.input_matchers.hyperscan.v3alpha; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.hyperscan.v3alpha"; -option java_outer_classname = "HyperscanProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/matching/input_matchers/hyperscan/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Hyperscan matcher] -// Hyperscan :ref:`configuration overview `. -// [#extension: envoy.matching.input_matchers.hyperscan] - -// `Hyperscan `_ regex matcher. The matcher uses the Hyperscan -// engine which exploits x86 SIMD instructions to accelerate matching large numbers of regular -// expressions simultaneously across streams of data. -message Hyperscan { - // [#next-free-field: 11] - message Regex { - // The regex expression. - // - // The expression must represent only the pattern to be matched, with no delimiters or flags. - string regex = 1 [(validate.rules).string = {min_len: 1}]; - - // The ID of the regex expression. - // - // This option is designed to be used on the sub-expressions in logical combinations. - uint32 id = 2; - - // Matching will be performed case-insensitively. - // - // The expression may still use PCRE tokens (notably ``(?i)`` and ``(?-i)``) to switch - // case-insensitive matching on and off. - bool caseless = 3; - - // Matching a ``.`` will not exclude newlines. - bool dot_all = 4; - - // ``^`` and ``$`` anchors match any newlines in data. - bool multiline = 5; - - // Allow expressions which can match against an empty string. - // - // This option instructs the compiler to allow expressions that can match against empty buffers, - // such as ``.?``, ``.*``, ``(a|)``. Since Hyperscan can return every possible match for an expression, - // such expressions generally execute very slowly. - bool allow_empty = 6; - - // Treat the pattern as a sequence of UTF-8 characters. - bool utf8 = 7; - - // Use Unicode properties for character classes. - // - // This option instructs Hyperscan to use Unicode properties, rather than the default ASCII - // interpretations, for character mnemonics like ``\w`` and ``\s`` as well as the POSIX character - // classes. It is only meaningful in conjunction with ``utf8``. - bool ucp = 8; - - // Logical combination. - // - // This option instructs Hyperscan to parse this expression as logical combination syntax. - // Logical constraints consist of operands, operators and parentheses. The operands are - // expression indices, and operators can be ``!``, ``&`` or ``|``. - bool combination = 9; - - // Don’t do any match reporting. - // - // This option instructs Hyperscan to ignore match reporting for this expression. It is - // designed to be used on the sub-expressions in logical combinations. - bool quiet = 10; - } - - // Specifies a set of regex expressions that the input should match on. - repeated Regex regexes = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/contrib/envoy/extensions/network/connection_balance/dlb/v3alpha/dlb.proto b/src/main/proto/contrib/envoy/extensions/network/connection_balance/dlb/v3alpha/dlb.proto deleted file mode 100644 index 71a17ca..0000000 --- a/src/main/proto/contrib/envoy/extensions/network/connection_balance/dlb/v3alpha/dlb.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.network.connection_balance.dlb.v3alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.network.connection_balance.dlb.v3alpha"; -option java_outer_classname = "DlbProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/network/connection_balance/dlb/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dlb connection balancer configuration] -// DLB :ref:`configuration overview `. -// [#extension: envoy.network.connection_balance.dlb] -// [#not-implemented-hide:] -// -// The envoy.network.connection_balance.dlb extension is currently disabled -// at the Bazel layer — see https://github.com/envoyproxy/envoy/issues/45491. -// The ``[#not-implemented-hide:]`` annotation above suppresses docs -// generation for this file so protodoc does not try to look the extension -// up in extensions_metadata.yaml (which has been removed in lockstep with -// the ``contrib_build_config.bzl`` entry). Drop the annotation when the -// upstream ``@dlb`` mirror is healthy again. - -// The Dlb is a hardware managed system of queues and arbiters connecting producers and consumers. It is a PCIE device -// in the CPU package. It interacts with software running on cores and potentially other devices. The Dlb implements the -// following balancing features: -// -// - Lock-free multi-producer/multi-consumer operation. -// - Multiple priorities for varying traffic types. -// - Various distribution schemes. -// -// Dlb connection balancer uses Dlb hardware to balance connections, and can significantly reduce latency. -// -// As the Dlb connection balancer provides assistance from dedicated Dlb hardware, it can be used for a proxy with a large number of connections -// (e.g., a gateway). -message Dlb { - // The fallback policy if any error occurs. - // The default policy is None. - enum FallbackPolicy { - // No fallback policy. - None = 0; - - // Fall back to Nop Connection Balance. - NopConnectionBalance = 1; - - // Fall back to Exact Connection Balance. - ExactConnectionBalance = 2; - } - - // The ID of the Dlb hardware, start from 0. - // If not specified, use the first available device as default. - uint32 id = 1; - - // Maximum number of retries when sending to DLB device fails. - // No retry as default. - uint32 max_retries = 2; - - FallbackPolicy fallback_policy = 3; -} diff --git a/src/main/proto/contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha/cryptomb.proto b/src/main/proto/contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha/cryptomb.proto deleted file mode 100644 index cba32b7..0000000 --- a/src/main/proto/contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha/cryptomb.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.private_key_providers.cryptomb.v3alpha; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.private_key_providers.cryptomb.v3alpha"; -option java_outer_classname = "CryptombProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/private_key_providers/cryptomb/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: CryptoMb private key provider] -// [#extension: envoy.tls.key_providers.cryptomb] - -// A CryptoMbPrivateKeyMethodConfig message specifies how the CryptoMb private -// key provider is configured. The private key provider provides ``SIMD`` -// processing for ECDSA sign operations and RSA sign and decrypt operations. -// The provider works by gathering the operations into a worker-thread specific -// queue, and processing the queue using ``ipp-crypto`` library when the queue -// is full or when a timer expires. -// [#extension-category: envoy.tls.key_providers] -message CryptoMbPrivateKeyMethodConfig { - // Private key to use in the private key provider. If set to inline_bytes or - // inline_string, the value needs to be the private key in PEM format. - config.core.v3.DataSource private_key = 1 [(udpa.annotations.sensitive) = true]; - - // How long to wait until the per-thread processing queue should be - // processed. If the processing queue gets full (eight sign or decrypt - // requests are received) it is processed immediately. However, if the - // queue is not filled before the delay has expired, the requests - // already in the queue are processed, even if the queue is not full. - // In effect, this value controls the balance between latency and - // throughput. The duration needs to be set to a value greater than or equal to 1 millisecond. - google.protobuf.Duration poll_delay = 2 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; -} diff --git a/src/main/proto/contrib/envoy/extensions/private_key_providers/qat/v3alpha/qat.proto b/src/main/proto/contrib/envoy/extensions/private_key_providers/qat/v3alpha/qat.proto deleted file mode 100644 index d90bb7e..0000000 --- a/src/main/proto/contrib/envoy/extensions/private_key_providers/qat/v3alpha/qat.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.private_key_providers.qat.v3alpha; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.private_key_providers.qat.v3alpha"; -option java_outer_classname = "QatProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/private_key_providers/qat/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: `QAT` private key provider] -// [#extension: envoy.tls.key_providers.qat] - -// This message specifies how the private key provider is configured. -// The private key provider provides RSA sign and decrypt operation -// hardware acceleration. - -message QatPrivateKeyMethodConfig { - // Private key to use in the private key provider. If set to inline_bytes or - // inline_string, the value needs to be the private key in PEM format. - config.core.v3.DataSource private_key = 1 [(udpa.annotations.sensitive) = true]; - - // How long to wait before polling the hardware accelerator after a - // request has been submitted there. Having a small value leads to - // quicker answers from the hardware but causes more polling loop - // spins, leading to potentially larger CPU usage. The duration needs - // to be set to a value greater than or equal to 1 millisecond. - google.protobuf.Duration poll_delay = 2 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; -} diff --git a/src/main/proto/contrib/envoy/extensions/regex_engines/hyperscan/v3alpha/hyperscan.proto b/src/main/proto/contrib/envoy/extensions/regex_engines/hyperscan/v3alpha/hyperscan.proto deleted file mode 100644 index 7353e2f..0000000 --- a/src/main/proto/contrib/envoy/extensions/regex_engines/hyperscan/v3alpha/hyperscan.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.regex_engines.hyperscan.v3alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.regex_engines.hyperscan.v3alpha"; -option java_outer_classname = "HyperscanProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/regex_engines/hyperscan/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Hyperscan] -// Hyperscan :ref:`configuration overview `. -// [#extension: envoy.regex_engines.hyperscan] - -// `Hyperscan `_ regex engine. The engine uses hybrid automata -// techniques to allow simultaneous matching of large numbers of regular expressions across streams -// of data. -// -// The engine follows PCRE pattern syntax, and the regex string must adhere to the documented -// `pattern support `_. -// The syntax is not compatible with the default RE2 regex engine. Depending on configured -// expressions, swapping regex engine may cause match rules to no longer be valid. -message Hyperscan { -} diff --git a/src/main/proto/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/golang.proto b/src/main/proto/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/golang.proto deleted file mode 100644 index 884f88e..0000000 --- a/src/main/proto/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha/golang.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.router.cluster_specifier.golang.v3alpha; - -import "google/protobuf/any.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.router.cluster_specifier.golang.v3alpha"; -option java_outer_classname = "GolangProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/router/cluster_specifier/golang/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Golang] -// -// For an overview of the Golang cluster specifier please see the :ref:`configuration reference documentation `. -// [#extension: envoy.router.cluster_specifier_plugin.golang] - -// [#extension-category: envoy.router.cluster_specifier_plugin] -message Config { - // Globally unique ID for a dynamic library file. - string library_id = 1 [(validate.rules).string = {min_len: 1}]; - - // Path to a dynamic library implementing the - // :repo:`ClusterSpecifier API ` - // interface. - // [#comment:TODO(wangfakang): Support for downloading libraries from remote repositories.] - string library_path = 2 [(validate.rules).string = {min_len: 1}]; - - // Default cluster. - // - // It will be used when the specifier interface return empty string or panic. - // - string default_cluster = 3 [(validate.rules).string = {min_len: 1}]; - - // Configuration for the Go cluster specifier plugin. - // - // .. note:: - // This configuration is only parsed in the go cluster specifier, and is therefore not validated - // by Envoy. - // - // See the :repo:`StreamFilter API ` - // for more information about how the plugin's configuration data can be accessed. - // - google.protobuf.Any config = 4; -} diff --git a/src/main/proto/contrib/envoy/extensions/tap_sinks/udp_sink/v3alpha/udp_sink.proto b/src/main/proto/contrib/envoy/extensions/tap_sinks/udp_sink/v3alpha/udp_sink.proto deleted file mode 100644 index d98f6b9..0000000 --- a/src/main/proto/contrib/envoy/extensions/tap_sinks/udp_sink/v3alpha/udp_sink.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tap_sinks.udp_sink.v3alpha; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tap_sinks.udp_sink.v3alpha"; -option java_outer_classname = "UdpSinkProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/tap_sinks/udp_sink/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Udp sink configuration] -// [#extension: envoy.tap_sinks.udp_sink] - -// Udp sink configuration. -message UdpSink { - // Configure UDP Address. - config.core.v3.SocketAddress udp_address = 1; -} diff --git a/src/main/proto/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.proto b/src/main/proto/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.proto deleted file mode 100644 index 61abe46..0000000 --- a/src/main/proto/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha/golang.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.tcp.golang.v3alpha; - -import "google/protobuf/any.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.tcp.golang.v3alpha"; -option java_outer_classname = "GolangProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/upstreams/http/tcp/golang/v3alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Golang] -// -// This bridge enables an Http client to connect to a TCP server via a Golang plugin, facilitating Protocol Convert from HTTP to any RPC protocol in Envoy. -// -// For an overview of the Golang HTTP TCP bridge please see the :ref:`configuration reference documentation `. -// [#extension: envoy.upstreams.http.tcp.golang] - -// [#extension-category: envoy.upstreams] -message Config { - // Globally unique ID for a dynamic library file. - string library_id = 1 [(validate.rules).string = {min_len: 1}]; - - // Path to a dynamic library implementing the - // :repo:`HttpTcpBridge API ` - // interface. - string library_path = 2 [(validate.rules).string = {min_len: 1}]; - - // Globally unique name of the Go plugin. - // - // This name **must** be consistent with the name registered in ``tcp::RegisterHttpTcpBridgeFactoryAndConfigParser`` - // - string plugin_name = 3 [(validate.rules).string = {min_len: 1}]; - - // Configuration for the Go plugin. - // - // .. note:: - // This configuration is only parsed in the Golang plugin, and is therefore not validated - // by Envoy. - // - // See the :repo:`HttpTcpBridge API ` - // for more information about how the plugin's configuration data can be accessed. - // - google.protobuf.Any plugin_config = 4; -} diff --git a/src/main/proto/contrib/envoy/extensions/vcl/v3alpha/vcl_socket_interface.proto b/src/main/proto/contrib/envoy/extensions/vcl/v3alpha/vcl_socket_interface.proto deleted file mode 100644 index 48155ec..0000000 --- a/src/main/proto/contrib/envoy/extensions/vcl/v3alpha/vcl_socket_interface.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.vcl.v3alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.vcl.v3alpha"; -option java_outer_classname = "VclSocketInterfaceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/vcl/v3alpha"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: VCL socket interface configuration] -// VCL :ref:`configuration overview `. -// [#extension: envoy.bootstrap.vcl] - -// Configuration for vcl socket interface that relies on ``vpp`` ``comms`` library (VCL) -message VclSocketInterface { -} diff --git a/src/main/proto/envoy/admin/v2alpha/certs.proto b/src/main/proto/envoy/admin/v2alpha/certs.proto deleted file mode 100644 index b20f84f..0000000 --- a/src/main/proto/envoy/admin/v2alpha/certs.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "CertsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Certificates] - -// Proto representation of certificate details. Admin endpoint uses this wrapper for `/certs` to -// display certificate information. See :ref:`/certs ` for more -// information. -message Certificates { - // List of certificates known to an Envoy. - repeated Certificate certificates = 1; -} - -message Certificate { - // Details of CA certificate. - repeated CertificateDetails ca_cert = 1; - - // Details of Certificate Chain - repeated CertificateDetails cert_chain = 2; -} - -// [#next-free-field: 7] -message CertificateDetails { - // Path of the certificate. - string path = 1; - - // Certificate Serial Number. - string serial_number = 2; - - // List of Subject Alternate names. - repeated SubjectAlternateName subject_alt_names = 3; - - // Minimum of days until expiration of certificate and it's chain. - uint64 days_until_expiration = 4; - - // Indicates the time from which the certificate is valid. - google.protobuf.Timestamp valid_from = 5; - - // Indicates the time at which the certificate expires. - google.protobuf.Timestamp expiration_time = 6; -} - -message SubjectAlternateName { - // Subject Alternate Name. - oneof name { - string dns = 1; - - string uri = 2; - - string ip_address = 3; - } -} diff --git a/src/main/proto/envoy/admin/v2alpha/clusters.proto b/src/main/proto/envoy/admin/v2alpha/clusters.proto deleted file mode 100644 index b3f579c..0000000 --- a/src/main/proto/envoy/admin/v2alpha/clusters.proto +++ /dev/null @@ -1,154 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "envoy/admin/v2alpha/metrics.proto"; -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/health_check.proto"; -import "envoy/type/percent.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "ClustersProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Clusters] - -// Admin endpoint uses this wrapper for `/clusters` to display cluster status information. -// See :ref:`/clusters ` for more information. -message Clusters { - // Mapping from cluster name to each cluster's status. - repeated ClusterStatus cluster_statuses = 1; -} - -// Details an individual cluster's current status. -// [#next-free-field: 6] -message ClusterStatus { - // Name of the cluster. - string name = 1; - - // Denotes whether this cluster was added via API or configured statically. - bool added_via_api = 2; - - // The success rate threshold used in the last interval. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors: externally and locally generated were used to calculate the threshold. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*, only externally generated errors were used to calculate the threshold. - // The threshold is used to eject hosts based on their success rate. See - // :ref:`Cluster outlier detection ` documentation for details. - // - // Note: this field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based - // outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no - // threshold for that interval. - // 3. Outlier detection is not enabled for this cluster. - type.Percent success_rate_ejection_threshold = 3; - - // Mapping from host address to the host's current status. - repeated HostStatus host_statuses = 4; - - // The success rate threshold used in the last interval when only locally originated failures were - // taken into account and externally originated errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*. The threshold is used to eject hosts based on their success rate. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: this field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based - // outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no - // threshold for that interval. - // 3. Outlier detection is not enabled for this cluster. - type.Percent local_origin_success_rate_ejection_threshold = 5; -} - -// Current state of a particular host. -// [#next-free-field: 10] -message HostStatus { - // Address of this host. - api.v2.core.Address address = 1; - - // List of stats specific to this host. - repeated SimpleMetric stats = 2; - - // The host's current health status. - HostHealthStatus health_status = 3; - - // Request success rate for this host over the last calculated interval. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors: externally and locally generated were used in success rate - // calculation. If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*, only externally generated errors were used in success rate calculation. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: the message will not be present if host did not have enough request volume to calculate - // success rate or the cluster did not have enough hosts to run through success rate outlier - // ejection. - type.Percent success_rate = 4; - - // The host's weight. If not configured, the value defaults to 1. - uint32 weight = 5; - - // The hostname of the host, if applicable. - string hostname = 6; - - // The host's priority. If not configured, the value defaults to 0 (highest priority). - uint32 priority = 7; - - // Request success rate for this host over the last calculated - // interval when only locally originated errors are taken into account and externally originated - // errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *true*. - // See :ref:`Cluster outlier detection ` documentation for - // details. - // - // Note: the message will not be present if host did not have enough request volume to calculate - // success rate or the cluster did not have enough hosts to run through success rate outlier - // ejection. - type.Percent local_origin_success_rate = 8; - - // locality of the host. - api.v2.core.Locality locality = 9; -} - -// Health status for a host. -// [#next-free-field: 7] -message HostHealthStatus { - // The host is currently failing active health checks. - bool failed_active_health_check = 1; - - // The host is currently considered an outlier and has been ejected. - bool failed_outlier_check = 2; - - // The host is currently being marked as degraded through active health checking. - bool failed_active_degraded_check = 4; - - // The host has been removed from service discovery, but is being stabilized due to active - // health checking. - bool pending_dynamic_removal = 5; - - // The host has not yet been health checked. - bool pending_active_hc = 6; - - // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported - // here. - // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] - api.v2.core.HealthStatus eds_health_status = 3; -} diff --git a/src/main/proto/envoy/admin/v2alpha/config_dump.proto b/src/main/proto/envoy/admin/v2alpha/config_dump.proto deleted file mode 100644 index 0946a72..0000000 --- a/src/main/proto/envoy/admin/v2alpha/config_dump.proto +++ /dev/null @@ -1,292 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "envoy/config/bootstrap/v2/bootstrap.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "ConfigDumpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: ConfigDump] - -// The :ref:`/config_dump ` admin endpoint uses this wrapper -// message to maintain and serve arbitrary configuration information from any component in Envoy. -message ConfigDump { - // This list is serialized and dumped in its entirety at the - // :ref:`/config_dump ` endpoint. - // - // The following configurations are currently supported and will be dumped in the order given - // below: - // - // * *bootstrap*: :ref:`BootstrapConfigDump ` - // * *clusters*: :ref:`ClustersConfigDump ` - // * *listeners*: :ref:`ListenersConfigDump ` - // * *routes*: :ref:`RoutesConfigDump ` - // - // You can filter output with the resource and mask query parameters. - // See :ref:`/config_dump?resource={} `, - // :ref:`/config_dump?mask={} `, - // or :ref:`/config_dump?resource={},mask={} - // ` for more information. - repeated google.protobuf.Any configs = 1; -} - -message UpdateFailureState { - // What the component configuration would have been if the update had succeeded. - google.protobuf.Any failed_configuration = 1; - - // Time of the latest failed update attempt. - google.protobuf.Timestamp last_update_attempt = 2; - - // Details about the last failed update attempt. - string details = 3; -} - -// This message describes the bootstrap configuration that Envoy was started with. This includes -// any CLI overrides that were merged. Bootstrap configuration information can be used to recreate -// the static portions of an Envoy configuration by reusing the output as the bootstrap -// configuration for another Envoy. -message BootstrapConfigDump { - config.bootstrap.v2.Bootstrap bootstrap = 1; - - // The timestamp when the BootstrapConfig was last updated. - google.protobuf.Timestamp last_updated = 2; -} - -// Envoy's listener manager fills this message with all currently known listeners. Listener -// configuration information can be used to recreate an Envoy configuration by populating all -// listeners as static listeners or by returning them in a LDS response. -message ListenersConfigDump { - // Describes a statically loaded listener. - message StaticListener { - // The listener config. - google.protobuf.Any listener = 1; - - // The timestamp when the Listener was last successfully updated. - google.protobuf.Timestamp last_updated = 2; - } - - message DynamicListenerState { - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the listener was loaded. In the future, discrete per-listener versions may be supported - // by the API. - string version_info = 1; - - // The listener config. - google.protobuf.Any listener = 2; - - // The timestamp when the Listener was last successfully updated. - google.protobuf.Timestamp last_updated = 3; - } - - // Describes a dynamically loaded listener via the LDS API. - // [#next-free-field: 6] - message DynamicListener { - // The name or unique id of this listener, pulled from the DynamicListenerState config. - string name = 1; - - // The listener state for any active listener by this name. - // These are listeners that are available to service data plane traffic. - DynamicListenerState active_state = 2; - - // The listener state for any warming listener by this name. - // These are listeners that are currently undergoing warming in preparation to service data - // plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the warming listeners should generally be discarded. - DynamicListenerState warming_state = 3; - - // The listener state for any draining listener by this name. - // These are listeners that are currently undergoing draining in preparation to stop servicing - // data plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the draining listeners should generally be discarded. - DynamicListenerState draining_state = 4; - - // Set if the last update failed, cleared after the next successful update. - UpdateFailureState error_state = 5; - } - - // This is the :ref:`version_info ` in the - // last processed LDS discovery response. If there are only static bootstrap listeners, this field - // will be "". - string version_info = 1; - - // The statically loaded listener configs. - repeated StaticListener static_listeners = 2; - - // State for any warming, active, or draining listeners. - repeated DynamicListener dynamic_listeners = 3; -} - -// Envoy's cluster manager fills this message with all currently known clusters. Cluster -// configuration information can be used to recreate an Envoy configuration by populating all -// clusters as static clusters or by returning them in a CDS response. -message ClustersConfigDump { - // Describes a statically loaded cluster. - message StaticCluster { - // The cluster config. - google.protobuf.Any cluster = 1; - - // The timestamp when the Cluster was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - // Describes a dynamically loaded cluster via the CDS API. - message DynamicCluster { - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by - // the API. - string version_info = 1; - - // The cluster config. - google.protobuf.Any cluster = 2; - - // The timestamp when the Cluster was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - // This is the :ref:`version_info ` in the - // last processed CDS discovery response. If there are only static bootstrap clusters, this field - // will be "". - string version_info = 1; - - // The statically loaded cluster configs. - repeated StaticCluster static_clusters = 2; - - // The dynamically loaded active clusters. These are clusters that are available to service - // data plane traffic. - repeated DynamicCluster dynamic_active_clusters = 3; - - // The dynamically loaded warming clusters. These are clusters that are currently undergoing - // warming in preparation to service data plane traffic. Note that if attempting to recreate an - // Envoy configuration from a configuration dump, the warming clusters should generally be - // discarded. - repeated DynamicCluster dynamic_warming_clusters = 4; -} - -// Envoy's RDS implementation fills this message with all currently loaded routes, as described by -// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration -// or defined inline while configuring listeners are separated from those configured dynamically via RDS. -// Route configuration information can be used to recreate an Envoy configuration by populating all routes -// as static routes or by returning them in RDS responses. -message RoutesConfigDump { - message StaticRouteConfig { - // The route config. - google.protobuf.Any route_config = 1; - - // The timestamp when the Route was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - message DynamicRouteConfig { - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the route configuration was loaded. - string version_info = 1; - - // The route config. - google.protobuf.Any route_config = 2; - - // The timestamp when the Route was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - // The statically loaded route configs. - repeated StaticRouteConfig static_route_configs = 2; - - // The dynamically loaded route configs. - repeated DynamicRouteConfig dynamic_route_configs = 3; -} - -// Envoy's scoped RDS implementation fills this message with all currently loaded route -// configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both -// the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the -// dynamically obtained scopes via the SRDS API. -message ScopedRoutesConfigDump { - message InlineScopedRouteConfigs { - // The name assigned to the scoped route configurations. - string name = 1; - - // The scoped route configurations. - repeated google.protobuf.Any scoped_route_configs = 2; - - // The timestamp when the scoped route config set was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - message DynamicScopedRouteConfigs { - // The name assigned to the scoped route configurations. - string name = 1; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the scoped routes configuration was loaded. - string version_info = 2; - - // The scoped route configurations. - repeated google.protobuf.Any scoped_route_configs = 3; - - // The timestamp when the scoped route config set was last updated. - google.protobuf.Timestamp last_updated = 4; - } - - // The statically loaded scoped route configs. - repeated InlineScopedRouteConfigs inline_scoped_route_configs = 1; - - // The dynamically loaded scoped route configs. - repeated DynamicScopedRouteConfigs dynamic_scoped_route_configs = 2; -} - -// Envoys SDS implementation fills this message with all secrets fetched dynamically via SDS. -message SecretsConfigDump { - // DynamicSecret contains secret information fetched via SDS. - message DynamicSecret { - // The name assigned to the secret. - string name = 1; - - // This is the per-resource version information. - string version_info = 2; - - // The timestamp when the secret was last updated. - google.protobuf.Timestamp last_updated = 3; - - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - google.protobuf.Any secret = 4; - } - - // StaticSecret specifies statically loaded secret in bootstrap. - message StaticSecret { - // The name assigned to the secret. - string name = 1; - - // The timestamp when the secret was last updated. - google.protobuf.Timestamp last_updated = 2; - - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - google.protobuf.Any secret = 3; - } - - // The statically loaded secrets. - repeated StaticSecret static_secrets = 1; - - // The dynamically loaded active secrets. These are secrets that are available to service - // clusters or listeners. - repeated DynamicSecret dynamic_active_secrets = 2; - - // The dynamically loaded warming secrets. These are secrets that are currently undergoing - // warming in preparation to service clusters or listeners. - repeated DynamicSecret dynamic_warming_secrets = 3; -} diff --git a/src/main/proto/envoy/admin/v2alpha/listeners.proto b/src/main/proto/envoy/admin/v2alpha/listeners.proto deleted file mode 100644 index ee385de..0000000 --- a/src/main/proto/envoy/admin/v2alpha/listeners.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "envoy/api/v2/core/address.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "ListenersProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Listeners] - -// Admin endpoint uses this wrapper for `/listeners` to display listener status information. -// See :ref:`/listeners ` for more information. -message Listeners { - // List of listener statuses. - repeated ListenerStatus listener_statuses = 1; -} - -// Details an individual listener's current status. -message ListenerStatus { - // Name of the listener - string name = 1; - - // The actual local address that the listener is listening on. If a listener was configured - // to listen on port 0, then this address has the port that was allocated by the OS. - api.v2.core.Address local_address = 2; -} diff --git a/src/main/proto/envoy/admin/v2alpha/memory.proto b/src/main/proto/envoy/admin/v2alpha/memory.proto deleted file mode 100644 index a96257b..0000000 --- a/src/main/proto/envoy/admin/v2alpha/memory.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "MemoryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Memory] - -// Proto representation of the internal memory consumption of an Envoy instance. These represent -// values extracted from an internal TCMalloc instance. For more information, see the section of the -// docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). -// [#next-free-field: 7] -message Memory { - // The number of bytes allocated by the heap for Envoy. This is an alias for - // `generic.current_allocated_bytes`. - uint64 allocated = 1; - - // The number of bytes reserved by the heap but not necessarily allocated. This is an alias for - // `generic.heap_size`. - uint64 heap_size = 2; - - // The number of bytes in free, unmapped pages in the page heap. These bytes always count towards - // virtual memory usage, and depending on the OS, typically do not count towards physical memory - // usage. This is an alias for `tcmalloc.pageheap_unmapped_bytes`. - uint64 pageheap_unmapped = 3; - - // The number of bytes in free, mapped pages in the page heap. These bytes always count towards - // virtual memory usage, and unless the underlying memory is swapped out by the OS, they also - // count towards physical memory usage. This is an alias for `tcmalloc.pageheap_free_bytes`. - uint64 pageheap_free = 4; - - // The amount of memory used by the TCMalloc thread caches (for small objects). This is an alias - // for `tcmalloc.current_total_thread_cache_bytes`. - uint64 total_thread_cache = 5; - - // The number of bytes of the physical memory usage by the allocator. This is an alias for - // `generic.total_physical_bytes`. - uint64 total_physical_bytes = 6; -} diff --git a/src/main/proto/envoy/admin/v2alpha/metrics.proto b/src/main/proto/envoy/admin/v2alpha/metrics.proto deleted file mode 100644 index 0a27b04..0000000 --- a/src/main/proto/envoy/admin/v2alpha/metrics.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "MetricsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Metrics] - -// Proto representation of an Envoy Counter or Gauge value. -message SimpleMetric { - enum Type { - COUNTER = 0; - GAUGE = 1; - } - - // Type of the metric represented. - Type type = 1; - - // Current metric value. - uint64 value = 2; - - // Name of the metric. - string name = 3; -} diff --git a/src/main/proto/envoy/admin/v2alpha/mutex_stats.proto b/src/main/proto/envoy/admin/v2alpha/mutex_stats.proto deleted file mode 100644 index 8cb9ad1..0000000 --- a/src/main/proto/envoy/admin/v2alpha/mutex_stats.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "MutexStatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: MutexStats] - -// Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run -// under :option:`--enable-mutex-tracing`. For more information, see the `absl::Mutex` -// [docs](https://abseil.io/about/design/mutex#extra-features). -// -// *NB*: The wait cycles below are measured by `absl::base_internal::CycleClock`, and may not -// correspond to core clock frequency. For more information, see the `CycleClock` -// [docs](https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/cycleclock.h). -message MutexStats { - // The number of individual mutex contentions which have occurred since startup. - uint64 num_contentions = 1; - - // The length of the current contention wait cycle. - uint64 current_wait_cycles = 2; - - // The lifetime total of all contention wait cycles. - uint64 lifetime_wait_cycles = 3; -} diff --git a/src/main/proto/envoy/admin/v2alpha/server_info.proto b/src/main/proto/envoy/admin/v2alpha/server_info.proto deleted file mode 100644 index 5341164..0000000 --- a/src/main/proto/envoy/admin/v2alpha/server_info.proto +++ /dev/null @@ -1,155 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "google/protobuf/duration.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "ServerInfoProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Server State] - -// Proto representation of the value returned by /server_info, containing -// server version/server status information. -// [#next-free-field: 7] -message ServerInfo { - enum State { - // Server is live and serving traffic. - LIVE = 0; - - // Server is draining listeners in response to external health checks failing. - DRAINING = 1; - - // Server has not yet completed cluster manager initialization. - PRE_INITIALIZING = 2; - - // Server is running the cluster manager initialization callbacks (e.g., RDS). - INITIALIZING = 3; - } - - // Server version. - string version = 1; - - // State of the server. - State state = 2; - - // Uptime since current epoch was started. - google.protobuf.Duration uptime_current_epoch = 3; - - // Uptime since the start of the first epoch. - google.protobuf.Duration uptime_all_epochs = 4; - - // Hot restart version. - string hot_restart_version = 5; - - // Command line options the server is currently running with. - CommandLineOptions command_line_options = 6; -} - -// [#next-free-field: 29] -message CommandLineOptions { - enum IpVersion { - v4 = 0; - v6 = 1; - } - - enum Mode { - // Validate configs and then serve traffic normally. - Serve = 0; - - // Validate configs and exit. - Validate = 1; - - // Completely load and initialize the config, and then exit without running the listener loop. - InitOnly = 2; - } - - reserved 12; - - // See :option:`--base-id` for details. - uint64 base_id = 1; - - // See :option:`--concurrency` for details. - uint32 concurrency = 2; - - // See :option:`--config-path` for details. - string config_path = 3; - - // See :option:`--config-yaml` for details. - string config_yaml = 4; - - // See :option:`--allow-unknown-static-fields` for details. - bool allow_unknown_static_fields = 5; - - // See :option:`--reject-unknown-dynamic-fields` for details. - bool reject_unknown_dynamic_fields = 26; - - // See :option:`--admin-address-path` for details. - string admin_address_path = 6; - - // See :option:`--local-address-ip-version` for details. - IpVersion local_address_ip_version = 7; - - // See :option:`--log-level` for details. - string log_level = 8; - - // See :option:`--component-log-level` for details. - string component_log_level = 9; - - // See :option:`--log-format` for details. - string log_format = 10; - - // See :option:`--log-format-escaped` for details. - bool log_format_escaped = 27; - - // See :option:`--log-path` for details. - string log_path = 11; - - // See :option:`--service-cluster` for details. - string service_cluster = 13; - - // See :option:`--service-node` for details. - string service_node = 14; - - // See :option:`--service-zone` for details. - string service_zone = 15; - - // See :option:`--file-flush-interval-msec` for details. - google.protobuf.Duration file_flush_interval = 16; - - // See :option:`--drain-time-s` for details. - google.protobuf.Duration drain_time = 17; - - // See :option:`--parent-shutdown-time-s` for details. - google.protobuf.Duration parent_shutdown_time = 18; - - // See :option:`--mode` for details. - Mode mode = 19; - - // max_stats and max_obj_name_len are now unused and have no effect. - uint64 max_stats = 20 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - uint64 max_obj_name_len = 21 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // See :option:`--disable-hot-restart` for details. - bool disable_hot_restart = 22; - - // See :option:`--enable-mutex-tracing` for details. - bool enable_mutex_tracing = 23; - - // See :option:`--restart-epoch` for details. - uint32 restart_epoch = 24; - - // See :option:`--cpuset-threads` for details. - bool cpuset_threads = 25; - - // See :option:`--disable-extensions` for details. - repeated string disabled_extensions = 28; -} diff --git a/src/main/proto/envoy/admin/v2alpha/tap.proto b/src/main/proto/envoy/admin/v2alpha/tap.proto deleted file mode 100644 index 7a25ce8..0000000 --- a/src/main/proto/envoy/admin/v2alpha/tap.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v2alpha; - -import "envoy/service/tap/v2alpha/common.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v2alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tap] - -// The /tap admin request body that is used to configure an active tap session. -message TapRequest { - // The opaque configuration ID used to match the configuration to a loaded extension. - // A tap extension configures a similar opaque ID that is used to match. - string config_id = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The tap configuration to load. - service.tap.v2alpha.TapConfig tap_config = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/admin/v3/certs.proto b/src/main/proto/envoy/admin/v3/certs.proto deleted file mode 100644 index 1264f40..0000000 --- a/src/main/proto/envoy/admin/v3/certs.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "CertsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Certificates] - -// Proto representation of certificate details. Admin endpoint uses this wrapper for ``/certs`` to -// display certificate information. See :ref:`/certs ` for more -// information. -message Certificates { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.Certificates"; - - // List of certificates known to an Envoy. - repeated Certificate certificates = 1; -} - -message Certificate { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.Certificate"; - - // Details of CA certificate. - repeated CertificateDetails ca_cert = 1; - - // Details of Certificate Chain - repeated CertificateDetails cert_chain = 2; -} - -// [#next-free-field: 8] -message CertificateDetails { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.CertificateDetails"; - - message OcspDetails { - // Indicates the time from which the OCSP response is valid. - google.protobuf.Timestamp valid_from = 1; - - // Indicates the time at which the OCSP response expires. - google.protobuf.Timestamp expiration = 2; - } - - // Path of the certificate. - string path = 1; - - // Certificate Serial Number. - string serial_number = 2; - - // List of Subject Alternate names. - repeated SubjectAlternateName subject_alt_names = 3; - - // Minimum of days until expiration of certificate and it's chain. - uint64 days_until_expiration = 4; - - // Indicates the time from which the certificate is valid. - google.protobuf.Timestamp valid_from = 5; - - // Indicates the time at which the certificate expires. - google.protobuf.Timestamp expiration_time = 6; - - // Details related to the OCSP response associated with this certificate, if any. - OcspDetails ocsp_details = 7; -} - -message SubjectAlternateName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.SubjectAlternateName"; - - // Subject Alternate Name. - oneof name { - string dns = 1; - - string uri = 2; - - string ip_address = 3; - } -} diff --git a/src/main/proto/envoy/admin/v3/clusters.proto b/src/main/proto/envoy/admin/v3/clusters.proto deleted file mode 100644 index 4efc4c0..0000000 --- a/src/main/proto/envoy/admin/v3/clusters.proto +++ /dev/null @@ -1,192 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "envoy/admin/v3/metrics.proto"; -import "envoy/config/cluster/v3/circuit_breaker.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/health_check.proto"; -import "envoy/type/v3/percent.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "ClustersProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Clusters] - -// Admin endpoint uses this wrapper for ``/clusters`` to display cluster status information. -// See :ref:`/clusters ` for more information. -message Clusters { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.Clusters"; - - // Mapping from cluster name to each cluster's status. - repeated ClusterStatus cluster_statuses = 1; -} - -// Details an individual cluster's current status. -// [#next-free-field: 9] -message ClusterStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ClusterStatus"; - - // Name of the cluster. - string name = 1; - - // Denotes whether this cluster was added via API or configured statically. - bool added_via_api = 2; - - // The success rate threshold used in the last interval. - // - // * If :ref:`outlier_detection.split_external_local_origin_errors` - // is ``false``, all errors: externally and locally generated were used to calculate the threshold. - // * If :ref:`outlier_detection.split_external_local_origin_errors` - // is ``true``, only externally generated errors were used to calculate the threshold. - // - // The threshold is used to eject hosts based on their success rate. For more information, see the - // :ref:`Cluster outlier detection ` documentation. - // - // .. note:: - // - // This field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no threshold for that - // interval. - // 3. Outlier detection is not enabled for this cluster. - // - type.v3.Percent success_rate_ejection_threshold = 3; - - // Mapping from host address to the host's current status. - repeated HostStatus host_statuses = 4; - - // The success rate threshold used in the last interval when only locally originated failures were - // taken into account and externally originated errors were treated as success. - // This field should be interpreted only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is ``true``. The threshold is used to eject hosts based on their success rate. - // - // For more information, see the :ref:`Cluster outlier detection ` documentation. - // - // .. note:: - // - // This field may be omitted in any of the three following cases: - // - // 1. There were not enough hosts with enough request volume to proceed with success rate based outlier ejection. - // 2. The threshold is computed to be < 0 because a negative value implies that there was no threshold for that - // interval. - // 3. Outlier detection is not enabled for this cluster. - // - type.v3.Percent local_origin_success_rate_ejection_threshold = 5; - - // :ref:`Circuit breaking ` settings of the cluster. - config.cluster.v3.CircuitBreakers circuit_breakers = 6; - - // Observability name of the cluster. - string observability_name = 7; - - // The :ref:`EDS service name ` if the cluster is an EDS cluster. - string eds_service_name = 8; -} - -// Current state of a particular host. -// [#next-free-field: 10] -message HostStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.HostStatus"; - - // Address of this host. - config.core.v3.Address address = 1; - - // List of stats specific to this host. - repeated SimpleMetric stats = 2; - - // The host's current health status. - HostHealthStatus health_status = 3; - - // The success rate for this host during the last measurement interval. - // - // * If :ref:`outlier_detection.split_external_local_origin_errors` - // is ``false``, all errors: externally and locally generated were used in success rate calculation. - // * If :ref:`outlier_detection.split_external_local_origin_errors` - // is ``true``, only externally generated errors were used in success rate calculation. - // - // For more information, see the :ref:`Cluster outlier detection ` documentation. - // - // .. note:: - // - // The message will be missing if the host didn't receive enough traffic to calculate a reliable success rate, or - // if the cluster had too few hosts to apply outlier ejection based on success rate. - // - type.v3.Percent success_rate = 4; - - // The host's weight. If not configured, the value defaults to 1. - uint32 weight = 5; - - // The hostname of the host, if applicable. - string hostname = 6; - - // The host's priority. If not configured, the value defaults to 0 (highest priority). - uint32 priority = 7; - - // The success rate for this host during the last interval, considering only locally generated errors. Externally - // generated errors are treated as successes. - // - // This field is only relevant when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is set to ``true``. - // - // For more information, see the :ref:`Cluster outlier detection ` documentation. - // - // .. note:: - // - // The message will be missing if the host didn't receive enough traffic to compute a success rate, or if the - // cluster didn't have enough hosts to perform outlier ejection based on success rate. - // - type.v3.Percent local_origin_success_rate = 8; - - // locality of the host. - config.core.v3.Locality locality = 9; -} - -// Health status for a host. -// [#next-free-field: 9] -message HostHealthStatus { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.HostHealthStatus"; - - // The host is currently failing active health checks. - bool failed_active_health_check = 1; - - // The host is currently considered an outlier and has been ejected. - bool failed_outlier_check = 2; - - // The host is currently being marked as degraded through active health checking. - bool failed_active_degraded_check = 4; - - // The host has been removed from service discovery, but is being stabilized due to active - // health checking. - bool pending_dynamic_removal = 5; - - // The host is awaiting first health check. - bool pending_active_hc = 6; - - // The host should be excluded from panic, spillover, etc. calculations because it was explicitly - // taken out of rotation via protocol signal and is not meant to be routed to. - bool excluded_via_immediate_hc_fail = 7; - - // The host failed active health check due to timeout. - bool active_hc_timeout = 8; - - // Health status as reported by EDS. - // - // .. note:: - // - // Currently, only ``HEALTHY`` and ``UNHEALTHY`` are supported. - // - // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] - config.core.v3.HealthStatus eds_health_status = 3; -} diff --git a/src/main/proto/envoy/admin/v3/config_dump.proto b/src/main/proto/envoy/admin/v3/config_dump.proto deleted file mode 100644 index 82dc13e..0000000 --- a/src/main/proto/envoy/admin/v3/config_dump.proto +++ /dev/null @@ -1,135 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "envoy/admin/v3/config_dump_shared.proto"; -import "envoy/config/bootstrap/v3/bootstrap.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "ConfigDumpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ConfigDump] - -// The :ref:`/config_dump ` admin endpoint uses this wrapper -// message to maintain and serve arbitrary configuration information from any component in Envoy. -message ConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ConfigDump"; - - // This list is serialized and dumped in its entirety at the - // :ref:`/config_dump ` endpoint. - // - // The following configurations are currently supported and will be dumped in the order given - // below: - // - // * ``bootstrap``: :ref:`BootstrapConfigDump ` - // * ``clusters``: :ref:`ClustersConfigDump ` - // * ``ecds_filter_http``: :ref:`EcdsConfigDump ` - // * ``ecds_filter_quic_listener``: :ref:`EcdsConfigDump ` - // * ``ecds_filter_tcp_listener``: :ref:`EcdsConfigDump ` - // * ``endpoints``: :ref:`EndpointsConfigDump ` - // * ``listeners``: :ref:`ListenersConfigDump ` - // * ``scoped_routes``: :ref:`ScopedRoutesConfigDump ` - // * ``routes``: :ref:`RoutesConfigDump ` - // * ``secrets``: :ref:`SecretsConfigDump ` - // - // EDS Configuration will only be dumped by using parameter ``?include_eds`` - // - // Currently ECDS is supported in HTTP and listener filters. Note, ECDS configuration for - // either HTTP or listener filter will only be dumped if it is actually configured. - // - // You can filter output with the resource and mask query parameters. - // See :ref:`/config_dump?resource={} `, - // :ref:`/config_dump?mask={} `, - // or :ref:`/config_dump?resource={},mask={} - // ` for more information. - repeated google.protobuf.Any configs = 1; -} - -// This message describes the bootstrap configuration that Envoy was started with. This includes -// any CLI overrides that were merged. Bootstrap configuration information can be used to recreate -// the static portions of an Envoy configuration by reusing the output as the bootstrap -// configuration for another Envoy. -message BootstrapConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.BootstrapConfigDump"; - - config.bootstrap.v3.Bootstrap bootstrap = 1; - - // The timestamp when the BootstrapConfig was last updated. - google.protobuf.Timestamp last_updated = 2; -} - -// Envoys SDS implementation fills this message with all secrets fetched dynamically via SDS. -message SecretsConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.SecretsConfigDump"; - - // DynamicSecret contains secret information fetched via SDS. - // [#next-free-field: 7] - message DynamicSecret { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.SecretsConfigDump.DynamicSecret"; - - // The name assigned to the secret. - string name = 1; - - // This is the per-resource version information. - string version_info = 2; - - // The timestamp when the secret was last updated. - google.protobuf.Timestamp last_updated = 3; - - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - google.protobuf.Any secret = 4; - - // Set if the last update failed, cleared after the next successful update. - // The *error_state* field contains the rejected version of this particular - // resource along with the reason and timestamp. For successfully updated or - // acknowledged resource, this field should be empty. - // [#not-implemented-hide:] - UpdateFailureState error_state = 5; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 6; - } - - // StaticSecret specifies statically loaded secret in bootstrap. - message StaticSecret { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.SecretsConfigDump.StaticSecret"; - - // The name assigned to the secret. - string name = 1; - - // The timestamp when the secret was last updated. - google.protobuf.Timestamp last_updated = 2; - - // The actual secret information. - // Security sensitive information is redacted (replaced with "[redacted]") for - // private keys and passwords in TLS certificates. - google.protobuf.Any secret = 3; - } - - // The statically loaded secrets. - repeated StaticSecret static_secrets = 1; - - // The dynamically loaded active secrets. These are secrets that are available to service - // clusters or listeners. - repeated DynamicSecret dynamic_active_secrets = 2; - - // The dynamically loaded warming secrets. These are secrets that are currently undergoing - // warming in preparation to service clusters or listeners. - repeated DynamicSecret dynamic_warming_secrets = 3; -} diff --git a/src/main/proto/envoy/admin/v3/config_dump_shared.proto b/src/main/proto/envoy/admin/v3/config_dump_shared.proto deleted file mode 100644 index b34e004..0000000 --- a/src/main/proto/envoy/admin/v3/config_dump_shared.proto +++ /dev/null @@ -1,420 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "ConfigDumpSharedProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ConfigDump] - -// Resource status from the view of a xDS client, which tells the synchronization -// status between the xDS client and the xDS server. -enum ClientResourceStatus { - // Resource status is not available/unknown. - UNKNOWN = 0; - - // Client requested this resource but hasn't received any update from management - // server. The client will not fail requests, but will queue them until update - // arrives or the client times out waiting for the resource. - REQUESTED = 1; - - // This resource has been requested by the client but has either not been - // delivered by the server or was previously delivered by the server and then - // subsequently removed from resources provided by the server. For more - // information, please refer to the :ref:`"Knowing When a Requested Resource - // Does Not Exist" ` section. - DOES_NOT_EXIST = 2; - - // Client received this resource and replied with ACK. - ACKED = 3; - - // Client received this resource and replied with NACK. - NACKED = 4; - - // Client received an error from the control plane. The attached config - // dump is the most recent accepted one. If no config is accepted yet, - // the attached config dump will be empty. - RECEIVED_ERROR = 5; - - // Client timed out waiting for the resource from the control plane. - TIMEOUT = 6; -} - -message UpdateFailureState { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.UpdateFailureState"; - - // What the component configuration would have been if the update had succeeded. - // This field may not be populated by xDS clients due to storage overhead. - google.protobuf.Any failed_configuration = 1; - - // Time of the latest failed update attempt. - google.protobuf.Timestamp last_update_attempt = 2; - - // Details about the last failed update attempt. - string details = 3; - - // This is the version of the rejected resource. - // [#not-implemented-hide:] - string version_info = 4; -} - -// Envoy's listener manager fills this message with all currently known listeners. Listener -// configuration information can be used to recreate an Envoy configuration by populating all -// listeners as static listeners or by returning them in a LDS response. -message ListenersConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ListenersConfigDump"; - - // Describes a statically loaded listener. - message StaticListener { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ListenersConfigDump.StaticListener"; - - // The listener config. - google.protobuf.Any listener = 1; - - // The timestamp when the Listener was last successfully updated. - google.protobuf.Timestamp last_updated = 2; - } - - message DynamicListenerState { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ListenersConfigDump.DynamicListenerState"; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the listener was loaded. In the future, discrete per-listener versions may be supported - // by the API. - string version_info = 1; - - // The listener config. - google.protobuf.Any listener = 2; - - // The timestamp when the Listener was last successfully updated. - google.protobuf.Timestamp last_updated = 3; - } - - // Describes a dynamically loaded listener via the LDS API. - // [#next-free-field: 7] - message DynamicListener { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ListenersConfigDump.DynamicListener"; - - // The name or unique id of this listener, pulled from the DynamicListenerState config. - string name = 1; - - // The listener state for any active listener by this name. - // These are listeners that are available to service data plane traffic. - DynamicListenerState active_state = 2; - - // The listener state for any warming listener by this name. - // These are listeners that are currently undergoing warming in preparation to service data - // plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the warming listeners should generally be discarded. - DynamicListenerState warming_state = 3; - - // The listener state for any draining listener by this name. - // These are listeners that are currently undergoing draining in preparation to stop servicing - // data plane traffic. Note that if attempting to recreate an Envoy configuration from a - // configuration dump, the draining listeners should generally be discarded. - DynamicListenerState draining_state = 4; - - // Set if the last update failed, cleared after the next successful update. - // The ``error_state`` field contains the rejected version of this particular - // resource along with the reason and timestamp. For successfully updated or - // acknowledged resource, this field should be empty. - UpdateFailureState error_state = 5; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 6; - } - - // This is the :ref:`version_info ` in the - // last processed LDS discovery response. If there are only static bootstrap listeners, this field - // will be "". - string version_info = 1; - - // The statically loaded listener configs. - repeated StaticListener static_listeners = 2; - - // State for any warming, active, or draining listeners. - repeated DynamicListener dynamic_listeners = 3; -} - -// Envoy's cluster manager fills this message with all currently known clusters. Cluster -// configuration information can be used to recreate an Envoy configuration by populating all -// clusters as static clusters or by returning them in a CDS response. -message ClustersConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ClustersConfigDump"; - - // Describes a statically loaded cluster. - message StaticCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ClustersConfigDump.StaticCluster"; - - // The cluster config. - google.protobuf.Any cluster = 1; - - // The timestamp when the Cluster was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - // Describes a dynamically loaded cluster via the CDS API. - // [#next-free-field: 6] - message DynamicCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ClustersConfigDump.DynamicCluster"; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time - // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by - // the API. - string version_info = 1; - - // The cluster config. - google.protobuf.Any cluster = 2; - - // The timestamp when the Cluster was last updated. - google.protobuf.Timestamp last_updated = 3; - - // Set if the last update failed, cleared after the next successful update. - // The ``error_state`` field contains the rejected version of this particular - // resource along with the reason and timestamp. For successfully updated or - // acknowledged resource, this field should be empty. - // [#not-implemented-hide:] - UpdateFailureState error_state = 4; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 5; - } - - // This is the :ref:`version_info ` in the - // last processed CDS discovery response. If there are only static bootstrap clusters, this field - // will be "". - string version_info = 1; - - // The statically loaded cluster configs. - repeated StaticCluster static_clusters = 2; - - // The dynamically loaded active clusters. These are clusters that are available to service - // data plane traffic. - repeated DynamicCluster dynamic_active_clusters = 3; - - // The dynamically loaded warming clusters. These are clusters that are currently undergoing - // warming in preparation to service data plane traffic. Note that if attempting to recreate an - // Envoy configuration from a configuration dump, the warming clusters should generally be - // discarded. - repeated DynamicCluster dynamic_warming_clusters = 4; -} - -// Envoy's RDS implementation fills this message with all currently loaded routes, as described by -// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration -// or defined inline while configuring listeners are separated from those configured dynamically via RDS. -// Route configuration information can be used to recreate an Envoy configuration by populating all routes -// as static routes or by returning them in RDS responses. -message RoutesConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.RoutesConfigDump"; - - message StaticRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.RoutesConfigDump.StaticRouteConfig"; - - // The route config. - google.protobuf.Any route_config = 1; - - // The timestamp when the Route was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - // [#next-free-field: 6] - message DynamicRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.RoutesConfigDump.DynamicRouteConfig"; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the route configuration was loaded. - string version_info = 1; - - // The route config. - google.protobuf.Any route_config = 2; - - // The timestamp when the Route was last updated. - google.protobuf.Timestamp last_updated = 3; - - // Set if the last update failed, cleared after the next successful update. - // The ``error_state`` field contains the rejected version of this particular - // resource along with the reason and timestamp. For successfully updated or - // acknowledged resource, this field should be empty. - // [#not-implemented-hide:] - UpdateFailureState error_state = 4; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 5; - } - - // The statically loaded route configs. - repeated StaticRouteConfig static_route_configs = 2; - - // The dynamically loaded route configs. - repeated DynamicRouteConfig dynamic_route_configs = 3; -} - -// Envoy's scoped RDS implementation fills this message with all currently loaded route -// configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both -// the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the -// dynamically obtained scopes via the SRDS API. -message ScopedRoutesConfigDump { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ScopedRoutesConfigDump"; - - message InlineScopedRouteConfigs { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ScopedRoutesConfigDump.InlineScopedRouteConfigs"; - - // The name assigned to the scoped route configurations. - string name = 1; - - // The scoped route configurations. - repeated google.protobuf.Any scoped_route_configs = 2; - - // The timestamp when the scoped route config set was last updated. - google.protobuf.Timestamp last_updated = 3; - } - - // [#next-free-field: 7] - message DynamicScopedRouteConfigs { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.ScopedRoutesConfigDump.DynamicScopedRouteConfigs"; - - // The name assigned to the scoped route configurations. - string name = 1; - - // This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the scoped routes configuration was loaded. - string version_info = 2; - - // The scoped route configurations. - repeated google.protobuf.Any scoped_route_configs = 3; - - // The timestamp when the scoped route config set was last updated. - google.protobuf.Timestamp last_updated = 4; - - // Set if the last update failed, cleared after the next successful update. - // The ``error_state`` field contains the rejected version of this particular - // resource along with the reason and timestamp. For successfully updated or - // acknowledged resource, this field should be empty. - // [#not-implemented-hide:] - UpdateFailureState error_state = 5; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 6; - } - - // The statically loaded scoped route configs. - repeated InlineScopedRouteConfigs inline_scoped_route_configs = 1; - - // The dynamically loaded scoped route configs. - repeated DynamicScopedRouteConfigs dynamic_scoped_route_configs = 2; -} - -// Envoy's admin fill this message with all currently known endpoints. Endpoint -// configuration information can be used to recreate an Envoy configuration by populating all -// endpoints as static endpoints or by returning them in an EDS response. -message EndpointsConfigDump { - message StaticEndpointConfig { - // The endpoint config. - google.protobuf.Any endpoint_config = 1; - - // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. - google.protobuf.Timestamp last_updated = 2; - } - - // [#next-free-field: 6] - message DynamicEndpointConfig { - // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the - // :ref:`version_info ` field at the time that - // the endpoint configuration was loaded. - string version_info = 1; - - // The endpoint config. - google.protobuf.Any endpoint_config = 2; - - // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. - google.protobuf.Timestamp last_updated = 3; - - // Set if the last update failed, cleared after the next successful update. - // The ``error_state`` field contains the rejected version of this particular - // resource along with the reason and timestamp. For successfully updated or - // acknowledged resource, this field should be empty. - // [#not-implemented-hide:] - UpdateFailureState error_state = 4; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 5; - } - - // The statically loaded endpoint configs. - repeated StaticEndpointConfig static_endpoint_configs = 2; - - // The dynamically loaded endpoint configs. - repeated DynamicEndpointConfig dynamic_endpoint_configs = 3; -} - -// Envoy's ECDS service fills this message with all currently extension -// configuration. Extension configuration information can be used to recreate -// an Envoy ECDS listener and HTTP filters as static filters or by returning -// them in ECDS response. -message EcdsConfigDump { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.EcdsConfigDump"; - - // [#next-free-field: 6] - message EcdsFilterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.EcdsConfigDump.EcdsFilterConfig"; - - // This is the per-resource version information. This version is currently - // taken from the :ref:`version_info - // ` - // field at the time that the ECDS filter was loaded. - string version_info = 1; - - // The ECDS filter config. - google.protobuf.Any ecds_filter = 2; - - // The timestamp when the ECDS filter was last updated. - google.protobuf.Timestamp last_updated = 3; - - // Set if the last update failed, cleared after the next successful update. - // The ``error_state`` field contains the rejected version of this - // particular resource along with the reason and timestamp. For successfully - // updated or acknowledged resource, this field should be empty. - // [#not-implemented-hide:] - UpdateFailureState error_state = 4; - - // The client status of this resource. - // [#not-implemented-hide:] - ClientResourceStatus client_status = 5; - } - - // The ECDS filter configs. - repeated EcdsFilterConfig ecds_filters = 1; -} diff --git a/src/main/proto/envoy/admin/v3/init_dump.proto b/src/main/proto/envoy/admin/v3/init_dump.proto deleted file mode 100644 index 13a374d..0000000 --- a/src/main/proto/envoy/admin/v3/init_dump.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "InitDumpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: InitDump] - -// Dumps of unready targets of envoy init managers. Envoy's admin fills this message with init managers, -// which provides the information of their unready targets. -// The :ref:`/init_dump ` will dump all unready targets information. -message UnreadyTargetsDumps { - // Message of unready targets information of an init manager. - message UnreadyTargetsDump { - // Name of the init manager. Example: "init_manager_xxx". - string name = 1; - - // Names of unready targets of the init manager. Example: "target_xxx". - repeated string target_names = 2; - } - - // You can choose specific component to dump unready targets with mask query parameter. - // See :ref:`/init_dump?mask={} ` for more information. - // The dumps of unready targets of all init managers. - repeated UnreadyTargetsDump unready_targets_dumps = 1; -} diff --git a/src/main/proto/envoy/admin/v3/listeners.proto b/src/main/proto/envoy/admin/v3/listeners.proto deleted file mode 100644 index 5112c9f..0000000 --- a/src/main/proto/envoy/admin/v3/listeners.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "ListenersProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Listeners] - -// Admin endpoint uses this wrapper for ``/listeners`` to display listener status information. -// See :ref:`/listeners ` for more information. -message Listeners { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.Listeners"; - - // List of listener statuses. - repeated ListenerStatus listener_statuses = 1; -} - -// Details an individual listener's current status. -message ListenerStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ListenerStatus"; - - // Name of the listener - string name = 1; - - // The actual local address that the listener is listening on. If a listener was configured - // to listen on port 0, then this address has the port that was allocated by the OS. - config.core.v3.Address local_address = 2; - - // The additional addresses the listener is listening on as specified via the :ref:`additional_addresses ` - // configuration. - repeated config.core.v3.Address additional_local_addresses = 3; -} diff --git a/src/main/proto/envoy/admin/v3/memory.proto b/src/main/proto/envoy/admin/v3/memory.proto deleted file mode 100644 index b17e3c1..0000000 --- a/src/main/proto/envoy/admin/v3/memory.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "MemoryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Memory] - -// Proto representation of the internal memory consumption of an Envoy instance. These represent -// values extracted from an internal TCMalloc instance. For more information, see the section of the -// docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). -// [#next-free-field: 7] -message Memory { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.Memory"; - - // The number of bytes allocated by the heap for Envoy. This is an alias for - // ``generic.current_allocated_bytes``. - uint64 allocated = 1; - - // The number of bytes reserved by the heap but not necessarily allocated. This is an alias for - // ``generic.heap_size``. - uint64 heap_size = 2; - - // The number of bytes in free, unmapped pages in the page heap. These bytes always count towards - // virtual memory usage, and depending on the OS, typically do not count towards physical memory - // usage. This is an alias for ``tcmalloc.pageheap_unmapped_bytes``. - uint64 pageheap_unmapped = 3; - - // The number of bytes in free, mapped pages in the page heap. These bytes always count towards - // virtual memory usage, and unless the underlying memory is swapped out by the OS, they also - // count towards physical memory usage. This is an alias for ``tcmalloc.pageheap_free_bytes``. - uint64 pageheap_free = 4; - - // The amount of memory used by the TCMalloc thread caches (for small objects). This is an alias - // for ``tcmalloc.current_total_thread_cache_bytes``. - uint64 total_thread_cache = 5; - - // The number of bytes of the physical memory usage by the allocator. This is an alias for - // ``generic.total_physical_bytes``. - uint64 total_physical_bytes = 6; -} diff --git a/src/main/proto/envoy/admin/v3/metrics.proto b/src/main/proto/envoy/admin/v3/metrics.proto deleted file mode 100644 index 7280d95..0000000 --- a/src/main/proto/envoy/admin/v3/metrics.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "MetricsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Metrics] - -// Proto representation of an Envoy Counter or Gauge value. -message SimpleMetric { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.SimpleMetric"; - - enum Type { - COUNTER = 0; - GAUGE = 1; - } - - // Type of the metric represented. - Type type = 1; - - // Current metric value. - uint64 value = 2; - - // Name of the metric. - string name = 3; -} diff --git a/src/main/proto/envoy/admin/v3/mutex_stats.proto b/src/main/proto/envoy/admin/v3/mutex_stats.proto deleted file mode 100644 index 4303167..0000000 --- a/src/main/proto/envoy/admin/v3/mutex_stats.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "MutexStatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: MutexStats] - -// Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run -// under :option:`--enable-mutex-tracing`. For more information, see the ``absl::Mutex`` -// [docs](https://abseil.io/about/design/mutex#extra-features). -// -// *NB*: The wait cycles below are measured by ``absl::base_internal::CycleClock``, and may not -// correspond to core clock frequency. For more information, see the ``CycleClock`` -// [docs](https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/cycleclock.h). -message MutexStats { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.MutexStats"; - - // The number of individual mutex contentions which have occurred since startup. - uint64 num_contentions = 1; - - // The length of the current contention wait cycle. - uint64 current_wait_cycles = 2; - - // The lifetime total of all contention wait cycles. - uint64 lifetime_wait_cycles = 3; -} diff --git a/src/main/proto/envoy/admin/v3/server_info.proto b/src/main/proto/envoy/admin/v3/server_info.proto deleted file mode 100644 index 6614ce4..0000000 --- a/src/main/proto/envoy/admin/v3/server_info.proto +++ /dev/null @@ -1,208 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "ServerInfoProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Server state] - -// Proto representation of the value returned by /server_info, containing -// server version/server status information. -// [#next-free-field: 8] -message ServerInfo { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.ServerInfo"; - - enum State { - // Server is live and serving traffic. - LIVE = 0; - - // Server is draining listeners in response to external health checks failing. - DRAINING = 1; - - // Server has not yet completed cluster manager initialization. - PRE_INITIALIZING = 2; - - // Server is running the cluster manager initialization callbacks (e.g., RDS). - INITIALIZING = 3; - } - - // Server version. - string version = 1; - - // State of the server. - State state = 2; - - // Uptime since current epoch was started. - google.protobuf.Duration uptime_current_epoch = 3; - - // Uptime since the start of the first epoch. - google.protobuf.Duration uptime_all_epochs = 4; - - // Hot restart version. - string hot_restart_version = 5; - - // Command line options the server is currently running with. - CommandLineOptions command_line_options = 6; - - // Populated node identity of this server. - config.core.v3.Node node = 7; -} - -// [#next-free-field: 43] -message CommandLineOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.admin.v2alpha.CommandLineOptions"; - - enum IpVersion { - v4 = 0; - v6 = 1; - } - - enum Mode { - // Validate configs and then serve traffic normally. - Serve = 0; - - // Validate configs and exit. - Validate = 1; - - // Completely load and initialize the config, and then exit without running the listener loop. - InitOnly = 2; - } - - enum DrainStrategy { - // Gradually discourage connections over the course of the drain period. - Gradual = 0; - - // Discourage all connections for the duration of the drain sequence. - Immediate = 1; - } - - reserved 12, 20, 21, 29; - - reserved "max_stats", "max_obj_name_len", "bootstrap_version"; - - // See :option:`--base-id` for details. - uint64 base_id = 1; - - // See :option:`--use-dynamic-base-id` for details. - bool use_dynamic_base_id = 31; - - // See :option:`--skip-hot-restart-on-no-parent` for details. - bool skip_hot_restart_on_no_parent = 39; - - // See :option:`--skip-hot-restart-parent-stats` for details. - bool skip_hot_restart_parent_stats = 40; - - // See :option:`--base-id-path` for details. - string base_id_path = 32; - - // See :option:`--concurrency` for details. - uint32 concurrency = 2; - - // See :option:`--config-path` for details. - string config_path = 3; - - // See :option:`--config-yaml` for details. - string config_yaml = 4; - - // See :option:`--allow-unknown-static-fields` for details. - bool allow_unknown_static_fields = 5; - - // See :option:`--reject-unknown-dynamic-fields` for details. - bool reject_unknown_dynamic_fields = 26; - - // See :option:`--ignore-unknown-dynamic-fields` for details. - bool ignore_unknown_dynamic_fields = 30; - - // See :option:`--skip-deprecated-logs` for details. - bool skip_deprecated_logs = 41; - - // See :option:`--admin-address-path` for details. - string admin_address_path = 6; - - // See :option:`--local-address-ip-version` for details. - IpVersion local_address_ip_version = 7; - - // See :option:`--log-level` for details. - string log_level = 8; - - // See :option:`--component-log-level` for details. - string component_log_level = 9; - - // See :option:`--log-format` for details. - string log_format = 10; - - // See :option:`--log-format-escaped` for details. - bool log_format_escaped = 27; - - // See :option:`--log-path` for details. - string log_path = 11; - - // See :option:`--service-cluster` for details. - string service_cluster = 13; - - // See :option:`--service-node` for details. - string service_node = 14; - - // See :option:`--service-zone` for details. - string service_zone = 15; - - // See :option:`--file-flush-interval-msec` for details. - google.protobuf.Duration file_flush_interval = 16; - - // See :option:`--file-flush-min-size-kb` for details. - uint32 file_flush_min_size = 42; - - // See :option:`--drain-time-s` for details. - google.protobuf.Duration drain_time = 17; - - // See :option:`--drain-strategy` for details. - DrainStrategy drain_strategy = 33; - - // See :option:`--parent-shutdown-time-s` for details. - google.protobuf.Duration parent_shutdown_time = 18; - - // See :option:`--mode` for details. - Mode mode = 19; - - // See :option:`--disable-hot-restart` for details. - bool disable_hot_restart = 22; - - // See :option:`--enable-mutex-tracing` for details. - bool enable_mutex_tracing = 23; - - // See :option:`--restart-epoch` for details. - uint32 restart_epoch = 24; - - // See :option:`--cpuset-threads` for details. - bool cpuset_threads = 25; - - // See :option:`--disable-extensions` for details. - repeated string disabled_extensions = 28; - - // See :option:`--enable-fine-grain-logging` for details. - bool enable_fine_grain_logging = 34; - - // See :option:`--socket-path` for details. - string socket_path = 35; - - // See :option:`--socket-mode` for details. - uint32 socket_mode = 36; - - // See :option:`--enable-core-dump` for details. - bool enable_core_dump = 37; - - // See :option:`--stats-tag` for details. - repeated string stats_tag = 38; -} diff --git a/src/main/proto/envoy/admin/v3/tap.proto b/src/main/proto/envoy/admin/v3/tap.proto deleted file mode 100644 index 49eeb86..0000000 --- a/src/main/proto/envoy/admin/v3/tap.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.admin.v3; - -import "envoy/config/tap/v3/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.admin.v3"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v3;adminv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap] - -// The /tap admin request body that is used to configure an active tap session. -message TapRequest { - option (udpa.annotations.versioning).previous_message_type = "envoy.admin.v2alpha.TapRequest"; - - // The opaque configuration ID used to match the configuration to a loaded extension. - // A tap extension configures a similar opaque ID that is used to match. - string config_id = 1 [(validate.rules).string = {min_len: 1}]; - - // The tap configuration to load. - config.tap.v3.TapConfig tap_config = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/annotations/deprecation.proto b/src/main/proto/envoy/annotations/deprecation.proto deleted file mode 100644 index c9a96f1..0000000 --- a/src/main/proto/envoy/annotations/deprecation.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.annotations; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations"; - -import "google/protobuf/descriptor.proto"; - -// [#protodoc-title: Deprecation] -// Adds annotations for deprecated fields and enums to allow tagging proto -// fields as fatal by default and the minor version on which the field was -// deprecated. One Envoy release after deprecation, deprecated fields will be -// disallowed by default, a state which is reversible with -// :ref:`runtime overrides `. - -// Magic number in this file derived from top 28bit of SHA256 digest of -// "envoy.annotation.disallowed_by_default" and "envoy.annotation.deprecated_at_minor_version" -extend google.protobuf.FieldOptions { - bool disallowed_by_default = 189503207; - - // The API major and minor version on which the field was deprecated - // (e.g., "3.5" for major version 3 and minor version 5). - string deprecated_at_minor_version = 157299826; -} - -// Magic number in this file derived from top 28bit of SHA256 digest of -// "envoy.annotation.disallowed_by_default_enum" and -// "envoy.annotation.deprecated_at_minor_version_eum" -extend google.protobuf.EnumValueOptions { - bool disallowed_by_default_enum = 70100853; - - // The API major and minor version on which the enum value was deprecated - // (e.g., "3.5" for major version 3 and minor version 5). - string deprecated_at_minor_version_enum = 181198657; -} diff --git a/src/main/proto/envoy/annotations/resource.proto b/src/main/proto/envoy/annotations/resource.proto deleted file mode 100644 index 3877afc..0000000 --- a/src/main/proto/envoy/annotations/resource.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.annotations; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/annotations"; - -import "google/protobuf/descriptor.proto"; - -// [#protodoc-title: Resource] - -// Magic number in this file derived from top 28bit of SHA256 digest of "envoy.annotation.resource". -extend google.protobuf.ServiceOptions { - ResourceAnnotation resource = 265073217; -} - -message ResourceAnnotation { - // Annotation for xDS services that indicates the fully-qualified Protobuf type for the resource - // type. - string type = 1; -} diff --git a/src/main/proto/envoy/api/v2/auth/cert.proto b/src/main/proto/envoy/api/v2/auth/cert.proto deleted file mode 100644 index 81e2672..0000000 --- a/src/main/proto/envoy/api/v2/auth/cert.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.auth; - -import "udpa/annotations/migrate.proto"; - -import public "envoy/api/v2/auth/common.proto"; -import public "envoy/api/v2/auth/secret.proto"; -import public "envoy/api/v2/auth/tls.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.auth"; -option java_outer_classname = "CertProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.tls.v3"; diff --git a/src/main/proto/envoy/api/v2/auth/common.proto b/src/main/proto/envoy/api/v2/auth/common.proto deleted file mode 100644 index cd55ccd..0000000 --- a/src/main/proto/envoy/api/v2/auth/common.proto +++ /dev/null @@ -1,327 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.auth; - -import "envoy/api/v2/core/base.proto"; -import "envoy/type/matcher/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.auth"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.tls.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common TLS configuration] - -message TlsParameters { - enum TlsProtocol { - // Envoy will choose the optimal TLS version. - TLS_AUTO = 0; - - // TLS 1.0 - TLSv1_0 = 1; - - // TLS 1.1 - TLSv1_1 = 2; - - // TLS 1.2 - TLSv1_2 = 3; - - // TLS 1.3 - TLSv1_3 = 4; - } - - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. - TlsProtocol tls_minimum_protocol_version = 1 [(validate.rules).enum = {defined_only: true}]; - - // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for - // servers. - TlsProtocol tls_maximum_protocol_version = 2 [(validate.rules).enum = {defined_only: true}]; - - // If specified, the TLS listener will only support the specified `cipher list - // `_ - // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). If not - // specified, the default list will be used. - // - // In non-FIPS builds, the default cipher list is: - // - // .. code-block:: none - // - // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] - // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] - // ECDHE-ECDSA-AES128-SHA - // ECDHE-RSA-AES128-SHA - // AES128-GCM-SHA256 - // AES128-SHA - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // ECDHE-ECDSA-AES256-SHA - // ECDHE-RSA-AES256-SHA - // AES256-GCM-SHA384 - // AES256-SHA - // - // In builds using :ref:`BoringSSL FIPS `, the default cipher list is: - // - // .. code-block:: none - // - // ECDHE-ECDSA-AES128-GCM-SHA256 - // ECDHE-RSA-AES128-GCM-SHA256 - // ECDHE-ECDSA-AES128-SHA - // ECDHE-RSA-AES128-SHA - // AES128-GCM-SHA256 - // AES128-SHA - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // ECDHE-ECDSA-AES256-SHA - // ECDHE-RSA-AES256-SHA - // AES256-GCM-SHA384 - // AES256-SHA - repeated string cipher_suites = 3; - - // If specified, the TLS connection will only support the specified ECDH - // curves. If not specified, the default curves will be used. - // - // In non-FIPS builds, the default curves are: - // - // .. code-block:: none - // - // X25519 - // P-256 - // - // In builds using :ref:`BoringSSL FIPS `, the default curve is: - // - // .. code-block:: none - // - // P-256 - repeated string ecdh_curves = 4; -} - -// BoringSSL private key method configuration. The private key methods are used for external -// (potentially asynchronous) signing and decryption operations. Some use cases for private key -// methods would be TPM support and TLS acceleration. -message PrivateKeyProvider { - // Private key method provider name. The name must match a - // supported private key method provider type. - string provider_name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Private key method provider specific configuration. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true, (udpa.annotations.sensitive) = true]; - - google.protobuf.Any typed_config = 3 [(udpa.annotations.sensitive) = true]; - } -} - -// [#next-free-field: 7] -message TlsCertificate { - // The TLS certificate chain. - core.DataSource certificate_chain = 1; - - // The TLS private key. - core.DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; - - // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. This can't be - // marked as ``oneof`` due to API compatibility reasons. Setting both :ref:`private_key - // ` and - // :ref:`private_key_provider - // ` fields will result in an - // error. - PrivateKeyProvider private_key_provider = 6; - - // The password to decrypt the TLS private key. If this field is not set, it is assumed that the - // TLS private key is not password encrypted. - core.DataSource password = 3 [(udpa.annotations.sensitive) = true]; - - // [#not-implemented-hide:] - core.DataSource ocsp_staple = 4; - - // [#not-implemented-hide:] - repeated core.DataSource signed_certificate_timestamp = 5; -} - -message TlsSessionTicketKeys { - // Keys for encrypting and decrypting TLS session tickets. The - // first key in the array contains the key to encrypt all new sessions created by this context. - // All keys are candidates for decrypting received tickets. This allows for easy rotation of keys - // by, for example, putting the new key first, and the previous key second. - // - // If :ref:`session_ticket_keys ` - // is not specified, the TLS library will still support resuming sessions via tickets, but it will - // use an internally-generated and managed key, so sessions cannot be resumed across hot restarts - // or on different hosts. - // - // Each key must contain exactly 80 bytes of cryptographically-secure random data. For - // example, the output of ``openssl rand 80``. - // - // .. attention:: - // - // Using this feature has serious security considerations and risks. Improper handling of keys - // may result in loss of secrecy in connections, even if ciphers supporting perfect forward - // secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some - // discussion. To minimize the risk, you must: - // - // * Keep the session ticket keys at least as secure as your TLS certificate private keys - // * Rotate session ticket keys at least daily, and preferably hourly - // * Always generate keys using a cryptographically-secure random data source - repeated core.DataSource keys = 1 - [(validate.rules).repeated = {min_items: 1}, (udpa.annotations.sensitive) = true]; -} - -// [#next-free-field: 11] -message CertificateValidationContext { - // Peer certificate verification mode. - enum TrustChainVerification { - // Perform default certificate verification (e.g., against CA / verification lists) - VERIFY_TRUST_CHAIN = 0; - - // Connections where the certificate fails verification will be permitted. - // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). - ACCEPT_UNTRUSTED = 1; - } - - // TLS certificate data containing certificate authority certificates to use in verifying - // a presented peer certificate (e.g. server certificate for clusters or client certificate - // for listeners). If not specified and a peer certificate is presented it will not be - // verified. By default, a client certificate is optional, unless one of the additional - // options (:ref:`require_client_certificate - // `, - // :ref:`verify_certificate_spki - // `, - // :ref:`verify_certificate_hash - // `, or - // :ref:`match_subject_alt_names - // `) is also - // specified. - // - // It can optionally contain certificate revocation lists, in which case Envoy will verify - // that the presented peer certificate has not been revoked by one of the included CRLs. - // - // See :ref:`the TLS overview ` for a list of common - // system CA locations. - core.DataSource trusted_ca = 1; - - // An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the - // SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate - // matches one of the specified values. - // - // A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -pubkey - // | openssl pkey -pubin -outform DER - // | openssl dgst -sha256 -binary - // | openssl enc -base64 - // NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= - // - // This is the format used in HTTP Public Key Pinning. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - // - // .. attention:: - // - // This option is preferred over :ref:`verify_certificate_hash - // `, - // because SPKI is tied to a private key, so it doesn't change when the certificate - // is renewed using the same private key. - repeated string verify_certificate_spki = 3 - [(validate.rules).repeated = {items {string {min_bytes: 44 max_bytes: 44}}}]; - - // An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that - // the SHA-256 of the DER-encoded presented certificate matches one of the specified values. - // - // A hex-encoded SHA-256 of the certificate can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 - // df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a - // - // A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 - // DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A - // - // Both of those formats are acceptable. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - repeated string verify_certificate_hash = 2 - [(validate.rules).repeated = {items {string {min_bytes: 64 max_bytes: 95}}}]; - - // An optional list of Subject Alternative Names. If specified, Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified values. - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - repeated string verify_subject_alt_name = 4 [deprecated = true]; - - // An optional list of Subject Alternative name matchers. Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified matches. - // - // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. - // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", - // it should be configured as shown below. - // - // .. code-block:: yaml - // - // match_subject_alt_names: - // exact: "api.example.com" - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - repeated type.matcher.StringMatcher match_subject_alt_names = 9; - - // [#not-implemented-hide:] Must present a signed time-stamped OCSP response. - google.protobuf.BoolValue require_ocsp_staple = 5; - - // [#not-implemented-hide:] Must present signed certificate time-stamp. - google.protobuf.BoolValue require_signed_certificate_timestamp = 6; - - // An optional `certificate revocation list - // `_ - // (in PEM format). If specified, Envoy will verify that the presented peer - // certificate has not been revoked by this CRL. If this DataSource contains - // multiple CRLs, all of them will be used. - core.DataSource crl = 7; - - // If specified, Envoy will not reject expired certificates. - bool allow_expired_certificate = 8; - - // Certificate trust chain verification mode. - TrustChainVerification trust_chain_verification = 10 - [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/api/v2/auth/secret.proto b/src/main/proto/envoy/api/v2/auth/secret.proto deleted file mode 100644 index 4a4ab3b..0000000 --- a/src/main/proto/envoy/api/v2/auth/secret.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.auth; - -import "envoy/api/v2/auth/common.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/config_source.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.auth"; -option java_outer_classname = "SecretProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.tls.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Secrets configuration] - -message GenericSecret { - // Secret of generic type and is available to filters. - core.DataSource secret = 1 [(udpa.annotations.sensitive) = true]; -} - -message SdsSecretConfig { - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - // When both name and config are specified, then secret can be fetched and/or reloaded via - // SDS. When only name is specified, then secret will be loaded from static resources. - string name = 1; - - core.ConfigSource sds_config = 2; -} - -// [#next-free-field: 6] -message Secret { - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - string name = 1; - - oneof type { - TlsCertificate tls_certificate = 2; - - TlsSessionTicketKeys session_ticket_keys = 3; - - CertificateValidationContext validation_context = 4; - - GenericSecret generic_secret = 5; - } -} diff --git a/src/main/proto/envoy/api/v2/auth/tls.proto b/src/main/proto/envoy/api/v2/auth/tls.proto deleted file mode 100644 index 911ada7..0000000 --- a/src/main/proto/envoy/api/v2/auth/tls.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.auth; - -import "envoy/api/v2/auth/common.proto"; -import "envoy/api/v2/auth/secret.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.auth"; -option java_outer_classname = "TlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.tls.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: TLS transport socket] -// [#extension: envoy.transport_sockets.tls] -// The TLS contexts below provide the transport socket configuration for upstream/downstream TLS. - -message UpstreamTlsContext { - // Common TLS context settings. - // - // .. attention:: - // - // Server certificate verification is not enabled by default. Configure - // :ref:`trusted_ca` to enable - // verification. - CommonTlsContext common_tls_context = 1; - - // SNI string to use when creating TLS backend connections. - string sni = 2 [(validate.rules).string = {max_bytes: 255}]; - - // If true, server-initiated TLS renegotiation will be allowed. - // - // .. attention:: - // - // TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. - bool allow_renegotiation = 3; - - // Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets - // for TLSv1.2 and older) to store for the purpose of session resumption. - // - // Defaults to 1, setting this to 0 disables session resumption. - google.protobuf.UInt32Value max_session_keys = 4; -} - -// [#next-free-field: 8] -message DownstreamTlsContext { - // Common TLS context settings. - CommonTlsContext common_tls_context = 1; - - // If specified, Envoy will reject connections without a valid client - // certificate. - google.protobuf.BoolValue require_client_certificate = 2; - - // If specified, Envoy will reject connections without a valid and matching SNI. - // [#not-implemented-hide:] - google.protobuf.BoolValue require_sni = 3; - - oneof session_ticket_keys_type { - // TLS session ticket key settings. - TlsSessionTicketKeys session_ticket_keys = 4; - - // Config for fetching TLS session ticket keys via SDS API. - SdsSecretConfig session_ticket_keys_sds_secret_config = 5; - - // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS - // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. - // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. - // If this config is set to false and no keys are explicitly configured, the TLS server will issue - // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the - // implication that sessions cannot be resumed across hot restarts or on different hosts. - bool disable_stateless_session_resumption = 7; - } - - // If specified, ``session_timeout`` will change the maximum lifetime (in seconds) of the TLS session. - // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. - // Only seconds can be specified (fractional seconds are ignored). - google.protobuf.Duration session_timeout = 6 [(validate.rules).duration = { - lt {seconds: 4294967296} - gte {} - }]; -} - -// TLS context shared by both client and server TLS contexts. -// [#next-free-field: 9] -message CommonTlsContext { - message CombinedCertificateValidationContext { - // How to validate peer certificates. - CertificateValidationContext default_validation_context = 1 - [(validate.rules).message = {required: true}]; - - // Config for fetching validation context via SDS API. - SdsSecretConfig validation_context_sds_secret_config = 2 - [(validate.rules).message = {required: true}]; - } - - reserved 5; - - // TLS protocol versions, cipher suites etc. - TlsParameters tls_params = 1; - - // :ref:`Multiple TLS certificates ` can be associated with the - // same context to allow both RSA and ECDSA certificates. - // - // Only a single TLS certificate is supported in client contexts. In server contexts, the first - // RSA certificate is used for clients that only support RSA and the first ECDSA certificate is - // used for clients that support ECDSA. - repeated TlsCertificate tls_certificates = 2; - - // Configs for fetching TLS certificates via SDS API. - repeated SdsSecretConfig tls_certificate_sds_secret_configs = 6 - [(validate.rules).repeated = {max_items: 1}]; - - oneof validation_context_type { - // How to validate peer certificates. - CertificateValidationContext validation_context = 3; - - // Config for fetching validation context via SDS API. - SdsSecretConfig validation_context_sds_secret_config = 7; - - // Combined certificate validation context holds a default CertificateValidationContext - // and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic - // and default CertificateValidationContext are merged into a new CertificateValidationContext - // for validation. This merge is done by Message::MergeFrom(), so dynamic - // CertificateValidationContext overwrites singular fields in default - // CertificateValidationContext, and concatenates repeated fields to default - // CertificateValidationContext, and logical OR is applied to boolean fields. - CombinedCertificateValidationContext combined_validation_context = 8; - } - - // Supplies the list of ALPN protocols that the listener should expose. In - // practice this is likely to be set to one of two values (see the - // :ref:`codec_type - // ` - // parameter in the HTTP connection manager for more information): - // - // * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1. - // * "http/1.1" If the listener is only going to support HTTP/1.1. - // - // There is no default for this parameter. If empty, Envoy will not expose ALPN. - repeated string alpn_protocols = 4; -} diff --git a/src/main/proto/envoy/api/v2/cds.proto b/src/main/proto/envoy/api/v2/cds.proto deleted file mode 100644 index 4599d1f..0000000 --- a/src/main/proto/envoy/api/v2/cds.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -import public "envoy/api/v2/cluster.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "CdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: CDS] - -// Return list of all clusters this proxy will load balance to. -service ClusterDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.Cluster"; - - rpc StreamClusters(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc DeltaClusters(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { - } - - rpc FetchClusters(DiscoveryRequest) returns (DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:clusters"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message CdsDummy { -} diff --git a/src/main/proto/envoy/api/v2/cluster.proto b/src/main/proto/envoy/api/v2/cluster.proto deleted file mode 100644 index b1b6751..0000000 --- a/src/main/proto/envoy/api/v2/cluster.proto +++ /dev/null @@ -1,868 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/auth/tls.proto"; -import "envoy/api/v2/cluster/circuit_breaker.proto"; -import "envoy/api/v2/cluster/filter.proto"; -import "envoy/api/v2/cluster/outlier_detection.proto"; -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/config_source.proto"; -import "envoy/api/v2/core/health_check.proto"; -import "envoy/api/v2/core/protocol.proto"; -import "envoy/api/v2/endpoint.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Cluster configuration] - -// Configuration for a single upstream cluster. -// [#next-free-field: 48] -message Cluster { - // Refer to :ref:`service discovery type ` - // for an explanation on each type. - enum DiscoveryType { - // Refer to the :ref:`static discovery type` - // for an explanation. - STATIC = 0; - - // Refer to the :ref:`strict DNS discovery - // type` - // for an explanation. - STRICT_DNS = 1; - - // Refer to the :ref:`logical DNS discovery - // type` - // for an explanation. - LOGICAL_DNS = 2; - - // Refer to the :ref:`service discovery type` - // for an explanation. - EDS = 3; - - // Refer to the :ref:`original destination discovery - // type` - // for an explanation. - ORIGINAL_DST = 4; - } - - // Refer to :ref:`load balancer type ` architecture - // overview section for information on each type. - enum LbPolicy { - // Refer to the :ref:`round robin load balancing - // policy` - // for an explanation. - ROUND_ROBIN = 0; - - // Refer to the :ref:`least request load balancing - // policy` - // for an explanation. - LEAST_REQUEST = 1; - - // Refer to the :ref:`ring hash load balancing - // policy` - // for an explanation. - RING_HASH = 2; - - // Refer to the :ref:`random load balancing - // policy` - // for an explanation. - RANDOM = 3; - - // Refer to the :ref:`original destination load balancing - // policy` - // for an explanation. - // - // .. attention:: - // - // **This load balancing policy is deprecated**. Use CLUSTER_PROVIDED instead. - // - ORIGINAL_DST_LB = 4 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // Refer to the :ref:`Maglev load balancing policy` - // for an explanation. - MAGLEV = 5; - - // This load balancer type must be specified if the configured cluster provides a cluster - // specific load balancer. Consult the configured cluster's documentation for whether to set - // this option or not. - CLUSTER_PROVIDED = 6; - - // [#not-implemented-hide:] Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - // and instead using the new load_balancing_policy field as the one and only mechanism for - // configuring this.] - LOAD_BALANCING_POLICY_CONFIG = 7; - } - - // When V4_ONLY is selected, the DNS resolver will only perform a lookup for - // addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will - // only perform a lookup for addresses in the IPv6 family. If AUTO is - // specified, the DNS resolver will first perform a lookup for addresses in - // the IPv6 family and fallback to a lookup for addresses in the IPv4 family. - // For cluster types other than - // :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS`, - // this setting is - // ignored. - enum DnsLookupFamily { - AUTO = 0; - V4_ONLY = 1; - V6_ONLY = 2; - } - - enum ClusterProtocolSelection { - // Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). - // If :ref:`http2_protocol_options ` are - // present, HTTP2 will be used, otherwise HTTP1.1 will be used. - USE_CONFIGURED_PROTOCOL = 0; - - // Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. - USE_DOWNSTREAM_PROTOCOL = 1; - } - - // TransportSocketMatch specifies what transport socket config will be used - // when the match conditions are satisfied. - message TransportSocketMatch { - // The name of the match, used in stats generation. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional endpoint metadata match criteria. - // The connection to the endpoint with metadata matching what is set in this field - // will use the transport socket configuration specified here. - // The endpoint's metadata entry in *envoy.transport_socket_match* is used to match - // against the values specified in this field. - google.protobuf.Struct match = 2; - - // The configuration of the transport socket. - core.TransportSocket transport_socket = 3; - } - - // Extended cluster type. - message CustomClusterType { - // The type of the cluster to instantiate. The name must match a supported cluster type. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Cluster specific configuration which depends on the cluster being instantiated. - // See the supported cluster for further documentation. - google.protobuf.Any typed_config = 2; - } - - // Only valid when discovery type is EDS. - message EdsClusterConfig { - // Configuration for the source of EDS updates for this Cluster. - core.ConfigSource eds_config = 1; - - // Optional alternative to cluster name to present to EDS. This does not - // have the same restrictions as cluster name, i.e. it may be arbitrary - // length. - string service_name = 2; - } - - // Optionally divide the endpoints in this cluster into subsets defined by - // endpoint metadata and selected by route and weighted cluster metadata. - // [#next-free-field: 8] - message LbSubsetConfig { - // If NO_FALLBACK is selected, a result - // equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, - // any cluster endpoint may be returned (subject to policy, health checks, - // etc). If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - enum LbSubsetFallbackPolicy { - NO_FALLBACK = 0; - ANY_ENDPOINT = 1; - DEFAULT_SUBSET = 2; - } - - // Specifications for subsets. - message LbSubsetSelector { - // Allows to override top level fallback policy per selector. - enum LbSubsetSelectorFallbackPolicy { - // If NOT_DEFINED top level config fallback policy is used instead. - NOT_DEFINED = 0; - - // If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. - NO_FALLBACK = 1; - - // If ANY_ENDPOINT is selected, any cluster endpoint may be returned - // (subject to policy, health checks, etc). - ANY_ENDPOINT = 2; - - // If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - DEFAULT_SUBSET = 3; - - // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata - // keys reduced to - // :ref:`fallback_keys_subset`. - // It allows for a fallback to a different, less specific selector if some of the keys of - // the selector are considered optional. - KEYS_SUBSET = 4; - } - - // List of keys to match with the weighted cluster metadata. - repeated string keys = 1; - - // The behavior used when no endpoint subset matches the selected route's - // metadata. - LbSubsetSelectorFallbackPolicy fallback_policy = 2 - [(validate.rules).enum = {defined_only: true}]; - - // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` - // fallback policy. - // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. - // For any other fallback policy the parameter is not used and should not be set. - // Only values also present in - // :ref:`keys` are allowed, but - // `fallback_keys_subset` cannot be equal to `keys`. - repeated string fallback_keys_subset = 3; - } - - // The behavior used when no endpoint subset matches the selected route's - // metadata. The value defaults to - // :ref:`NO_FALLBACK`. - LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}]; - - // Specifies the default subset of endpoints used during fallback if - // fallback_policy is - // :ref:`DEFAULT_SUBSET`. - // Each field in default_subset is - // compared to the matching LbEndpoint.Metadata under the *envoy.lb* - // namespace. It is valid for no hosts to match, in which case the behavior - // is the same as a fallback_policy of - // :ref:`NO_FALLBACK`. - google.protobuf.Struct default_subset = 2; - - // For each entry, LbEndpoint.Metadata's - // *envoy.lb* namespace is traversed and a subset is created for each unique - // combination of key and value. For example: - // - // .. code-block:: json - // - // { "subset_selectors": [ - // { "keys": [ "version" ] }, - // { "keys": [ "stage", "hardware_type" ] } - // ]} - // - // A subset is matched when the metadata from the selected route and - // weighted cluster contains the same keys and values as the subset's - // metadata. The same host may appear in multiple subsets. - repeated LbSubsetSelector subset_selectors = 3; - - // If true, routing to subsets will take into account the localities and locality weights of the - // endpoints when making the routing decision. - // - // There are some potential pitfalls associated with enabling this feature, as the resulting - // traffic split after applying both a subset match and locality weights might be undesirable. - // - // Consider for example a situation in which you have 50/50 split across two localities X/Y - // which have 100 hosts each without subsetting. If the subset LB results in X having only 1 - // host selected but Y having 100, then a lot more load is being dumped on the single host in X - // than originally anticipated in the load balancing assignment delivered via EDS. - bool locality_weight_aware = 4; - - // When used with locality_weight_aware, scales the weight of each locality by the ratio - // of hosts in the subset vs hosts in the original subset. This aims to even out the load - // going to an individual locality if said locality is disproportionately affected by the - // subset predicate. - bool scale_locality_weight = 5; - - // If true, when a fallback policy is configured and its corresponding subset fails to find - // a host this will cause any host to be selected instead. - // - // This is useful when using the default subset as the fallback policy, given the default - // subset might become empty. With this option enabled, if that happens the LB will attempt - // to select a host from the entire cluster. - bool panic_mode_any = 6; - - // If true, metadata specified for a metadata key will be matched against the corresponding - // endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value - // and any of the elements in the list matches the criteria. - bool list_as_any = 7; - } - - // Specific configuration for the LeastRequest load balancing policy. - message LeastRequestLbConfig { - // The number of random healthy hosts from which the host with the fewest active requests will - // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. - google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}]; - } - - // Specific configuration for the :ref:`RingHash` - // load balancing policy. - message RingHashLbConfig { - // The hash function used to hash hosts onto the ketama ring. - enum HashFunction { - // Use `xxHash `_, this is the default hash function. - XX_HASH = 0; - - // Use `MurmurHash2 `_, this is compatible with - // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled - // on Linux and not macOS. - MURMUR_HASH_2 = 1; - } - - reserved 2; - - // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each - // provided host) the better the request distribution will reflect the desired weights. Defaults - // to 1024 entries, and limited to 8M entries. See also - // :ref:`maximum_ring_size`. - google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}]; - - // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. - HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}]; - - // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered - // to further constrain resource use. See also - // :ref:`minimum_ring_size`. - google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}]; - } - - // Specific configuration for the - // :ref:`Original Destination ` - // load balancing policy. - message OriginalDstLbConfig { - // When true, :ref:`x-envoy-original-dst-host - // ` can be used to override destination - // address. - // - // .. attention:: - // - // This header isn't sanitized by default, so enabling this feature allows HTTP clients to - // route traffic to arbitrary hosts and/or ports, which may have serious security - // consequences. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - bool use_http_header = 1; - } - - // Common configuration for all load balancer implementations. - // [#next-free-field: 8] - message CommonLbConfig { - // Configuration for :ref:`zone aware routing - // `. - message ZoneAwareLbConfig { - // Configures percentage of requests that will be considered for zone aware routing - // if zone aware routing is configured. If not specified, the default is 100%. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - type.Percent routing_enabled = 1; - - // Configures minimum upstream cluster size required for zone aware routing - // If upstream cluster size is less than specified, zone aware routing is not performed - // even if zone aware routing is configured. If not specified, the default is 6. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - google.protobuf.UInt64Value min_cluster_size = 2; - - // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic - // mode`. Instead, the cluster will fail all - // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a - // failing service. - bool fail_traffic_on_panic = 3; - } - - // Configuration for :ref:`locality weighted load balancing - // ` - message LocalityWeightedLbConfig { - } - - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - message ConsistentHashingLbConfig { - // If set to `true`, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - bool use_hostname_for_hashing = 1; - } - - // Configures the :ref:`healthy panic threshold `. - // If not specified, the default is 50%. - // To disable panic mode, set to 0%. - // - // .. note:: - // The specified percent will be truncated to the nearest 1%. - type.Percent healthy_panic_threshold = 1; - - oneof locality_config_specifier { - ZoneAwareLbConfig zone_aware_lb_config = 2; - - LocalityWeightedLbConfig locality_weighted_lb_config = 3; - } - - // If set, all health check/weight/metadata updates that happen within this duration will be - // merged and delivered in one shot when the duration expires. The start of the duration is when - // the first update happens. This is useful for big clusters, with potentially noisy deploys - // that might trigger excessive CPU usage due to a constant stream of healthcheck state changes - // or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new - // cluster). Please always keep in mind that the use of sandbox technologies may change this - // behavior. - // - // If this is not set, we default to a merge window of 1000ms. To disable it, set the merge - // window to 0. - // - // Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is - // because merging those updates isn't currently safe. See - // https://github.com/envoyproxy/envoy/pull/3941. - google.protobuf.Duration update_merge_window = 4; - - // If set to true, Envoy will not consider new hosts when computing load balancing weights until - // they have been health checked for the first time. This will have no effect unless - // active health checking is also configured. - // - // Ignoring a host means that for any load balancing calculations that adjust weights based - // on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and - // panic mode) Envoy will exclude these hosts in the denominator. - // - // For example, with hosts in two priorities P0 and P1, where P0 looks like - // {healthy, unhealthy (new), unhealthy (new)} - // and where P1 looks like - // {healthy, healthy} - // all traffic will still hit P0, as 1 / (3 - 2) = 1. - // - // Enabling this will allow scaling up the number of hosts for a given cluster without entering - // panic mode or triggering priority spillover, assuming the hosts pass the first health check. - // - // If panic mode is triggered, new hosts are still eligible for traffic; they simply do not - // contribute to the calculation when deciding whether panic mode is enabled or not. - bool ignore_new_hosts_until_first_hc = 5; - - // If set to `true`, the cluster manager will drain all existing - // connections to upstream hosts whenever hosts are added or removed from the cluster. - bool close_connections_on_host_set_change = 6; - - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - ConsistentHashingLbConfig consistent_hashing_lb_config = 7; - } - - message RefreshRate { - // Specifies the base interval between refreshes. This parameter is required and must be greater - // than zero and less than - // :ref:`max_interval `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {nanos: 1000000} - }]; - - // Specifies the maximum interval between refreshes. This parameter is optional, but must be - // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}]; - } - - reserved 12, 15; - - // Configuration to use different transport sockets for different endpoints. - // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` - // is used to match against the transport sockets as they appear in the list. The first - // :ref:`match ` is used. - // For example, with the following match - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "enableMTLS" - // match: - // acceptMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - name: "defaultToPlaintext" - // match: {} - // transport_socket: - // name: envoy.transport_sockets.raw_buffer - // - // Connections to the endpoints whose metadata value under *envoy.transport_socket_match* - // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. - // - // If a :ref:`socket match ` with empty match - // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" - // socket match in case above. - // - // If an endpoint metadata's value under *envoy.transport_socket_match* does not match any - // *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or - // *transport_socket* specified in this cluster. - // - // This field allows gradual and flexible transport socket configuration changes. - // - // The metadata of endpoints in EDS can indicate transport socket capabilities. For example, - // an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", - // "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic - // has "acceptPlaintext": "true" metadata information. - // - // Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS - // traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - // *TransportSocketMatch* in this field. Other client Envoys receive CDS without - // *transport_socket_match* set, and still send plain text traffic to the same cluster. - // - // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] - repeated TransportSocketMatch transport_socket_matches = 43; - - // Supplies the name of the cluster which must be unique across all clusters. - // The cluster name is used when emitting - // :ref:`statistics ` if :ref:`alt_stat_name - // ` is not provided. - // Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // An optional alternative to the cluster name to be used while emitting stats. - // Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be - // confused with :ref:`Router Filter Header - // `. - string alt_stat_name = 28; - - oneof cluster_discovery_type { - // The :ref:`service discovery type ` - // to use for resolving the cluster. - DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}]; - - // The custom cluster type. - CustomClusterType cluster_type = 38; - } - - // Configuration to use for EDS updates for the Cluster. - EdsClusterConfig eds_cluster_config = 3; - - // The timeout for new network connections to hosts in the cluster. - google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}]; - - // Soft limit on size of the cluster’s connections read and write buffers. If - // unspecified, an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5; - - // The :ref:`load balancer type ` to use - // when picking a host in the cluster. - LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}]; - - // If the service discovery type is - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS`, - // then hosts is required. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`load_assignment` field instead. - // - repeated core.Address hosts = 7 [deprecated = true]; - - // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. - // This field supersedes the *hosts* field in the v2 API. - // - // .. attention:: - // - // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. - // - ClusterLoadAssignment load_assignment = 33; - - // Optional :ref:`active health checking ` - // configuration for the cluster. If no - // configuration is specified no health checking will be done and all cluster - // members will be considered healthy at all times. - repeated core.HealthCheck health_checks = 8; - - // Optional maximum requests for a single upstream connection. This parameter - // is respected by both the HTTP/1.1 and HTTP/2 connection pool - // implementations. If not specified, there is no limit. Setting this - // parameter to 1 will effectively disable keep alive. - google.protobuf.UInt32Value max_requests_per_connection = 9; - - // Optional :ref:`circuit breaking ` for the cluster. - cluster.CircuitBreakers circuit_breakers = 10; - - // The TLS configuration for connections to the upstream cluster. - // - // .. attention:: - // - // **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are - // set, `transport_socket` takes priority. - auth.UpstreamTlsContext tls_context = 11 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // HTTP protocol options that are applied only to upstream HTTP connections. - // These options apply to all HTTP versions. - core.UpstreamHttpProtocolOptions upstream_http_protocol_options = 46; - - // Additional options when handling HTTP requests upstream. These options will be applicable to - // both HTTP1 and HTTP2 requests. - core.HttpProtocolOptions common_http_protocol_options = 29; - - // Additional options when handling HTTP1 requests. - core.Http1ProtocolOptions http_protocol_options = 13; - - // Even if default HTTP2 protocol options are desired, this field must be - // set so that Envoy will assume that the upstream supports HTTP/2 when - // making new HTTP connection pool connections. Currently, Envoy only - // supports prior knowledge for upstream connections. Even if TLS is used - // with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 - // connections to happen over plain text. - core.Http2ProtocolOptions http2_protocol_options = 14; - - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - map extension_protocol_options = 35 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - map typed_extension_protocol_options = 36; - - // If the DNS refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used as the cluster’s DNS refresh - // rate. The value configured must be at least 1ms. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - google.protobuf.Duration dns_refresh_rate = 16 - [(validate.rules).duration = {gt {nanos: 1000000}}]; - - // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is - // ignored. - RefreshRate dns_failure_refresh_rate = 44; - - // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, - // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS - // resolution. - bool respect_dns_ttl = 39; - - // The DNS IP address resolution policy. If this setting is not specified, the - // value defaults to - // :ref:`AUTO`. - DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}]; - - // If DNS resolvers are specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used to specify the cluster’s dns resolvers. - // If this setting is not specified, the value defaults to the default - // resolver, which uses /etc/resolv.conf for configuration. For cluster types - // other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple's API only allows overriding DNS resolvers via system settings. - repeated core.Address dns_resolvers = 18; - - // [#next-major-version: Reconcile DNS options in a single message.] - // Always use TCP queries instead of UDP queries for DNS lookups. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 45; - - // If specified, outlier detection will be enabled for this upstream cluster. - // Each of the configuration values can be overridden via - // :ref:`runtime values `. - cluster.OutlierDetection outlier_detection = 19; - - // The interval for removing stale hosts from a cluster type - // :ref:`ORIGINAL_DST`. - // Hosts are considered stale if they have not been used - // as upstream destinations during this interval. New hosts are added - // to original destination clusters on demand as new connections are - // redirected to Envoy, causing the number of hosts in the cluster to - // grow over time. Hosts that are not stale (they are actively used as - // destinations) are kept in the cluster, which allows connections to - // them remain open, saving the latency that would otherwise be spent - // on opening new connections. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`ORIGINAL_DST` - // this setting is ignored. - google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}]; - - // Optional configuration used to bind newly established upstream connections. - // This overrides any bind_config specified in the bootstrap proto. - // If the address and port are empty, no bind will be performed. - core.BindConfig upstream_bind_config = 21; - - // Configuration for load balancing subsetting. - LbSubsetConfig lb_subset_config = 22; - - // Optional configuration for the load balancing algorithm selected by - // LbPolicy. Currently only - // :ref:`RING_HASH` and - // :ref:`LEAST_REQUEST` - // has additional configuration options. - // Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding - // LbPolicy will generate an error at runtime. - oneof lb_config { - // Optional configuration for the Ring Hash load balancing policy. - RingHashLbConfig ring_hash_lb_config = 23; - - // Optional configuration for the Original Destination load balancing policy. - OriginalDstLbConfig original_dst_lb_config = 34; - - // Optional configuration for the LeastRequest load balancing policy. - LeastRequestLbConfig least_request_lb_config = 37; - } - - // Common configuration for all load balancer implementations. - CommonLbConfig common_lb_config = 27; - - // Optional custom transport socket implementation to use for upstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`UpstreamTlsContexts ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - core.TransportSocket transport_socket = 24; - - // The Metadata field can be used to provide additional information about the - // cluster. It can be used for stats, logging, and varying filter behavior. - // Fields should use reverse DNS notation to denote which entity within Envoy - // will need the information. For instance, if the metadata is intended for - // the Router filter, the filter name should be specified as *envoy.filters.http.router*. - core.Metadata metadata = 25; - - // Determines how Envoy selects the protocol used to speak to upstream hosts. - ClusterProtocolSelection protocol_selection = 26; - - // Optional options for upstream connections. - UpstreamConnectionOptions upstream_connection_options = 30; - - // If an upstream host becomes unhealthy (as determined by the configured health checks - // or outlier detection), immediately close all connections to the failed host. - // - // .. note:: - // - // This is currently only supported for connections created by tcp_proxy. - // - // .. note:: - // - // The current implementation of this feature closes all connections immediately when - // the unhealthy status is detected. If there are a large number of connections open - // to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of - // time exclusively closing these connections, and not processing any other traffic. - bool close_connections_on_host_health_failure = 31; - - // If set to true, Envoy will ignore the health value of a host when processing its removal - // from service discovery. This means that if active health checking is used, Envoy will *not* - // wait for the endpoint to go unhealthy before removing it. - bool drain_connections_on_host_removal = 32 - [(udpa.annotations.field_migrate).rename = "ignore_health_on_host_removal"]; - - // An (optional) network filter chain, listed in the order the filters should be applied. - // The chain will be applied to all outgoing connections that Envoy makes to the upstream - // servers of this cluster. - repeated cluster.Filter filters = 40; - - // [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the - // :ref:`lb_policy` field has the value - // :ref:`LOAD_BALANCING_POLICY_CONFIG`. - LoadBalancingPolicy load_balancing_policy = 41; - - // [#not-implemented-hide:] - // If present, tells the client where to send load reports via LRS. If not present, the - // client will fall back to a client-side default, which may be either (a) don't send any - // load reports or (b) send load reports for all clusters to a single default server - // (which may be configured in the bootstrap file). - // - // Note that if multiple clusters point to the same LRS server, the client may choose to - // create a separate stream for each cluster or it may choose to coalesce the data for - // multiple clusters onto a single stream. Either way, the client must make sure to send - // the data for any given cluster on no more than one stream. - // - // [#next-major-version: In the v3 API, we should consider restructuring this somehow, - // maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation - // from the LRS stream here.] - core.ConfigSource lrs_server = 42; - - // If track_timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - bool track_timeout_budgets = 47; -} - -// [#not-implemented-hide:] Extensible load balancing policy configuration. -// -// Every LB policy defined via this mechanism will be identified via a unique name using reverse -// DNS notation. If the policy needs configuration parameters, it must define a message for its -// own configuration, which will be stored in the config field. The name of the policy will tell -// clients which type of message they should expect to see in the config field. -// -// Note that there are cases where it is useful to be able to independently select LB policies -// for choosing a locality and for choosing an endpoint within that locality. For example, a -// given deployment may always use the same policy to choose the locality, but for choosing the -// endpoint within the locality, some clusters may use weighted-round-robin, while others may -// use some sort of session-based balancing. -// -// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a -// child LB policy for each locality. For each request, the parent chooses the locality and then -// delegates to the child policy for that locality to choose the endpoint within the locality. -// -// To facilitate this, the config message for the top-level LB policy may include a field of -// type LoadBalancingPolicy that specifies the child policy. -message LoadBalancingPolicy { - message Policy { - // Required. The name of the LB policy. - string name = 1; - - // Optional config for the LB policy. - // No more than one of these two fields may be populated. - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - - // Each client will iterate over the list in order and stop at the first policy that it - // supports. This provides a mechanism for starting to use new LB policies that are not yet - // supported by all clients. - repeated Policy policies = 1; -} - -// An extensible structure containing the address Envoy should bind to when -// establishing upstream connections. -message UpstreamBindConfig { - // The address Envoy should bind to when establishing upstream connections. - core.Address source_address = 1; -} - -message UpstreamConnectionOptions { - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - core.TcpKeepalive tcp_keepalive = 1; -} diff --git a/src/main/proto/envoy/api/v2/cluster/circuit_breaker.proto b/src/main/proto/envoy/api/v2/cluster/circuit_breaker.proto deleted file mode 100644 index c45409b..0000000 --- a/src/main/proto/envoy/api/v2/cluster/circuit_breaker.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.cluster; - -import "envoy/api/v2/core/base.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.cluster"; -option java_outer_classname = "CircuitBreakerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; -option csharp_namespace = "Envoy.Api.V2.ClusterNS"; -option ruby_package = "Envoy::Api::V2::ClusterNS"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Circuit breakers] - -// :ref:`Circuit breaking` settings can be -// specified individually for each defined priority. -message CircuitBreakers { - // A Thresholds defines CircuitBreaker settings for a - // :ref:`RoutingPriority`. - // [#next-free-field: 9] - message Thresholds { - message RetryBudget { - // Specifies the limit on concurrent retries as a percentage of the sum of active requests and - // active pending requests. For example, if there are 100 active requests and the - // budget_percent is set to 25, there may be 25 active retries. - // - // This parameter is optional. Defaults to 20%. - type.Percent budget_percent = 1; - - // Specifies the minimum retry concurrency allowed for the retry budget. The limit on the - // number of active retries may never go below this number. - // - // This parameter is optional. Defaults to 3. - google.protobuf.UInt32Value min_retry_concurrency = 2; - } - - // The :ref:`RoutingPriority` - // the specified CircuitBreaker settings apply to. - core.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}]; - - // The maximum number of connections that Envoy will make to the upstream - // cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_connections = 2; - - // The maximum number of pending requests that Envoy will allow to the - // upstream cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_pending_requests = 3; - - // The maximum number of parallel requests that Envoy will make to the - // upstream cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_requests = 4; - - // The maximum number of parallel retries that Envoy will allow to the - // upstream cluster. If not specified, the default is 3. - google.protobuf.UInt32Value max_retries = 5; - - // Specifies a limit on concurrent retries in relation to the number of active requests. This - // parameter is optional. - // - // .. note:: - // - // If this field is set, the retry budget will override any configured retry circuit - // breaker. - RetryBudget retry_budget = 8; - - // If track_remaining is true, then stats will be published that expose - // the number of resources remaining until the circuit breakers open. If - // not specified, the default is false. - // - // .. note:: - // - // If a retry budget is used in lieu of the max_retries circuit breaker, - // the remaining retry resources remaining will not be tracked. - bool track_remaining = 6; - - // The maximum number of connection pools per cluster that Envoy will concurrently support at - // once. If not specified, the default is unlimited. Set this for clusters which create a - // large number of connection pools. See - // :ref:`Circuit Breaking ` for - // more details. - google.protobuf.UInt32Value max_connection_pools = 7; - } - - // If multiple :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, - // the first one in the list is used. If no Thresholds is defined for a given - // :ref:`RoutingPriority`, the default values - // are used. - repeated Thresholds thresholds = 1; -} diff --git a/src/main/proto/envoy/api/v2/cluster/filter.proto b/src/main/proto/envoy/api/v2/cluster/filter.proto deleted file mode 100644 index 1609be4..0000000 --- a/src/main/proto/envoy/api/v2/cluster/filter.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.cluster; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.cluster"; -option java_outer_classname = "FilterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; -option csharp_namespace = "Envoy.Api.V2.ClusterNS"; -option ruby_package = "Envoy::Api::V2::ClusterNS"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Upstream filters] -// Upstream filters apply to the connections to the upstream cluster hosts. - -message Filter { - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - google.protobuf.Any typed_config = 2; -} diff --git a/src/main/proto/envoy/api/v2/cluster/outlier_detection.proto b/src/main/proto/envoy/api/v2/cluster/outlier_detection.proto deleted file mode 100644 index 4a86160..0000000 --- a/src/main/proto/envoy/api/v2/cluster/outlier_detection.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.cluster; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.cluster"; -option java_outer_classname = "OutlierDetectionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"; -option csharp_namespace = "Envoy.Api.V2.ClusterNS"; -option ruby_package = "Envoy::Api::V2::ClusterNS"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Outlier detection] - -// See the :ref:`architecture overview ` for -// more information on outlier detection. -// [#next-free-field: 21] -message OutlierDetection { - // The number of consecutive server-side error responses (for HTTP traffic, - // 5xx responses; for TCP traffic, connection failures; for Redis, failure to - // respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5. - google.protobuf.UInt32Value consecutive_5xx = 1; - - // The time interval between ejection analysis sweeps. This can result in - // both new ejections as well as hosts being returned to service. Defaults - // to 10000ms or 10s. - google.protobuf.Duration interval = 2 [(validate.rules).duration = {gt {}}]; - - // The base time that a host is ejected for. The real time is equal to the - // base time multiplied by the number of times the host has been ejected. - // Defaults to 30000ms or 30s. - google.protobuf.Duration base_ejection_time = 3 [(validate.rules).duration = {gt {}}]; - - // The maximum % of an upstream cluster that can be ejected due to outlier - // detection. Defaults to 10% but will eject at least one host regardless of the value. - google.protobuf.UInt32Value max_ejection_percent = 4 [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive 5xx. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. - google.protobuf.UInt32Value enforcing_consecutive_5xx = 5 [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics. This setting can be used to - // disable ejection or to ramp it up slowly. Defaults to 100. - google.protobuf.UInt32Value enforcing_success_rate = 6 [(validate.rules).uint32 = {lte: 100}]; - - // The number of hosts in a cluster that must have enough request volume to - // detect success rate outliers. If the number of hosts is less than this - // setting, outlier detection via success rate statistics is not performed - // for any host in the cluster. Defaults to 5. - google.protobuf.UInt32Value success_rate_minimum_hosts = 7; - - // The minimum number of total requests that must be collected in one - // interval (as defined by the interval duration above) to include this host - // in success rate based outlier detection. If the volume is lower than this - // setting, outlier detection via success rate statistics is not performed - // for that host. Defaults to 100. - google.protobuf.UInt32Value success_rate_request_volume = 8; - - // This factor is used to determine the ejection threshold for success rate - // outlier ejection. The ejection threshold is the difference between the - // mean success rate, and the product of this factor and the standard - // deviation of the mean success rate: mean - (stdev * - // success_rate_stdev_factor). This factor is divided by a thousand to get a - // double. That is, if the desired factor is 1.9, the runtime value should - // be 1900. Defaults to 1900. - google.protobuf.UInt32Value success_rate_stdev_factor = 9; - - // The number of consecutive gateway failures (502, 503, 504 status codes) - // before a consecutive gateway failure ejection occurs. Defaults to 5. - google.protobuf.UInt32Value consecutive_gateway_failure = 10; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive gateway failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 0. - google.protobuf.UInt32Value enforcing_consecutive_gateway_failure = 11 - [(validate.rules).uint32 = {lte: 100}]; - - // Determines whether to distinguish local origin failures from external errors. If set to true - // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` - // and - // :ref:`enforcing_local_origin_success_rate`. - // Defaults to false. - bool split_external_local_origin_errors = 12; - - // The number of consecutive locally originated failures before ejection - // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value consecutive_local_origin_failure = 13; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive locally originated failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value enforcing_consecutive_local_origin_failure = 14 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics for locally originated errors. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value enforcing_local_origin_success_rate = 15 - [(validate.rules).uint32 = {lte: 100}]; - - // The failure percentage to use when determining failure percentage-based outlier detection. If - // the failure percentage of a given host is greater than or equal to this value, it will be - // ejected. Defaults to 85. - google.protobuf.UInt32Value failure_percentage_threshold = 16 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status is detected through - // failure percentage statistics. This setting can be used to disable ejection or to ramp it up - // slowly. Defaults to 0. - // - // [#next-major-version: setting this without setting failure_percentage_threshold should be - // invalid in v4.] - google.protobuf.UInt32Value enforcing_failure_percentage = 17 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status is detected through - // local-origin failure percentage statistics. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. - google.protobuf.UInt32Value enforcing_failure_percentage_local_origin = 18 - [(validate.rules).uint32 = {lte: 100}]; - - // The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. - // If the total number of hosts in the cluster is less than this value, failure percentage-based - // ejection will not be performed. Defaults to 5. - google.protobuf.UInt32Value failure_percentage_minimum_hosts = 19; - - // The minimum number of total requests that must be collected in one interval (as defined by the - // interval duration above) to perform failure percentage-based ejection for this host. If the - // volume is lower than this setting, failure percentage-based ejection will not be performed for - // this host. Defaults to 50. - google.protobuf.UInt32Value failure_percentage_request_volume = 20; -} diff --git a/src/main/proto/envoy/api/v2/core/address.proto b/src/main/proto/envoy/api/v2/core/address.proto deleted file mode 100644 index 3399538..0000000 --- a/src/main/proto/envoy/api/v2/core/address.proto +++ /dev/null @@ -1,135 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "envoy/api/v2/core/socket_option.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "AddressProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Network addresses] - -message Pipe { - // Unix Domain Socket path. On Linux, paths starting with '@' will use the - // abstract namespace. The starting '@' is replaced by a null byte by Envoy. - // Paths starting with '@' will result in an error in environments other than - // Linux. - string path = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The mode for the Pipe. Not applicable for abstract sockets. - uint32 mode = 2 [(validate.rules).uint32 = {lte: 511}]; -} - -// [#next-free-field: 7] -message SocketAddress { - enum Protocol { - TCP = 0; - UDP = 1; - } - - Protocol protocol = 1 [(validate.rules).enum = {defined_only: true}]; - - // The address for this socket. :ref:`Listeners ` will bind - // to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` - // to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: - // It is possible to distinguish a Listener address via the prefix/suffix matching - // in :ref:`FilterChainMatch `.] When used - // within an upstream :ref:`BindConfig `, the address - // controls the source address of outbound connections. For :ref:`clusters - // `, the cluster type determines whether the - // address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS - // (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized - // via :ref:`resolver_name `. - string address = 2 [(validate.rules).string = {min_bytes: 1}]; - - oneof port_specifier { - option (validate.required) = true; - - uint32 port_value = 3 [(validate.rules).uint32 = {lte: 65535}]; - - // This is only valid if :ref:`resolver_name - // ` is specified below and the - // named resolver is capable of named port resolution. - string named_port = 4; - } - - // The name of the custom resolver. This must have been registered with Envoy. If - // this is empty, a context dependent default applies. If the address is a concrete - // IP address, no resolution will occur. If address is a hostname this - // should be set for resolution other than DNS. Specifying a custom resolver with - // *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. - string resolver_name = 5; - - // When binding to an IPv6 address above, this enables `IPv4 compatibility - // `_. Binding to ``::`` will - // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into - // IPv6 space as ``::FFFF:``. - bool ipv4_compat = 6; -} - -message TcpKeepalive { - // Maximum number of keepalive probes to send without response before deciding - // the connection is dead. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 9.) - google.protobuf.UInt32Value keepalive_probes = 1; - - // The number of seconds a connection needs to be idle before keep-alive probes - // start being sent. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 7200s (i.e., 2 hours.) - google.protobuf.UInt32Value keepalive_time = 2; - - // The number of seconds between keep-alive probes. Default is to use the OS - // level configuration (unless overridden, Linux defaults to 75s.) - google.protobuf.UInt32Value keepalive_interval = 3; -} - -message BindConfig { - // The address to bind to when creating a socket. - SocketAddress source_address = 1 [(validate.rules).message = {required: true}]; - - // Whether to set the *IP_FREEBIND* option when creating the socket. When this - // flag is set to true, allows the :ref:`source_address - // ` to be an IP address - // that is not configured on the system running Envoy. When this flag is set - // to false, the option *IP_FREEBIND* is disabled on the socket. When this - // flag is not set (default), the socket is not modified, i.e. the option is - // neither enabled nor disabled. - google.protobuf.BoolValue freebind = 2; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated SocketOption socket_options = 3; -} - -// Addresses specify either a logical or physical address and port, which are -// used to tell Envoy where to bind/listen, connect to upstream and find -// management servers. -message Address { - oneof address { - option (validate.required) = true; - - SocketAddress socket_address = 1; - - Pipe pipe = 2; - } -} - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. -message CidrRange { - // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. - string address_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. - google.protobuf.UInt32Value prefix_len = 2 [(validate.rules).uint32 = {lte: 128}]; -} diff --git a/src/main/proto/envoy/api/v2/core/backoff.proto b/src/main/proto/envoy/api/v2/core/backoff.proto deleted file mode 100644 index 845dfce..0000000 --- a/src/main/proto/envoy/api/v2/core/backoff.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "BackoffProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Backoff Strategy] - -// Configuration defining a jittered exponential back off strategy. -message BackoffStrategy { - // The base interval to be used for the next back off computation. It should - // be greater than zero and less than or equal to :ref:`max_interval - // `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; - - // Specifies the maximum interval between retries. This parameter is optional, - // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default - // is 10 times the :ref:`base_interval - // `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; -} diff --git a/src/main/proto/envoy/api/v2/core/base.proto b/src/main/proto/envoy/api/v2/core/base.proto deleted file mode 100644 index 94b346b..0000000 --- a/src/main/proto/envoy/api/v2/core/base.proto +++ /dev/null @@ -1,382 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/backoff.proto"; -import "envoy/api/v2/core/http_uri.proto"; -import "envoy/type/percent.proto"; -import "envoy/type/semantic_version.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -import public "envoy/api/v2/core/socket_option.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "BaseProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common types] - -// Envoy supports :ref:`upstream priority routing -// ` both at the route and the virtual -// cluster level. The current priority implementation uses different connection -// pool and circuit breaking settings for each priority level. This means that -// even for HTTP/2 requests, two physical connections will be used to an -// upstream host. In the future Envoy will likely support true HTTP/2 priority -// over a single upstream connection. -enum RoutingPriority { - DEFAULT = 0; - HIGH = 1; -} - -// HTTP request method. -enum RequestMethod { - METHOD_UNSPECIFIED = 0; - GET = 1; - HEAD = 2; - POST = 3; - PUT = 4; - DELETE = 5; - CONNECT = 6; - OPTIONS = 7; - TRACE = 8; - PATCH = 9; -} - -// Identifies the direction of the traffic relative to the local Envoy. -enum TrafficDirection { - // Default option is unspecified. - UNSPECIFIED = 0; - - // The transport is used for incoming traffic. - INBOUND = 1; - - // The transport is used for outgoing traffic. - OUTBOUND = 2; -} - -// Identifies location of where either Envoy runs or where upstream hosts run. -message Locality { - // Region this :ref:`zone ` belongs to. - string region = 1; - - // Defines the local service zone where Envoy is running. Though optional, it - // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, - // either in this message or via :option:`--service-zone`. The meaning of zone - // is context dependent, e.g. `Availability Zone (AZ) - // `_ - // on AWS, `Zone `_ on - // GCP, etc. - string zone = 2; - - // When used for locality of upstream hosts, this field further splits zone - // into smaller chunks of sub-zones so they can be load balanced - // independently. - string sub_zone = 3; -} - -// BuildVersion combines SemVer version of extension with free-form build information -// (i.e. 'alpha', 'private-build') as a set of strings. -message BuildVersion { - // SemVer version of extension. - type.SemanticVersion version = 1; - - // Free-form build information. - // Envoy defines several well known keys in the source/common/version/version.h file - google.protobuf.Struct metadata = 2; -} - -// Version and identification for an Envoy extension. -// [#next-free-field: 6] -message Extension { - // This is the name of the Envoy filter as specified in the Envoy - // configuration, e.g. envoy.filters.http.router, com.acme.widget. - string name = 1; - - // Category of the extension. - // Extension category names use reverse DNS notation. For instance "envoy.filters.listener" - // for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from - // acme.com vendor. - // [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] - string category = 2; - - // [#not-implemented-hide:] Type descriptor of extension configuration proto. - // [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] - // [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] - string type_descriptor = 3; - - // The version is a property of the extension and maintained independently - // of other extensions and the Envoy API. - // This field is not set when extension did not provide version information. - BuildVersion version = 4; - - // Indicates that the extension is present but was disabled via dynamic configuration. - bool disabled = 5; -} - -// Identifies a specific Envoy instance. The node identifier is presented to the -// management server, which may use this identifier to distinguish per Envoy -// configuration for serving. -// [#next-free-field: 12] -message Node { - // An opaque node identifier for the Envoy node. This also provides the local - // service node name. It should be set if any of the following features are - // used: :ref:`statsd `, :ref:`CDS - // `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-node`. - string id = 1; - - // Defines the local service cluster name where Envoy is running. Though - // optional, it should be set if any of the following features are used: - // :ref:`statsd `, :ref:`health check cluster - // verification - // `, - // :ref:`runtime override directory `, - // :ref:`user agent addition - // `, - // :ref:`HTTP global rate limiting `, - // :ref:`CDS `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-cluster`. - string cluster = 2; - - // Opaque metadata extending the node identifier. Envoy will pass this - // directly to the management server. - google.protobuf.Struct metadata = 3; - - // Locality specifying where the Envoy instance is running. - Locality locality = 4; - - // This is motivated by informing a management server during canary which - // version of Envoy is being tested in a heterogeneous fleet. This will be set - // by Envoy in management server RPCs. - // This field is deprecated in favor of the user_agent_name and user_agent_version values. - string build_version = 5 [deprecated = true]; - - // Free-form string that identifies the entity requesting config. - // E.g. "envoy" or "grpc" - string user_agent_name = 6; - - oneof user_agent_version_type { - // Free-form string that identifies the version of the entity requesting config. - // E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" - string user_agent_version = 7; - - // Structured version of the entity requesting config. - BuildVersion user_agent_build_version = 8; - } - - // List of extensions and their versions supported by the node. - repeated Extension extensions = 9; - - // Client feature support list. These are well known features described - // in the Envoy API repository for a given major version of an API. Client features - // use reverse DNS naming scheme, for example `com.acme.feature`. - // See :ref:`the list of features ` that xDS client may - // support. - repeated string client_features = 10; - - // Known listening ports on the node as a generic hint to the management server - // for filtering :ref:`listeners ` to be returned. For example, - // if there is a listener bound to port 80, the list can optionally contain the - // SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. - repeated Address listening_addresses = 11; -} - -// Metadata provides additional inputs to filters based on matched listeners, -// filter chains, routes and endpoints. It is structured as a map, usually from -// filter name (in reverse DNS format) to metadata specific to the filter. Metadata -// key-values for a filter are merged as connection and request handling occurs, -// with later values for the same key overriding earlier values. -// -// An example use of metadata is providing additional values to -// http_connection_manager in the envoy.http_connection_manager.access_log -// namespace. -// -// Another example use of metadata is to per service config info in cluster metadata, which may get -// consumed by multiple filters. -// -// For load balancing, Metadata provides a means to subset cluster endpoints. -// Endpoints have a Metadata object associated and routes contain a Metadata -// object to match against. There are some well defined metadata used today for -// this purpose: -// -// * ``{"envoy.lb": {"canary": }}`` This indicates the canary status of an -// endpoint and is also used during header processing -// (x-envoy-upstream-canary) and for stats purposes. -// [#next-major-version: move to type/metadata/v2] -message Metadata { - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* - // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; -} - -// Runtime derived uint32 with a default when not specified. -message RuntimeUInt32 { - // Default value if runtime value is not available. - uint32 default_value = 2; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 3 [(validate.rules).string = {min_bytes: 1}]; -} - -// Runtime derived double with a default when not specified. -message RuntimeDouble { - // Default value if runtime value is not available. - double default_value = 1; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 2 [(validate.rules).string = {min_bytes: 1}]; -} - -// Runtime derived bool with a default when not specified. -message RuntimeFeatureFlag { - // Default value if runtime value is not available. - google.protobuf.BoolValue default_value = 1 [(validate.rules).message = {required: true}]; - - // Runtime key to get value for comparison. This value is used if defined. The boolean value must - // be represented via its - // `canonical JSON encoding `_. - string runtime_key = 2 [(validate.rules).string = {min_bytes: 1}]; -} - -// Header name/value pair. -message HeaderValue { - // Header name. - string key = 1 - [(validate.rules).string = - {min_bytes: 1 max_bytes: 16384 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Header value. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown header values are replaced with the empty string instead of `-`. - string value = 2 [ - (validate.rules).string = {max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false} - ]; -} - -// Header name/value pair plus option to control append behavior. -message HeaderValueOption { - // Header name/value pair that this option applies to. - HeaderValue header = 1 [(validate.rules).message = {required: true}]; - - // Should the value be appended? If true (default), the value is appended to - // existing values. - google.protobuf.BoolValue append = 2; -} - -// Wrapper for a set of headers. -message HeaderMap { - repeated HeaderValue headers = 1; -} - -// Data source consisting of either a file or an inline value. -message DataSource { - oneof specifier { - option (validate.required) = true; - - // Local filesystem data source. - string filename = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Bytes inlined in the configuration. - bytes inline_bytes = 2 [(validate.rules).bytes = {min_len: 1}]; - - // String inlined in the configuration. - string inline_string = 3 [(validate.rules).string = {min_bytes: 1}]; - } -} - -// The message specifies the retry policy of remote data source when fetching fails. -message RetryPolicy { - // Specifies parameters that control :ref:`retry backoff strategy `. - // This parameter is optional, in which case the default base interval is 1000 milliseconds. The - // default maximum interval is 10 times the base interval. - BackoffStrategy retry_back_off = 1; - - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. - google.protobuf.UInt32Value num_retries = 2; -} - -// The message specifies how to fetch data from remote and how to verify it. -message RemoteDataSource { - // The HTTP URI to fetch the remote data. - HttpUri http_uri = 1 [(validate.rules).message = {required: true}]; - - // SHA256 string for verifying data. - string sha256 = 2 [(validate.rules).string = {min_bytes: 1}]; - - // Retry policy for fetching remote data. - RetryPolicy retry_policy = 3; -} - -// Async data source which support async data fetch. -message AsyncDataSource { - oneof specifier { - option (validate.required) = true; - - // Local async data source. - DataSource local = 1; - - // Remote async data source. - RemoteDataSource remote = 2; - } -} - -// Configuration for transport socket in :ref:`listeners ` and -// :ref:`clusters `. If the configuration is -// empty, a default transport socket implementation and configuration will be -// chosen based on the platform and existence of tls_context. -message TransportSocket { - // The name of the transport socket to instantiate. The name must match a supported transport - // socket implementation. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Implementation specific configuration which depends on the implementation being instantiated. - // See the supported transport socket implementations for further documentation. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } -} - -// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not -// specified via a runtime key. -// -// .. note:: -// -// Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML -// and may also be represented as an integer with the assumption that the value is an integral -// percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse -// as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. -message RuntimeFractionalPercent { - // Default value if the runtime value's for the numerator/denominator keys are not available. - type.FractionalPercent default_value = 1 [(validate.rules).message = {required: true}]; - - // Runtime key for a YAML representation of a FractionalPercent. - string runtime_key = 2; -} - -// Identifies a specific ControlPlane instance that Envoy is connected to. -message ControlPlane { - // An opaque control plane identifier that uniquely identifies an instance - // of control plane. This can be used to identify which control plane instance, - // the Envoy is connected to. - string identifier = 1; -} diff --git a/src/main/proto/envoy/api/v2/core/config_source.proto b/src/main/proto/envoy/api/v2/core/config_source.proto deleted file mode 100644 index b3b400a..0000000 --- a/src/main/proto/envoy/api/v2/core/config_source.proto +++ /dev/null @@ -1,186 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "ConfigSourceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Configuration sources] - -// xDS API version. This is used to describe both resource and transport -// protocol versions (in distinct configuration fields). -enum ApiVersion { - // When not specified, we assume v2, to ease migration to Envoy's stable API - // versioning. If a client does not support v2 (e.g. due to deprecation), this - // is an invalid value. - AUTO = 0 [deprecated = true]; - - // Use xDS v2 API. - V2 = 1 [deprecated = true]; - - // Use xDS v3 API. - V3 = 2; -} - -// API configuration source. This identifies the API type and cluster that Envoy -// will use to fetch an xDS API. -// [#next-free-field: 9] -message ApiConfigSource { - // APIs may be fetched via either REST or gRPC. - enum ApiType { - // Ideally this would be 'reserved 0' but one can't reserve the default - // value. Instead we throw an exception if this is ever used. - UNSUPPORTED_REST_LEGACY = 0 - [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // REST-JSON v2 API. The `canonical JSON encoding - // `_ for - // the v2 protos is used. - REST = 1; - - // gRPC v2 API. - GRPC = 2; - - // Using the delta xDS gRPC service, i.e. DeltaDiscovery{Request,Response} - // rather than Discovery{Request,Response}. Rather than sending Envoy the entire state - // with every update, the xDS server only sends what has changed since the last update. - DELTA_GRPC = 3; - } - - // API type (gRPC, REST, delta gRPC) - ApiType api_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - ApiVersion transport_api_version = 8 [(validate.rules).enum = {defined_only: true}]; - - // Cluster names should be used only with REST. If > 1 - // cluster is defined, clusters will be cycled through if any kind of failure - // occurs. - // - // .. note:: - // - // The cluster with name ``cluster_name`` must be statically defined and its - // type must not be ``EDS``. - repeated string cluster_names = 2; - - // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, - // services will be cycled through if any kind of failure occurs. - repeated GrpcService grpc_services = 4; - - // For REST APIs, the delay between successive polls. - google.protobuf.Duration refresh_delay = 3; - - // For REST APIs, the request timeout. If not set, a default value of 1s will be used. - google.protobuf.Duration request_timeout = 5 [(validate.rules).duration = {gt {}}]; - - // For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be - // rate limited. - RateLimitSettings rate_limit_settings = 6; - - // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. - bool set_node_on_first_message_only = 7; -} - -// Aggregated Discovery Service (ADS) options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that ADS is to be used. -message AggregatedConfigSource { -} - -// [#not-implemented-hide:] -// Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that other data can be obtained from the same server. -message SelfConfigSource { - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - ApiVersion transport_api_version = 1 [(validate.rules).enum = {defined_only: true}]; -} - -// Rate Limit settings to be applied for discovery requests made by Envoy. -message RateLimitSettings { - // Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a - // default value of 100 will be used. - google.protobuf.UInt32Value max_tokens = 1; - - // Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens - // per second will be used. - google.protobuf.DoubleValue fill_rate = 2 [(validate.rules).double = {gt: 0.0}]; -} - -// Configuration for :ref:`listeners `, :ref:`clusters -// `, :ref:`routes -// `, :ref:`endpoints -// ` etc. may either be sourced from the -// filesystem or from an xDS API source. Filesystem configs are watched with -// inotify for updates. -// [#next-free-field: 7] -message ConfigSource { - oneof config_source_specifier { - option (validate.required) = true; - - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: - // - // Envoy will only watch the file path for *moves.* This is because in general only moves - // are atomic. The same method of swapping files as is demonstrated in the - // :ref:`runtime documentation ` can be used here also. - string path = 1; - - // API configuration source. - ApiConfigSource api_config_source = 2; - - // When set, ADS will be used to fetch resources. The ADS API configuration - // source in the bootstrap configuration is used. - AggregatedConfigSource ads = 3; - - // [#not-implemented-hide:] - // When set, the client will access the resources from the same server it got the - // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a - // different stream to the same server. As a result, this field can be used for things - // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) - // LDS to RDS on the same server without requiring the management server to know its name - // or required credentials. - // [#next-major-version: In xDS v3, consider replacing the ads field with this one, since - // this field can implicitly mean to use the same stream in the case where the ConfigSource - // is provided via ADS and the specified data can also be obtained via ADS.] - SelfConfigSource self = 5; - } - - // When this timeout is specified, Envoy will wait no longer than the specified time for first - // config response on this xDS subscription during the :ref:`initialization process - // `. After reaching the timeout, Envoy will move to the next - // initialization phase, even if the first config is not delivered yet. The timer is activated - // when the xDS API subscription starts, and is disarmed on first config update or on error. 0 - // means no timeout - Envoy will wait indefinitely for the first xDS config (unless another - // timeout applies). The default is 15s. - google.protobuf.Duration initial_fetch_timeout = 4; - - // API version for xDS resources. This implies the type URLs that the client - // will request for resources and the resource type that the client will in - // turn expect to be delivered. - ApiVersion resource_api_version = 6 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/api/v2/core/event_service_config.proto b/src/main/proto/envoy/api/v2/core/event_service_config.proto deleted file mode 100644 index 12ec25d..0000000 --- a/src/main/proto/envoy/api/v2/core/event_service_config.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "EventServiceConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#not-implemented-hide:] -// Configuration of the event reporting service endpoint. -message EventServiceConfig { - oneof config_source_specifier { - option (validate.required) = true; - - // Specifies the gRPC service that hosts the event reporting service. - GrpcService grpc_service = 1; - } -} diff --git a/src/main/proto/envoy/api/v2/core/grpc_method_list.proto b/src/main/proto/envoy/api/v2/core/grpc_method_list.proto deleted file mode 100644 index b4dbe69..0000000 --- a/src/main/proto/envoy/api/v2/core/grpc_method_list.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "GrpcMethodListProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC method list] - -// A list of gRPC methods which can be used as an allowlist, for example. -message GrpcMethodList { - message Service { - // The name of the gRPC service. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The names of the gRPC methods in this service. - repeated string method_names = 2 [(validate.rules).repeated = {min_items: 1}]; - } - - repeated Service services = 1; -} diff --git a/src/main/proto/envoy/api/v2/core/grpc_service.proto b/src/main/proto/envoy/api/v2/core/grpc_service.proto deleted file mode 100644 index 027a45e..0000000 --- a/src/main/proto/envoy/api/v2/core/grpc_service.proto +++ /dev/null @@ -1,228 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "GrpcServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC services] - -// gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. -// [#next-free-field: 6] -message GrpcService { - message EnvoyGrpc { - // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. - string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}]; - } - - // [#next-free-field: 7] - message GoogleGrpc { - // See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. - message SslCredentials { - // PEM encoded server root certificates. - DataSource root_certs = 1; - - // PEM encoded client private key. - DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; - - // PEM encoded client certificate chain. - DataSource cert_chain = 3; - } - - // Local channel credentials. Only UDS is supported for now. - // See https://github.com/grpc/grpc/pull/15909. - message GoogleLocalCredentials { - } - - // See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call - // credential types. - message ChannelCredentials { - oneof credential_specifier { - option (validate.required) = true; - - SslCredentials ssl_credentials = 1; - - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - google.protobuf.Empty google_default = 2; - - GoogleLocalCredentials local_credentials = 3; - } - } - - // [#next-free-field: 8] - message CallCredentials { - message ServiceAccountJWTAccessCredentials { - string json_key = 1; - - uint64 token_lifetime_seconds = 2; - } - - message GoogleIAMCredentials { - string authorization_token = 1; - - string authority_selector = 2; - } - - message MetadataCredentialsFromPlugin { - string name = 1; - - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - } - - // Security token service configuration that allows Google gRPC to - // fetch security token from an OAuth 2.0 authorization server. - // See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and - // https://github.com/grpc/grpc/pull/19587. - // [#next-free-field: 10] - message StsService { - // URI of the token exchange service that handles token exchange requests. - // [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - // https://github.com/bufbuild/protoc-gen-validate/issues/303] - string token_exchange_service_uri = 1; - - // Location of the target service or resource where the client - // intends to use the requested security token. - string resource = 2; - - // Logical name of the target service where the client intends to - // use the requested security token. - string audience = 3; - - // The desired scope of the requested security token in the - // context of the service or resource where the token will be used. - string scope = 4; - - // Type of the requested security token. - string requested_token_type = 5; - - // The path of subject token, a security token that represents the - // identity of the party on behalf of whom the request is being made. - string subject_token_path = 6 [(validate.rules).string = {min_bytes: 1}]; - - // Type of the subject token. - string subject_token_type = 7 [(validate.rules).string = {min_bytes: 1}]; - - // The path of actor token, a security token that represents the identity - // of the acting party. The acting party is authorized to use the - // requested security token and act on behalf of the subject. - string actor_token_path = 8; - - // Type of the actor token. - string actor_token_type = 9; - } - - oneof credential_specifier { - option (validate.required) = true; - - // Access token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. - string access_token = 1; - - // Google Compute Engine credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - google.protobuf.Empty google_compute_engine = 2; - - // Google refresh token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. - string google_refresh_token = 3; - - // Service Account JWT Access credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. - ServiceAccountJWTAccessCredentials service_account_jwt_access = 4; - - // Google IAM credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. - GoogleIAMCredentials google_iam = 5; - - // Custom authenticator credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. - // https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. - MetadataCredentialsFromPlugin from_plugin = 6; - - // Custom security token service which implements OAuth 2.0 token exchange. - // https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 - // See https://github.com/grpc/grpc/pull/19587. - StsService sts_service = 7; - } - } - - // The target URI when using the `Google C++ gRPC client - // `_. SSL credentials will be supplied in - // :ref:`channel_credentials `. - string target_uri = 1 [(validate.rules).string = {min_bytes: 1}]; - - ChannelCredentials channel_credentials = 2; - - // A set of call credentials that can be composed with `channel credentials - // `_. - repeated CallCredentials call_credentials = 3; - - // The human readable prefix to use when emitting statistics for the gRPC - // service. - // - // .. csv-table:: - // :header: Name, Type, Description - // :widths: 1, 1, 2 - // - // streams_total, Counter, Total number of streams opened - // streams_closed_, Counter, Total streams closed with - string stat_prefix = 4 [(validate.rules).string = {min_bytes: 1}]; - - // The name of the Google gRPC credentials factory to use. This must have been registered with - // Envoy. If this is empty, a default credentials factory will be used that sets up channel - // credentials based on other configuration parameters. - string credentials_factory_name = 5; - - // Additional configuration for site-specific customizations of the Google - // gRPC library. - google.protobuf.Struct config = 6; - } - - reserved 4; - - oneof target_specifier { - option (validate.required) = true; - - // Envoy's in-built gRPC client. - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - EnvoyGrpc envoy_grpc = 1; - - // `Google C++ gRPC client `_ - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - GoogleGrpc google_grpc = 2; - } - - // The timeout for the gRPC request. This is the timeout for a specific - // request. - google.protobuf.Duration timeout = 3; - - // Additional metadata to include in streams initiated to the GrpcService. - // This can be used for scenarios in which additional ad hoc authorization - // headers (e.g. ``x-foo-bar: baz-key``) are to be injected. - repeated HeaderValue initial_metadata = 5; -} diff --git a/src/main/proto/envoy/api/v2/core/health_check.proto b/src/main/proto/envoy/api/v2/core/health_check.proto deleted file mode 100644 index 347ac9c..0000000 --- a/src/main/proto/envoy/api/v2/core/health_check.proto +++ /dev/null @@ -1,309 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/event_service_config.proto"; -import "envoy/type/http.proto"; -import "envoy/type/matcher/string.proto"; -import "envoy/type/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "HealthCheckProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Health check] -// * Health checking :ref:`architecture overview `. -// * If health checking is configured for a cluster, additional statistics are emitted. They are -// documented :ref:`here `. - -// Endpoint health status. -enum HealthStatus { - // The health status is not known. This is interpreted by Envoy as *HEALTHY*. - UNKNOWN = 0; - - // Healthy. - HEALTHY = 1; - - // Unhealthy. - UNHEALTHY = 2; - - // Connection draining in progress. E.g., - // ``_ - // or - // ``_. - // This is interpreted by Envoy as *UNHEALTHY*. - DRAINING = 3; - - // Health check timed out. This is part of HDS and is interpreted by Envoy as - // *UNHEALTHY*. - TIMEOUT = 4; - - // Degraded. - DEGRADED = 5; -} - -// [#next-free-field: 23] -message HealthCheck { - // Describes the encoding of the payload bytes in the payload. - message Payload { - oneof payload { - option (validate.required) = true; - - // Hex encoded payload. E.g., "000000FF". - string text = 1 [(validate.rules).string = {min_bytes: 1}]; - - // [#not-implemented-hide:] Binary payload. - bytes binary = 2; - } - } - - // [#next-free-field: 12] - message HttpHealthCheck { - // The value of the host header in the HTTP health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. - string host = 1; - - // Specifies the HTTP path that will be requested during health checking. For example - // */healthcheck*. - string path = 2 [(validate.rules).string = {min_bytes: 1}]; - - // [#not-implemented-hide:] HTTP specific payload. - Payload send = 3; - - // [#not-implemented-hide:] HTTP specific response. - Payload receive = 4; - - // An optional service name parameter which is used to validate the identity of - // the health checked cluster. See the :ref:`architecture overview - // ` for more information. - // - // .. attention:: - // - // This field has been deprecated in favor of `service_name_matcher` for better flexibility - // over matching with service-cluster name. - string service_name = 5 [deprecated = true]; - - // Specifies a list of HTTP headers that should be added to each request that is sent to the - // health checked cluster. For more information, including details on header value syntax, see - // the documentation on :ref:`custom request headers - // `. - repeated HeaderValueOption request_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request that is sent to the - // health checked cluster. - repeated string request_headers_to_remove = 8; - - // If set, health checks will be made using http/2. - // Deprecated, use :ref:`codec_client_type - // ` instead. - bool use_http2 = 7 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default - // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each - // range are required. Only statuses in the range [100, 600) are allowed. - repeated type.Int64Range expected_statuses = 9; - - // Use specified application protocol for health checks. - type.CodecClientType codec_client_type = 10 [(validate.rules).enum = {defined_only: true}]; - - // An optional service name parameter which is used to validate the identity of - // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview - // ` for more information. - type.matcher.StringMatcher service_name_matcher = 11; - } - - message TcpHealthCheck { - // Empty payloads imply a connect-only health check. - Payload send = 1; - - // When checking the response, “fuzzy” matching is performed such that each - // binary block must be found, and in the order specified, but not - // necessarily contiguous. - repeated Payload receive = 2; - } - - message RedisHealthCheck { - // If set, optionally perform ``EXISTS `` instead of ``PING``. A return value - // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other - // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance - // by setting the specified key to any value and waiting for traffic to drain. - string key = 1; - } - - // `grpc.health.v1.Health - // `_-based - // healthcheck. See `gRPC doc `_ - // for details. - message GrpcHealthCheck { - // An optional service name parameter which will be sent to gRPC service in - // `grpc.health.v1.HealthCheckRequest - // `_. - // message. See `gRPC health-checking overview - // `_ for more information. - string service_name = 1; - - // The value of the :authority header in the gRPC health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. - string authority = 2; - } - - // Custom health check. - message CustomHealthCheck { - // The registered name of the custom health checker. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // A custom health checker specific configuration which depends on the custom health checker - // being instantiated. See :api:`envoy/config/health_checker` for reference. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - } - - // Health checks occur over the transport socket specified for the cluster. This implies that if a - // cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. - // - // This allows overriding the cluster TLS settings, just for health check connections. - message TlsOptions { - // Specifies the ALPN protocols for health check connections. This is useful if the - // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks - // versus data connections. If empty, no ALPN protocols will be set on health check connections. - repeated string alpn_protocols = 1; - } - - reserved 10; - - // The time to wait for a health check response. If the timeout is reached the - // health check attempt will be considered a failure. - google.protobuf.Duration timeout = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // The interval between health checks. - google.protobuf.Duration interval = 2 [(validate.rules).duration = { - required: true - gt {} - }]; - - // An optional jitter amount in milliseconds. If specified, Envoy will start health - // checking after for a random time in ms between 0 and initial_jitter. This only - // applies to the first health check. - google.protobuf.Duration initial_jitter = 20; - - // An optional jitter amount in milliseconds. If specified, during every - // interval Envoy will add interval_jitter to the wait time. - google.protobuf.Duration interval_jitter = 3; - - // An optional jitter amount as a percentage of interval_ms. If specified, - // during every interval Envoy will add interval_ms * - // interval_jitter_percent / 100 to the wait time. - // - // If interval_jitter_ms and interval_jitter_percent are both set, both of - // them will be used to increase the wait time. - uint32 interval_jitter_percent = 18; - - // The number of unhealthy health checks required before a host is marked - // unhealthy. Note that for *http* health checking if a host responds with 503 - // this threshold is ignored and the host is considered unhealthy immediately. - google.protobuf.UInt32Value unhealthy_threshold = 4 [(validate.rules).message = {required: true}]; - - // The number of healthy health checks required before a host is marked - // healthy. Note that during startup, only a single successful health check is - // required to mark a host healthy. - google.protobuf.UInt32Value healthy_threshold = 5 [(validate.rules).message = {required: true}]; - - // [#not-implemented-hide:] Non-serving port for health checking. - google.protobuf.UInt32Value alt_port = 6; - - // Reuse health check connection between health checks. Default is true. - google.protobuf.BoolValue reuse_connection = 7; - - oneof health_checker { - option (validate.required) = true; - - // HTTP health check. - HttpHealthCheck http_health_check = 8; - - // TCP health check. - TcpHealthCheck tcp_health_check = 9; - - // gRPC health check. - GrpcHealthCheck grpc_health_check = 11; - - // Custom health check. - CustomHealthCheck custom_health_check = 13; - } - - // The "no traffic interval" is a special health check interval that is used when a cluster has - // never had traffic routed to it. This lower interval allows cluster information to be kept up to - // date, without sending a potentially large amount of active health checking traffic for no - // reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. Note that this interval takes precedence over - // any other. - // - // The default value for "no traffic interval" is 60 seconds. - google.protobuf.Duration no_traffic_interval = 12 [(validate.rules).duration = {gt {}}]; - - // The "unhealthy interval" is a health check interval that is used for hosts that are marked as - // unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the - // standard health check interval that is defined. - // - // The default value for "unhealthy interval" is the same as "interval". - google.protobuf.Duration unhealthy_interval = 14 [(validate.rules).duration = {gt {}}]; - - // The "unhealthy edge interval" is a special health check interval that is used for the first - // health check right after a host is marked as unhealthy. For subsequent health checks - // Envoy will shift back to using either "unhealthy interval" if present or the standard health - // check interval that is defined. - // - // The default value for "unhealthy edge interval" is the same as "unhealthy interval". - google.protobuf.Duration unhealthy_edge_interval = 15 [(validate.rules).duration = {gt {}}]; - - // The "healthy edge interval" is a special health check interval that is used for the first - // health check right after a host is marked as healthy. For subsequent health checks - // Envoy will shift back to using the standard health check interval that is defined. - // - // The default value for "healthy edge interval" is the same as the default interval. - google.protobuf.Duration healthy_edge_interval = 16 [(validate.rules).duration = {gt {}}]; - - // Specifies the path to the :ref:`health check event log `. - // If empty, no event log will be written. - string event_log_path = 17; - - // [#not-implemented-hide:] - // The gRPC service for the health check event service. - // If empty, health check events won't be sent to a remote endpoint. - EventServiceConfig event_service = 22; - - // If set to true, health check failure events will always be logged. If set to false, only the - // initial health check failure event will be logged. - // The default value is false. - bool always_log_health_check_failures = 19; - - // This allows overriding the cluster TLS settings, just for health check connections. - TlsOptions tls_options = 21; -} diff --git a/src/main/proto/envoy/api/v2/core/http_uri.proto b/src/main/proto/envoy/api/v2/core/http_uri.proto deleted file mode 100644 index cb95125..0000000 --- a/src/main/proto/envoy/api/v2/core/http_uri.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "HttpUriProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP Service URI ] - -// Envoy external URI descriptor -message HttpUri { - // The HTTP server URI. It should be a full FQDN with protocol, host and path. - // - // Example: - // - // .. code-block:: yaml - // - // uri: https://www.googleapis.com/oauth2/v1/certs - // - string uri = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Specify how `uri` is to be fetched. Today, this requires an explicit - // cluster, but in the future we may support dynamic cluster creation or - // inline DNS resolution. See `issue - // `_. - oneof http_upstream_type { - option (validate.required) = true; - - // A cluster is created in the Envoy "cluster_manager" config - // section. This field specifies the cluster name. - // - // Example: - // - // .. code-block:: yaml - // - // cluster: jwks_cluster - // - string cluster = 2 [(validate.rules).string = {min_bytes: 1}]; - } - - // Sets the maximum duration in milliseconds that a response can take to arrive upon request. - google.protobuf.Duration timeout = 3 [(validate.rules).duration = { - required: true - gte {} - }]; -} diff --git a/src/main/proto/envoy/api/v2/core/protocol.proto b/src/main/proto/envoy/api/v2/core/protocol.proto deleted file mode 100644 index 3b7fe35..0000000 --- a/src/main/proto/envoy/api/v2/core/protocol.proto +++ /dev/null @@ -1,298 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "ProtocolProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Protocol options] - -// [#not-implemented-hide:] -message TcpProtocolOptions { -} - -message UpstreamHttpProtocolOptions { - // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - bool auto_sni = 1; - - // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header, as seen by the - // :ref:`router filter `. - // This field is intended to set with `auto_sni` field. - bool auto_san_validation = 2; -} - -// [#next-free-field: 6] -message HttpProtocolOptions { - // Action to take when Envoy receives client request with header names containing underscore - // characters. - // Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented - // as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore - // characters. - enum HeadersWithUnderscoresAction { - // Allow headers with underscores. This is the default behavior. - ALLOW = 0; - - // Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests - // end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter - // is incremented for each rejected request. - REJECT_REQUEST = 1; - - // Drop the header with name containing underscores. The header is dropped before the filter chain is - // invoked and as such filters will not see dropped headers. The - // "httpN.dropped_headers_with_underscores" is incremented for each dropped header. - DROP_HEADER = 2; - } - - // The idle timeout for connections. The idle timeout is defined as the - // period in which there are no active requests. When the - // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 - // downstream connection a drain sequence will occur prior to closing the connection, see - // :ref:`drain_timeout - // `. - // Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. - // If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - google.protobuf.Duration idle_timeout = 1; - - // The maximum duration of a connection. The duration is defined as a period since a connection - // was established. If not set, there is no max duration. When max_connection_duration is reached - // the connection will be closed. Drain sequence will occur prior to closing the connection if - // if's applicable. See :ref:`drain_timeout - // `. - // Note: not implemented for upstream connections. - google.protobuf.Duration max_connection_duration = 3; - - // The maximum number of headers. If unconfigured, the default - // maximum number of request headers allowed is 100. Requests that exceed this limit will receive - // a 431 response for HTTP/1.x and cause a stream reset for HTTP/2. - google.protobuf.UInt32Value max_headers_count = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be - // reset independent of any other timeouts. If not specified, this value is not set. - google.protobuf.Duration max_stream_duration = 4; - - // Action to take when a client request with a header name containing underscore characters is received. - // If this setting is not specified, the value defaults to ALLOW. - // Note: upstream responses are not affected by this setting. - HeadersWithUnderscoresAction headers_with_underscores_action = 5; -} - -// [#next-free-field: 6] -message Http1ProtocolOptions { - message HeaderKeyFormat { - message ProperCaseWords { - } - - oneof header_format { - option (validate.required) = true; - - // Formats the header by proper casing words: the first character and any character following - // a special character will be capitalized if it's an alpha character. For example, - // "content-type" becomes "Content-Type", and "foo$b#$are" becomes "Foo$B#$Are". - // Note that while this results in most headers following conventional casing, certain headers - // are not covered. For example, the "TE" header will be formatted as "Te". - ProperCaseWords proper_case_words = 1; - } - } - - // Handle HTTP requests with absolute URLs in the requests. These requests - // are generally sent by clients to forward/explicit proxies. This allows clients to configure - // envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the - // *http_proxy* environment variable. - google.protobuf.BoolValue allow_absolute_url = 1; - - // Handle incoming HTTP/1.0 and HTTP 0.9 requests. - // This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 - // style connect logic, dechunking, and handling lack of client host iff - // *default_host_for_http_10* is configured. - bool accept_http_10 = 2; - - // A default host for HTTP/1.0 requests. This is highly suggested if *accept_http_10* is true as - // Envoy does not otherwise support HTTP/1.0 without a Host header. - // This is a no-op if *accept_http_10* is not true. - string default_host_for_http_10 = 3; - - // Describes how the keys for response headers should be formatted. By default, all header keys - // are lower cased. - HeaderKeyFormat header_key_format = 4; - - // Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. - // - // .. attention:: - // - // Note that this only happens when Envoy is chunk encoding which occurs when: - // - The request is HTTP/1.1. - // - Is neither a HEAD only request nor a HTTP Upgrade. - // - Not a response to a HEAD request. - // - The content length header is not present. - bool enable_trailers = 5; -} - -// [#next-free-field: 14] -message Http2ProtocolOptions { - // Defines a parameter to be sent in the SETTINGS frame. - // See `RFC7540, sec. 6.5.1 `_ for details. - message SettingsParameter { - // The 16 bit parameter identifier. - google.protobuf.UInt32Value identifier = 1 [ - (validate.rules).uint32 = {lte: 65536 gte: 1}, - (validate.rules).message = {required: true} - ]; - - // The 32 bit parameter value. - google.protobuf.UInt32Value value = 2 [(validate.rules).message = {required: true}]; - } - - // `Maximum table size `_ - // (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values - // range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header - // compression. - google.protobuf.UInt32Value hpack_table_size = 1; - - // `Maximum concurrent streams `_ - // allowed for peer on one HTTP/2 connection. Valid values range from 1 to 2147483647 (2^31 - 1) - // and defaults to 2147483647. - // - // For upstream connections, this also limits how many streams Envoy will initiate concurrently - // on a single connection. If the limit is reached, Envoy may queue requests or establish - // additional connections (as allowed per circuit breaker limits). - google.protobuf.UInt32Value max_concurrent_streams = 2 - [(validate.rules).uint32 = {lte: 2147483647 gte: 1}]; - - // `Initial stream-level flow-control window - // `_ size. Valid values range from 65535 - // (2^16 - 1, HTTP/2 default) to 2147483647 (2^31 - 1, HTTP/2 maximum) and defaults to 268435456 - // (256 * 1024 * 1024). - // - // NOTE: 65535 is the initial window size from HTTP/2 spec. We only support increasing the default - // window size now, so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the codec buffers. - google.protobuf.UInt32Value initial_stream_window_size = 3 - [(validate.rules).uint32 = {lte: 2147483647 gte: 65535}]; - - // Similar to *initial_stream_window_size*, but for connection-level flow-control - // window. Currently, this has the same minimum/maximum/default as *initial_stream_window_size*. - google.protobuf.UInt32Value initial_connection_window_size = 4 - [(validate.rules).uint32 = {lte: 2147483647 gte: 65535}]; - - // Allows proxying Websocket and other upgrades over H2 connect. - bool allow_connect = 5; - - // [#not-implemented-hide:] Hiding until envoy has full metadata support. - // Still under implementation. DO NOT USE. - // - // Allows metadata. See [metadata - // docs](https://github.com/envoyproxy/envoy/blob/main/source/docs/h2_metadata.md) for more - // information. - bool allow_metadata = 6; - - // Limit the number of pending outbound downstream frames of all types (frames that are waiting to - // be written into the socket). Exceeding this limit triggers flood mitigation and connection is - // terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due - // to flood mitigation. The default limit is 10000. - // [#comment:TODO: implement same limits for upstream outbound frames as well.] - google.protobuf.UInt32Value max_outbound_frames = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Limit the number of pending outbound downstream frames of types PING, SETTINGS and RST_STREAM, - // preventing high memory utilization when receiving continuous stream of these frames. Exceeding - // this limit triggers flood mitigation and connection is terminated. The - // ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood - // mitigation. The default limit is 1000. - // [#comment:TODO: implement same limits for upstream outbound frames as well.] - google.protobuf.UInt32Value max_outbound_control_frames = 8 [(validate.rules).uint32 = {gte: 1}]; - - // Limit the number of consecutive inbound frames of types HEADERS, CONTINUATION and DATA with an - // empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but - // might be a result of a broken HTTP/2 implementation. The `http2.inbound_empty_frames_flood`` - // stat tracks the number of connections terminated due to flood mitigation. - // Setting this to 0 will terminate connection upon receiving first frame with an empty payload - // and no end stream flag. The default limit is 1. - // [#comment:TODO: implement same limits for upstream inbound frames as well.] - google.protobuf.UInt32Value max_consecutive_inbound_frames_with_empty_payload = 9; - - // Limit the number of inbound PRIORITY frames allowed per each opened stream. If the number - // of PRIORITY frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // max_inbound_priority_frames_per_stream * (1 + inbound_streams) - // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 100. - // [#comment:TODO: implement same limits for upstream inbound frames as well.] - google.protobuf.UInt32Value max_inbound_priority_frames_per_stream = 10; - - // Limit the number of inbound WINDOW_UPDATE frames allowed per DATA frame sent. If the number - // of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // 1 + 2 * (inbound_streams + - // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) - // - // the connection is terminated. The ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is 10. - // Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, - // but more complex implementations that try to estimate available bandwidth require at least 2. - // [#comment:TODO: implement same limits for upstream inbound frames as well.] - google.protobuf.UInt32Value max_inbound_window_update_frames_per_data_frame_sent = 11 - [(validate.rules).uint32 = {gte: 1}]; - - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // See `RFC7540, sec. 8.1 `_ for details. - bool stream_error_on_invalid_http_messaging = 12; - - // [#not-implemented-hide:] - // Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: - // - // 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by - // Envoy. - // - // 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field - // 'allow_connect'. - // - // Note that custom parameters specified through this field can not also be set in the - // corresponding named parameters: - // - // .. code-block:: text - // - // ID Field Name - // ---------------- - // 0x1 hpack_table_size - // 0x3 max_concurrent_streams - // 0x4 initial_stream_window_size - // - // Collisions will trigger config validation failure on load/update. Likewise, inconsistencies - // between custom parameters with the same identifier will trigger a failure. - // - // See `IANA HTTP/2 Settings - // `_ for - // standardized identifiers. - repeated SettingsParameter custom_settings_parameters = 13; -} - -// [#not-implemented-hide:] -message GrpcProtocolOptions { - Http2ProtocolOptions http2_protocol_options = 1; -} diff --git a/src/main/proto/envoy/api/v2/core/socket_option.proto b/src/main/proto/envoy/api/v2/core/socket_option.proto deleted file mode 100644 index da81405..0000000 --- a/src/main/proto/envoy/api/v2/core/socket_option.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.core; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.core"; -option java_outer_classname = "SocketOptionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.core.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Socket Option ] - -// Generic socket option message. This would be used to set socket options that -// might not exist in upstream kernels or precompiled Envoy binaries. -// [#next-free-field: 7] -message SocketOption { - enum SocketState { - // Socket options are applied after socket creation but before binding the socket to a port - STATE_PREBIND = 0; - - // Socket options are applied after binding the socket to a port but before calling listen() - STATE_BOUND = 1; - - // Socket options are applied after calling listen() - STATE_LISTENING = 2; - } - - // An optional name to give this socket option for debugging, etc. - // Uniqueness is not required and no special meaning is assumed. - string description = 1; - - // Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP - int64 level = 2; - - // The numeric name as passed to setsockopt - int64 name = 3; - - oneof value { - option (validate.required) = true; - - // Because many sockopts take an int value. - int64 int_value = 4; - - // Otherwise it's a byte buffer. - bytes buf_value = 5; - } - - // The state in which the option will be applied. When used in BindConfig - // STATE_PREBIND is currently the only valid value. - SocketState state = 6 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/api/v2/discovery.proto b/src/main/proto/envoy/api/v2/discovery.proto deleted file mode 100644 index fc53706..0000000 --- a/src/main/proto/envoy/api/v2/discovery.proto +++ /dev/null @@ -1,235 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/any.proto"; -import "google/rpc/status.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "DiscoveryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.discovery.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common discovery API components] - -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. -// [#next-free-field: 7] -message DiscoveryRequest { - // The version_info provided in the request messages will be the version_info - // received with the most recent successfully processed response or empty on - // the first request. It is expected that no new request is sent after a - // response is received until the Envoy instance is ready to ACK/NACK the new - // configuration. ACK/NACK takes place by returning the new API config version - // as applied or the previous API config version respectively. Each type_url - // (see below) has an independent version associated with it. - string version_info = 1; - - // The node making the request. - core.Node node = 2; - - // List of resources to subscribe to, e.g. list of cluster names or a route - // configuration name. If this is empty, all resources for the API are - // returned. LDS/CDS may have empty resource_names, which will cause all - // resources for the Envoy instance to be returned. The LDS and CDS responses - // will then imply a number of resources that need to be fetched via EDS/RDS, - // which will be explicitly enumerated in resource_names. - repeated string resource_names = 3; - - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit - // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is - // required for ADS. - string type_url = 4; - - // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above - // discussion on version_info and the DiscoveryResponse nonce comment. This - // may be empty only if 1) this is a non-persistent-stream xDS such as HTTP, - // or 2) the client has not yet accepted an update in this xDS stream (unlike - // delta, where it is populated only for new explicit ACKs). - string response_nonce = 5; - - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The *message* field in *error_details* provides the Envoy - // internal exception related to the failure. It is only intended for consumption during manual - // debugging, the string provided is not guaranteed to be stable across Envoy versions. - google.rpc.Status error_detail = 6; -} - -// [#next-free-field: 7] -message DiscoveryResponse { - // The version of the response data. - string version_info = 1; - - // The response resources. These resources are typed and depend on the API being called. - repeated google.protobuf.Any resources = 2; - - // [#not-implemented-hide:] - // Canary is used to support two Envoy command line flags: - // - // * --terminate-on-canary-transition-failure. When set, Envoy is able to - // terminate if it detects that configuration is stuck at canary. Consider - // this example sequence of updates: - // - Management server applies a canary config successfully. - // - Management server rolls back to a production config. - // - Envoy rejects the new production config. - // Since there is no sensible way to continue receiving configuration - // updates, Envoy will then terminate and apply production config from a - // clean slate. - // * --dry-run-canary. When set, a canary response will never be applied, only - // validated via a dry run. - bool canary = 3; - - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the 'resources' repeated Any (if non-empty). - string type_url = 4; - - // For gRPC based subscriptions, the nonce provides a way to explicitly ack a - // specific DiscoveryResponse in a following DiscoveryRequest. Additional - // messages may have been sent by Envoy to the management server for the - // previous version on the stream prior to this DiscoveryResponse, that were - // unprocessed at response send time. The nonce allows the management server - // to ignore any further DiscoveryRequests for the previous version until a - // DiscoveryRequest bearing the nonce. The nonce is optional and is not - // required for non-stream based xDS implementations. - string nonce = 5; - - // [#not-implemented-hide:] - // The control plane instance that sent the response. - core.ControlPlane control_plane = 6; -} - -// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC -// endpoint for Delta xDS. -// -// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full -// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a -// diff to the state of a xDS client. -// In Delta XDS there are per-resource versions, which allow tracking state at -// the resource granularity. -// An xDS Delta session is always in the context of a gRPC bidirectional -// stream. This allows the xDS server to keep track of the state of xDS clients -// connected to it. -// -// In Delta xDS the nonce field is required and used to pair -// DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK. -// Optionally, a response message level system_version_info is present for -// debugging purposes only. -// -// DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest -// can be either or both of: [1] informing the server of what resources the -// client has gained/lost interest in (using resource_names_subscribe and -// resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from -// the server (using response_nonce, with presence of error_detail making it a NACK). -// Additionally, the first message (for a given type_url) of a reconnected gRPC stream -// has a third role: informing the server of the resources (and their versions) -// that the client already possesses, using the initial_resource_versions field. -// -// As with state-of-the-world, when multiple resource types are multiplexed (ADS), -// all requests/acknowledgments/updates are logically walled off by type_url: -// a Cluster ACK exists in a completely separate world from a prior Route NACK. -// In particular, initial_resource_versions being sent at the "start" of every -// gRPC stream actually entails a message for each type_url, each with its own -// initial_resource_versions. -// [#next-free-field: 8] -message DeltaDiscoveryRequest { - // The node making the request. - core.Node node = 1; - - // Type of the resource that is being requested, e.g. - // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". - string type_url = 2; - - // DeltaDiscoveryRequests allow the client to add or remove individual - // resources to the set of tracked resources in the context of a stream. - // All resource names in the resource_names_subscribe list are added to the - // set of tracked resources and all resource names in the resource_names_unsubscribe - // list are removed from the set of tracked resources. - // - // *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or - // resource_names_unsubscribe list simply means that no resources are to be - // added or removed to the resource list. - // *Like* state-of-the-world xDS, the server must send updates for all tracked - // resources, but can also send updates for resources the client has not subscribed to. - // - // NOTE: the server must respond with all resources listed in resource_names_subscribe, - // even if it believes the client has the most recent version of them. The reason: - // the client may have dropped them, but then regained interest before it had a chance - // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. - // - // These two fields can be set in any DeltaDiscoveryRequest, including ACKs - // and initial_resource_versions. - // - // A list of Resource names to add to the list of tracked resources. - repeated string resource_names_subscribe = 3; - - // A list of Resource names to remove from the list of tracked resources. - repeated string resource_names_unsubscribe = 4; - - // Informs the server of the versions of the resources the xDS client knows of, to enable the - // client to continue the same logical xDS session even in the face of gRPC stream reconnection. - // It will not be populated: [1] in the very first stream of a session, since the client will - // not yet have any resources, [2] in any message after the first in a stream (for a given - // type_url), since the server will already be correctly tracking the client's state. - // (In ADS, the first message *of each type_url* of a reconnected stream populates this map.) - // The map's keys are names of xDS resources known to the xDS client. - // The map's values are opaque resource versions. - map initial_resource_versions = 5; - - // When the DeltaDiscoveryRequest is a ACK or NACK message in response - // to a previous DeltaDiscoveryResponse, the response_nonce must be the - // nonce in the DeltaDiscoveryResponse. - // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted. - string response_nonce = 6; - - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The *message* field in *error_details* - // provides the Envoy internal exception related to the failure. - google.rpc.Status error_detail = 7; -} - -// [#next-free-field: 7] -message DeltaDiscoveryResponse { - // The version of the response data (used for debugging). - string system_version_info = 1; - - // The response resources. These are typed resources, whose types must match - // the type_url field. - repeated Resource resources = 2; - - // field id 3 IS available! - - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty. - string type_url = 4; - - // Resources names of resources that have be deleted and to be removed from the xDS Client. - // Removed resources for missing resources can be ignored. - repeated string removed_resources = 6; - - // The nonce provides a way for DeltaDiscoveryRequests to uniquely - // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required. - string nonce = 5; -} - -message Resource { - // The resource's name, to distinguish it from others of the same type of resource. - string name = 3; - - // The aliases are a list of other names that this resource can go by. - repeated string aliases = 4; - - // The resource level version. It allows xDS to track the state of individual - // resources. - string version = 1; - - // The resource being tracked. - google.protobuf.Any resource = 2; -} diff --git a/src/main/proto/envoy/api/v2/eds.proto b/src/main/proto/envoy/api/v2/eds.proto deleted file mode 100644 index f8c2f82..0000000 --- a/src/main/proto/envoy/api/v2/eds.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -import public "envoy/api/v2/endpoint.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "EdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.endpoint.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: EDS] -// Endpoint discovery :ref:`architecture overview ` - -service EndpointDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.ClusterLoadAssignment"; - - // The resource_names field in DiscoveryRequest specifies a list of clusters - // to subscribe to updates for. - rpc StreamEndpoints(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc DeltaEndpoints(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { - } - - rpc FetchEndpoints(DiscoveryRequest) returns (DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:endpoints"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message EdsDummy { -} diff --git a/src/main/proto/envoy/api/v2/endpoint.proto b/src/main/proto/envoy/api/v2/endpoint.proto deleted file mode 100644 index 13e9052..0000000 --- a/src/main/proto/envoy/api/v2/endpoint.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/endpoint/endpoint_components.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Endpoint configuration] -// Endpoint discovery :ref:`architecture overview ` - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -message ClusterLoadAssignment { - // Load balancing policy settings. - // [#next-free-field: 6] - message Policy { - // [#not-implemented-hide:] - message DropOverload { - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Percentage of traffic that should be dropped for the category. - type.FractionalPercent drop_percentage = 2; - } - - reserved 1; - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // [#not-implemented-hide:] - repeated DropOverload drop_overloads = 2; - - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the percentage of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; - - // The flag to disable overprovisioning. If it is set to true, - // :ref:`overprovisioning factor - // ` will be ignored - // and Envoy will not perform graceful failover between priority levels or - // localities as endpoints become unhealthy. Otherwise Envoy will perform - // graceful failover as :ref:`overprovisioning factor - // ` suggests. - // [#not-implemented-hide:] - bool disable_overprovisioning = 5 [deprecated = true]; - } - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // List of endpoints to load balance to. - repeated endpoint.LocalityLbEndpoints endpoints = 2; - - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - map named_endpoints = 5; - - // Load balancing policy settings. - Policy policy = 4; -} diff --git a/src/main/proto/envoy/api/v2/endpoint/endpoint.proto b/src/main/proto/envoy/api/v2/endpoint/endpoint.proto deleted file mode 100644 index 2c2e9da..0000000 --- a/src/main/proto/envoy/api/v2/endpoint/endpoint.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.endpoint; - -import public "envoy/api/v2/endpoint/endpoint_components.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.endpoint"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"; diff --git a/src/main/proto/envoy/api/v2/endpoint/endpoint_components.proto b/src/main/proto/envoy/api/v2/endpoint/endpoint_components.proto deleted file mode 100644 index 86a533b..0000000 --- a/src/main/proto/envoy/api/v2/endpoint/endpoint_components.proto +++ /dev/null @@ -1,149 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.endpoint; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/health_check.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.endpoint"; -option java_outer_classname = "EndpointComponentsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Endpoints] - -// Upstream host identifier. -message Endpoint { - // The optional health check configuration. - message HealthCheckConfig { - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; - - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - string hostname = 2; - } - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - core.Address address = 1; - - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig health_check_config = 2; - - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - string hostname = 3; -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -message LbEndpoint { - // Upstream host identifier or a named reference. - oneof host_identifier { - Endpoint endpoint = 1; - - // [#not-implemented-hide:] - string endpoint_name = 5; - } - - // Optional health status when known and supplied by EDS server. - core.HealthStatus health_status = 2; - - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - core.Metadata metadata = 3; - - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. The sum of the weights of all endpoints in the - // endpoint's locality must not exceed uint32_t maximal value (4294967295). - google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -// [#next-free-field: 7] -message LocalityLbEndpoints { - // Identifies location of where the upstream hosts run. - core.Locality locality = 1; - - // The group of endpoints belonging to the locality specified. - repeated LbEndpoint lb_endpoints = 2; - - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; - - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - google.protobuf.UInt32Value proximity = 6; -} diff --git a/src/main/proto/envoy/api/v2/endpoint/load_report.proto b/src/main/proto/envoy/api/v2/endpoint/load_report.proto deleted file mode 100644 index 09dda61..0000000 --- a/src/main/proto/envoy/api/v2/endpoint/load_report.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.endpoint; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.endpoint"; -option java_outer_classname = "LoadReportProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// These are stats Envoy reports to GLB every so often. Report frequency is -// defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// [#next-free-field: 9] -message UpstreamLocalityStats { - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - core.Locality locality = 1; - - // The total number of requests successfully completed by the endpoints in the - // locality. - uint64 total_successful_requests = 2; - - // The total number of unfinished requests - uint64 total_requests_in_progress = 3; - - // The total number of requests that failed due to errors at the endpoint, - // aggregated over all endpoints in the locality. - uint64 total_error_requests = 4; - - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. - uint64 total_issued_requests = 8; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; - - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - repeated UpstreamEndpointStats upstream_endpoint_stats = 7; - - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - uint32 priority = 6; -} - -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// [#next-free-field: 8] -message UpstreamEndpointStats { - // Upstream host address. - core.Address address = 1; - - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - google.protobuf.Struct metadata = 6; - - // The total number of requests successfully completed by the endpoints in the - // locality. These include non-5xx responses for HTTP, where errors - // originate at the client and the endpoint responded successfully. For gRPC, - // the grpc-status values are those not covered by total_error_requests below. - uint64 total_successful_requests = 2; - - // The total number of unfinished requests for this endpoint. - uint64 total_requests_in_progress = 3; - - // The total number of requests that failed due to errors at the endpoint. - // For HTTP these are responses with 5xx status codes and for gRPC the - // grpc-status values: - // - // - DeadlineExceeded - // - Unimplemented - // - Internal - // - Unavailable - // - Unknown - // - DataLoss - uint64 total_error_requests = 4; - - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - uint64 total_issued_requests = 7; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; -} - -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -message EndpointLoadMetricStats { - // Name of the metric; may be empty. - string metric_name = 1; - - // Number of calls that finished and included this metric. - uint64 num_requests_finished_with_metric = 2; - - // Sum of metric values across all calls that finished with this metric for - // load_reporting_interval. - double total_metric_value = 3; -} - -// Per cluster load stats. Envoy reports these stats a management server in a -// :ref:`LoadStatsRequest` -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -// Next ID: 7 -// [#next-free-field: 7] -message ClusterStats { - message DroppedRequests { - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } - - // The name of the cluster. - string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - string cluster_service_name = 6; - - // Need at least one. - repeated UpstreamLocalityStats upstream_locality_stats = 2 - [(validate.rules).repeated = {min_items: 1}]; - - // Cluster-level stats such as total_successful_requests may be computed by - // summing upstream_locality_stats. In addition, below there are additional - // cluster-wide stats. - // - // The total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - uint64 total_dropped_requests = 3; - - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - repeated DroppedRequests dropped_requests = 5; - - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - google.protobuf.Duration load_report_interval = 4; -} diff --git a/src/main/proto/envoy/api/v2/lds.proto b/src/main/proto/envoy/api/v2/lds.proto deleted file mode 100644 index c304781..0000000 --- a/src/main/proto/envoy/api/v2/lds.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -import public "envoy/api/v2/listener.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "LdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.listener.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Listener] -// Listener :ref:`configuration overview ` - -// The Envoy instance initiates an RPC at startup to discover a list of -// listeners. Updates are delivered via streaming from the LDS server and -// consist of a complete update of all listeners. Existing connections will be -// allowed to drain from listeners that are no longer present. -service ListenerDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.Listener"; - - rpc DeltaListeners(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { - } - - rpc StreamListeners(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc FetchListeners(DiscoveryRequest) returns (DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:listeners"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message LdsDummy { -} diff --git a/src/main/proto/envoy/api/v2/listener.proto b/src/main/proto/envoy/api/v2/listener.proto deleted file mode 100644 index 139816d..0000000 --- a/src/main/proto/envoy/api/v2/listener.proto +++ /dev/null @@ -1,249 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/socket_option.proto"; -import "envoy/api/v2/listener/listener_components.proto"; -import "envoy/api/v2/listener/udp_listener_config.proto"; -import "envoy/config/filter/accesslog/v2/accesslog.proto"; -import "envoy/config/listener/v2/api_listener.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "ListenerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Listener configuration] -// Listener :ref:`configuration overview ` - -// [#next-free-field: 23] -message Listener { - enum DrainType { - // Drain in response to calling /healthcheck/fail admin endpoint (along with the health check - // filter), listener removal/modification, and hot restart. - DEFAULT = 0; - - // Drain in response to listener removal/modification and hot restart. This setting does not - // include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress - // and egress listeners. - MODIFY_ONLY = 1; - } - - // [#not-implemented-hide:] - message DeprecatedV1 { - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that - // set use_original_dst parameter to true. Default is true. - // - // This is deprecated in v2, all Listeners will bind to their port. An - // additional filter chain must be created for every original destination - // port this listener may redirect to in v2, with the original port - // specified in the FilterChainMatch destination_port field. - // - // [#comment:TODO(PiotrSikora): Remove this once verified that we no longer need it.] - google.protobuf.BoolValue bind_to_port = 1; - } - - // Configuration for listener connection balancing. - message ConnectionBalanceConfig { - // A connection balancer implementation that does exact balancing. This means that a lock is - // held during balancing so that connection counts are nearly exactly balanced between worker - // threads. This is "nearly" exact in the sense that a connection might close in parallel thus - // making the counts incorrect, but this should be rectified on the next accept. This balancer - // sacrifices accept throughput for accuracy and should be used when there are a small number of - // connections that rarely cycle (e.g., service mesh gRPC egress). - message ExactBalance { - } - - oneof balance_type { - option (validate.required) = true; - - // If specified, the listener will use the exact connection balancer. - ExactBalance exact_balance = 1; - } - } - - reserved 14; - - // The unique name by which this listener is known. If no name is provided, - // Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically - // updated or removed via :ref:`LDS ` a unique name must be provided. - string name = 1; - - // The address that the listener should listen on. In general, the address must be unique, though - // that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on - // Linux as the actual port will be allocated by the OS. - core.Address address = 2 [(validate.rules).message = {required: true}]; - - // A list of filter chains to consider for this listener. The - // :ref:`FilterChain ` with the most specific - // :ref:`FilterChainMatch ` criteria is used on a - // connection. - // - // Example using SNI for filter chain selection can be found in the - // :ref:`FAQ entry `. - repeated listener.FilterChain filter_chains = 3; - - // If a connection is redirected using *iptables*, the port on which the proxy - // receives it might be different from the original destination address. When this flag is set to - // true, the listener hands off redirected connections to the listener associated with the - // original destination address. If there is no listener associated with the original destination - // address, the connection is handled by the listener that receives it. Defaults to false. - // - // .. attention:: - // - // This field is deprecated. Use :ref:`an original_dst ` - // :ref:`listener filter ` instead. - // - // Note that hand off to another listener is *NOT* performed without this flag. Once - // :ref:`FilterChainMatch ` is implemented this flag - // will be removed, as filter chain matching can be used to select a filter chain based on the - // restored destination address. - google.protobuf.BoolValue use_original_dst = 4 [deprecated = true]; - - // Soft limit on size of the listener’s new connection read and write buffers. - // If unspecified, an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5; - - // Listener metadata. - core.Metadata metadata = 6; - - // [#not-implemented-hide:] - DeprecatedV1 deprecated_v1 = 7; - - // The type of draining to perform at a listener-wide level. - DrainType drain_type = 8; - - // Listener filters have the opportunity to manipulate and augment the connection metadata that - // is used in connection filter chain matching, for example. These filters are run before any in - // :ref:`filter_chains `. Order matters as the - // filters are processed sequentially right after a socket has been accepted by the listener, and - // before a connection is created. - // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // `. - // UDP listeners currently support a single filter. - repeated listener.ListenerFilter listener_filters = 9; - - // The timeout to wait for all listener filters to complete operation. If the timeout is reached, - // the accepted socket is closed without a connection being created unless - // `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the - // timeout. If not specified, a default timeout of 15s is used. - google.protobuf.Duration listener_filters_timeout = 15; - - // Whether a connection should be created when listener filters timeout. Default is false. - // - // .. attention:: - // - // Some listener filters, such as :ref:`Proxy Protocol filter - // `, should not be used with this option. It will cause - // unexpected behavior when a connection is created. - bool continue_on_listener_filters_timeout = 17; - - // Whether the listener should be set as a transparent socket. - // When this flag is set to true, connections can be redirected to the listener using an - // *iptables* *TPROXY* target, in which case the original source and destination addresses and - // ports are preserved on accepted connections. This flag should be used in combination with - // :ref:`an original_dst ` :ref:`listener filter - // ` to mark the connections' local addresses as - // "restored." This can be used to hand off each redirected connection to another listener - // associated with the connection's destination address. Direct connections to the socket without - // using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are - // therefore treated as if they were redirected. - // When this flag is set to false, the listener's socket is explicitly reset as non-transparent. - // Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. - // When this flag is not set (default), the socket is not modified, i.e. the transparent option - // is neither set nor reset. - google.protobuf.BoolValue transparent = 10; - - // Whether the listener should set the *IP_FREEBIND* socket option. When this - // flag is set to true, listeners can be bound to an IP address that is not - // configured on the system running Envoy. When this flag is set to false, the - // option *IP_FREEBIND* is disabled on the socket. When this flag is not set - // (default), the socket is not modified, i.e. the option is neither enabled - // nor disabled. - google.protobuf.BoolValue freebind = 11; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated core.SocketOption socket_options = 13; - - // Whether the listener should accept TCP Fast Open (TFO) connections. - // When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on - // the socket, with a queue length of the specified size - // (see `details in RFC7413 `_). - // When this flag is set to 0, the option TCP_FASTOPEN is disabled on the socket. - // When this flag is not set (default), the socket is not modified, - // i.e. the option is neither enabled nor disabled. - // - // On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable - // TCP_FASTOPEN. - // See `ip-sysctl.txt `_. - // - // On macOS, only values of 0, 1, and unset are valid; other values may result in an error. - // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. - google.protobuf.UInt32Value tcp_fast_open_queue_length = 12; - - // Specifies the intended direction of the traffic relative to the local Envoy. - // This property is required on Windows for listeners using the original destination filter, - // see :ref:`Original Destination `. - core.TrafficDirection traffic_direction = 16; - - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies the actual udp - // listener to create, i.e. :ref:`udp_listener_name - // ` = "raw_udp_listener" for - // creating a packet-oriented UDP listener. If not present, treat it as "raw_udp_listener". - listener.UdpListenerConfig udp_listener_config = 18; - - // Used to represent an API listener, which is used in non-proxy clients. The type of API - // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` - // should be set. - // - // .. note:: - // - // Currently only one ApiListener can be installed; and it can only be done via bootstrap config, - // not LDS. - // - // [#next-major-version: In the v3 API, instead of this messy approach where the socket - // listener fields are directly in the top-level Listener message and the API listener types - // are in the ApiListener message, the socket listener messages should be in their own message, - // and the top-level Listener should essentially be a oneof that selects between the - // socket listener and the various types of API listener. That way, a given Listener message - // can structurally only contain the fields of the relevant type.] - config.listener.v2.ApiListener api_listener = 19; - - // The listener's connection balancer configuration, currently only applicable to TCP listeners. - // If no configuration is specified, Envoy will not attempt to balance active connections between - // worker threads. - ConnectionBalanceConfig connection_balance_config = 20; - - // When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and - // create one socket for each worker thread. This makes inbound connections - // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. - // - // Before Linux v4.19-rc1, new TCP connections may be rejected during hot restart - // (see `3rd paragraph in 'soreuseport' commit message - // `_). - // This issue was fixed by `tcp: Avoid TCP syncookie rejected by SO_REUSEPORT socket - // `_. - bool reuse_port = 21; - - // Configuration for :ref:`access logs ` - // emitted by this listener. - repeated config.filter.accesslog.v2.AccessLog access_log = 22; -} diff --git a/src/main/proto/envoy/api/v2/listener/listener.proto b/src/main/proto/envoy/api/v2/listener/listener.proto deleted file mode 100644 index d007ba5..0000000 --- a/src/main/proto/envoy/api/v2/listener/listener.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.listener; - -import public "envoy/api/v2/listener/listener_components.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.listener"; -option java_outer_classname = "ListenerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; -option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy::Api::V2::ListenerNS"; diff --git a/src/main/proto/envoy/api/v2/listener/listener_components.proto b/src/main/proto/envoy/api/v2/listener/listener_components.proto deleted file mode 100644 index 4ebae87..0000000 --- a/src/main/proto/envoy/api/v2/listener/listener_components.proto +++ /dev/null @@ -1,288 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.listener; - -import "envoy/api/v2/auth/tls.proto"; -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/type/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.listener"; -option java_outer_classname = "ListenerComponentsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; -option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy::Api::V2::ListenerNS"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Listener components] -// Listener :ref:`configuration overview ` - -message Filter { - reserved 3; - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 4; - } -} - -// Specifies the match criteria for selecting a specific filter chain for a -// listener. -// -// In order for a filter chain to be selected, *ALL* of its criteria must be -// fulfilled by the incoming connection, properties of which are set by the -// networking stack and/or listener filters. -// -// The following order applies: -// -// 1. Destination port. -// 2. Destination IP address. -// 3. Server name (e.g. SNI for TLS protocol), -// 4. Transport protocol. -// 5. Application protocols (e.g. ALPN for TLS protocol). -// 6. Source type (e.g. any, local or external network). -// 7. Source IP address. -// 8. Source port. -// -// For criteria that allow ranges or wildcards, the most specific value in any -// of the configured filter chains that matches the incoming connection is going -// to be used (e.g. for SNI ``www.example.com`` the most specific match would be -// ``www.example.com``, then ``*.example.com``, then ``*.com``, then any filter -// chain without ``server_names`` requirements). -// -// [#comment: Implemented rules are kept in the preference order, with deprecated fields -// listed at the end, because that's how we want to list them in the docs. -// -// [#comment:TODO(PiotrSikora): Add support for configurable precedence of the rules] -// [#next-free-field: 13] -message FilterChainMatch { - enum ConnectionSourceType { - // Any connection source matches. - ANY = 0; - - // Match a connection originating from the same host. - LOCAL = 1 [(udpa.annotations.enum_value_migrate).rename = "SAME_IP_OR_LOOPBACK"]; - - // Match a connection originating from a different host. - EXTERNAL = 2; - } - - reserved 1; - - // Optional destination port to consider when use_original_dst is set on the - // listener in determining a filter chain match. - google.protobuf.UInt32Value destination_port = 8 [(validate.rules).uint32 = {lte: 65535 gte: 1}]; - - // If non-empty, an IP address and prefix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - repeated core.CidrRange prefix_ranges = 3; - - // If non-empty, an IP address and suffix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - // [#not-implemented-hide:] - string address_suffix = 4; - - // [#not-implemented-hide:] - google.protobuf.UInt32Value suffix_len = 5; - - // Specifies the connection source IP match type. Can be any, local or external network. - ConnectionSourceType source_type = 12 [(validate.rules).enum = {defined_only: true}]; - - // The criteria is satisfied if the source IP address of the downstream - // connection is contained in at least one of the specified subnets. If the - // parameter is not specified or the list is empty, the source IP address is - // ignored. - repeated core.CidrRange source_prefix_ranges = 6; - - // The criteria is satisfied if the source port of the downstream connection - // is contained in at least one of the specified ports. If the parameter is - // not specified, the source port is ignored. - repeated uint32 source_ports = 7 - [(validate.rules).repeated = {items {uint32 {lte: 65535 gte: 1}}}]; - - // If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining - // a filter chain match. Those values will be compared against the server names of a new - // connection, when detected by one of the listener filters. - // - // The server name will be matched against all wildcard domains, i.e. ``www.example.com`` - // will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. - // - // Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. - // - // .. attention:: - // - // See the :ref:`FAQ entry ` on how to configure SNI for more - // information. - repeated string server_names = 11; - - // If non-empty, a transport protocol to consider when determining a filter chain match. - // This value will be compared against the transport protocol of a new connection, when - // it's detected by one of the listener filters. - // - // Suggested values include: - // - // * ``raw_buffer`` - default, used when no transport protocol is detected, - // * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` - // when TLS protocol is detected. - string transport_protocol = 9; - - // If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when - // determining a filter chain match. Those values will be compared against the application - // protocols of a new connection, when detected by one of the listener filters. - // - // Suggested values include: - // - // * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector - // `, - // * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` - // - // .. attention:: - // - // Currently, only :ref:`TLS Inspector ` provides - // application protocol detection based on the requested - // `ALPN `_ values. - // - // However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, - // and matching on values other than ``h2`` is going to lead to a lot of false negatives, - // unless all connecting clients are known to use ALPN. - repeated string application_protocols = 10; -} - -// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and -// various other parameters. -// [#next-free-field: 8] -message FilterChain { - // The criteria to use when matching a connection to this filter chain. - FilterChainMatch filter_chain_match = 1; - - // The TLS context for this filter chain. - // - // .. attention:: - // - // **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are - // set, `transport_socket` takes priority. - auth.DownstreamTlsContext tls_context = 2 [deprecated = true]; - - // A list of individual network filters that make up the filter chain for - // connections established with the listener. Order matters as the filters are - // processed sequentially as connection events happen. Note: If the filter - // list is empty, the connection will close by default. - repeated Filter filters = 3; - - // Whether the listener should expect a PROXY protocol V1 header on new - // connections. If this option is enabled, the listener will assume that that - // remote address of the connection is the one specified in the header. Some - // load balancers including the AWS ELB support this option. If the option is - // absent or set to false, Envoy will use the physical peer address of the - // connection as the remote address. - google.protobuf.BoolValue use_proxy_proto = 4; - - // [#not-implemented-hide:] filter chain metadata. - core.Metadata metadata = 5; - - // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name `tls` and - // :ref:`DownstreamTlsContext ` in the `typed_config`. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - core.TransportSocket transport_socket = 6; - - // [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - // name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - // chain is to be dynamically updated or removed via FCDS a unique name must be provided. - string name = 7; -} - -// Listener filter chain match configuration. This is a recursive structure which allows complex -// nested match configurations to be built using various logical operators. -// -// Examples: -// -// * Matches if the destination port is 3306. -// -// .. code-block:: yaml -// -// destination_port_range: -// start: 3306 -// end: 3307 -// -// * Matches if the destination port is 3306 or 15000. -// -// .. code-block:: yaml -// -// or_match: -// rules: -// - destination_port_range: -// start: 3306 -// end: 3307 -// - destination_port_range: -// start: 15000 -// end: 15001 -// -// [#next-free-field: 6] -message ListenerFilterChainMatchPredicate { - // A set of match configurations used for logical operations. - message MatchSet { - // The list of rules that make up the set. - repeated ListenerFilterChainMatchPredicate rules = 1 - [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - ListenerFilterChainMatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // Match destination port. Particularly, the match evaluation must use the recovered local port if - // the owning listener filter is after :ref:`an original_dst listener filter `. - type.Int32Range destination_port_range = 5; - } -} - -message ListenerFilter { - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. - // See the supported filters for further documentation. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - - // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` - // for further examples. - ListenerFilterChainMatchPredicate filter_disabled = 4; -} diff --git a/src/main/proto/envoy/api/v2/listener/quic_config.proto b/src/main/proto/envoy/api/v2/listener/quic_config.proto deleted file mode 100644 index c6d5028..0000000 --- a/src/main/proto/envoy/api/v2/listener/quic_config.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.listener; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.listener"; -option java_outer_classname = "QuicConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; -option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy::Api::V2::ListenerNS"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: QUIC listener Config] - -// Configuration specific to the QUIC protocol. -// Next id: 4 -message QuicProtocolOptions { - // Maximum number of streams that the client can negotiate per connection. 100 - // if not specified. - google.protobuf.UInt32Value max_concurrent_streams = 1; - - // Maximum number of milliseconds that connection will be alive when there is - // no network activity. 300000ms if not specified. - google.protobuf.Duration idle_timeout = 2; - - // Connection timeout in milliseconds before the crypto handshake is finished. - // 20000ms if not specified. - google.protobuf.Duration crypto_handshake_timeout = 3; -} diff --git a/src/main/proto/envoy/api/v2/listener/udp_listener_config.proto b/src/main/proto/envoy/api/v2/listener/udp_listener_config.proto deleted file mode 100644 index d1642ab..0000000 --- a/src/main/proto/envoy/api/v2/listener/udp_listener_config.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.listener; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.listener"; -option java_outer_classname = "UdpListenerConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"; -option csharp_namespace = "Envoy.Api.V2.ListenerNS"; -option ruby_package = "Envoy::Api::V2::ListenerNS"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: UDP Listener Config] -// Listener :ref:`configuration overview ` - -message UdpListenerConfig { - // Used to look up UDP listener factory, matches "raw_udp_listener" or - // "quic_listener" to create a specific udp listener. - // If not specified, treat as "raw_udp_listener". - string udp_listener_name = 1; - - // Used to create a specific listener factory. To some factory, e.g. - // "raw_udp_listener", config is not needed. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } -} - -message ActiveRawUdpListenerConfig { -} diff --git a/src/main/proto/envoy/api/v2/ratelimit/ratelimit.proto b/src/main/proto/envoy/api/v2/ratelimit/ratelimit.proto deleted file mode 100644 index 7245692..0000000 --- a/src/main/proto/envoy/api/v2/ratelimit/ratelimit.proto +++ /dev/null @@ -1,70 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.ratelimit; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.ratelimit"; -option java_outer_classname = "RatelimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/ratelimit"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.common.ratelimit.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common rate limit components] - -// A RateLimitDescriptor is a list of hierarchical entries that are used by the service to -// determine the final rate limit key and overall allowed limit. Here are some examples of how -// they might be used for the domain "envoy". -// -// .. code-block:: cpp -// -// ["authenticated": "false"], ["remote_address": "10.0.0.1"] -// -// What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The -// configuration supplies a default limit for the *remote_address* key. If there is a desire to -// raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the -// configuration. -// -// .. code-block:: cpp -// -// ["authenticated": "false"], ["path": "/foo/bar"] -// -// What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if -// configured that way in the service). -// -// .. code-block:: cpp -// -// ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"] -// -// What it does: Limits unauthenticated traffic to a specific path for a specific IP address. -// Like (1) we can raise/block specific IP addresses if we want with an override configuration. -// -// .. code-block:: cpp -// -// ["authenticated": "true"], ["client_id": "foo"] -// -// What it does: Limits all traffic for an authenticated client "foo" -// -// .. code-block:: cpp -// -// ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"] -// -// What it does: Limits traffic to a specific path for an authenticated client "foo" -// -// The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired. -// This enables building complex application scenarios with a generic backend. -message RateLimitDescriptor { - message Entry { - // Descriptor key. - string key = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Descriptor value. - string value = 2 [(validate.rules).string = {min_bytes: 1}]; - } - - // Descriptor entries. - repeated Entry entries = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/api/v2/rds.proto b/src/main/proto/envoy/api/v2/rds.proto deleted file mode 100644 index 0ddbb0e..0000000 --- a/src/main/proto/envoy/api/v2/rds.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -import public "envoy/api/v2/route.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "RdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: RDS] - -// The resource_names field in DiscoveryRequest specifies a route configuration. -// This allows an Envoy configuration with multiple HTTP listeners (and -// associated HTTP connection manager filters) to use different route -// configurations. Each listener will bind its HTTP connection manager filter to -// a route table via this identifier. -service RouteDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.RouteConfiguration"; - - rpc StreamRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc DeltaRoutes(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { - } - - rpc FetchRoutes(DiscoveryRequest) returns (DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:routes"; - option (google.api.http).body = "*"; - } -} - -// Virtual Host Discovery Service (VHDS) is used to dynamically update the list of virtual hosts for -// a given RouteConfiguration. If VHDS is configured a virtual host list update will be triggered -// during the processing of an HTTP request if a route for the request cannot be resolved. The -// :ref:`resource_names_subscribe ` -// field contains a list of virtual host names or aliases to track. The contents of an alias would -// be the contents of a *host* or *authority* header used to make an http request. An xDS server -// will match an alias to a virtual host based on the content of :ref:`domains' -// ` field. The *resource_names_unsubscribe* field -// contains a list of virtual host names that have been :ref:`unsubscribed -// ` from the routing table associated with the RouteConfiguration. -service VirtualHostDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.route.VirtualHost"; - - rpc DeltaVirtualHosts(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message RdsDummy { -} diff --git a/src/main/proto/envoy/api/v2/route.proto b/src/main/proto/envoy/api/v2/route.proto deleted file mode 100644 index 4f9e40a..0000000 --- a/src/main/proto/envoy/api/v2/route.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/config_source.proto"; -import "envoy/api/v2/route/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP route configuration] -// * Routing :ref:`architecture overview ` -// * HTTP :ref:`router filter ` - -// [#next-free-field: 11] -message RouteConfiguration { - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`. - string name = 1; - - // An array of virtual hosts that make up the route table. - repeated route.VirtualHost virtual_hosts = 2; - - // An array of virtual hosts will be dynamically loaded via the VHDS API. - // Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used - // for a base routing table or for infrequently changing virtual hosts. *vhds* is used for - // on-demand discovery of virtual hosts. The contents of these two fields will be merged to - // generate a routing table for a given RouteConfiguration, with *vhds* derived configuration - // taking precedence. - Vhds vhds = 9; - - // Optionally specifies a list of HTTP headers that the connection manager - // will consider to be internal only. If they are found on external requests they will be cleaned - // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information. - repeated string internal_only_headers = 3 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // Specifies a list of HTTP headers that should be added to each response that - // the connection manager encodes. Headers specified at this level are applied - // after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or - // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption response_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // that the connection manager encodes. - repeated string response_headers_to_remove = 5 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // Specifies a list of HTTP headers that should be added to each request - // routed by the HTTP connection manager. Headers specified at this level are - // applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or - // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption request_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // routed by the HTTP connection manager. - repeated string request_headers_to_remove = 8 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // By default, headers that should be added/removed are evaluated from most to least specific: - // - // * route level - // * virtual host level - // * connection manager level - // - // To allow setting overrides at the route or virtual host level, this order can be reversed - // by setting this option to true. Defaults to false. - // - // [#next-major-version: In the v3 API, this will default to true.] - bool most_specific_header_mutations_wins = 10; - - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a 404 if the route - // is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`rds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - google.protobuf.BoolValue validate_clusters = 7; -} - -message Vhds { - // Configuration source specifier for VHDS. - core.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/api/v2/route/route.proto b/src/main/proto/envoy/api/v2/route/route.proto deleted file mode 100644 index 0c52d05..0000000 --- a/src/main/proto/envoy/api/v2/route/route.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.route; - -import public "envoy/api/v2/route/route_components.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.route"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"; diff --git a/src/main/proto/envoy/api/v2/route/route_components.proto b/src/main/proto/envoy/api/v2/route/route_components.proto deleted file mode 100644 index 55eec59..0000000 --- a/src/main/proto/envoy/api/v2/route/route_components.proto +++ /dev/null @@ -1,1630 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2.route; - -import "envoy/api/v2/core/base.proto"; -import "envoy/type/matcher/regex.proto"; -import "envoy/type/matcher/string.proto"; -import "envoy/type/percent.proto"; -import "envoy/type/range.proto"; -import "envoy/type/tracing/v2/custom_tag.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2.route"; -option java_outer_classname = "RouteComponentsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP route components] -// * Routing :ref:`architecture overview ` -// * HTTP :ref:`router filter ` - -// The top level element in the routing configuration is a virtual host. Each virtual host has -// a logical name as well as a set of domains that get routed to it based on the incoming request's -// host header. This allows a single listener to service multiple top level domain path trees. Once -// a virtual host is selected based on the domain, the routes are processed in order to see which -// upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 21] -message VirtualHost { - enum TlsRequirementType { - // No TLS requirement for the virtual host. - NONE = 0; - - // External requests must use TLS. If a request is external and it is not - // using TLS, a 301 redirect will be sent telling the client to use HTTPS. - EXTERNAL_ONLY = 1; - - // All requests must use TLS. If a request is not using TLS, a 301 redirect - // will be sent telling the client to use HTTPS. - ALL = 2; - } - - reserved 9; - - // The logical name of the virtual host. This is used when emitting certain - // statistics but is not relevant for routing. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // A list of domains (host/authority header) that will be matched to this - // virtual host. Wildcard hosts are supported in the suffix or prefix form. - // - // Domain search order: - // 1. Exact domain names: ``www.foo.com``. - // 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. - // 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. - // 4. Special wildcard ``*`` matching any domain. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - // - // Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. - repeated string domains = 2 [(validate.rules).repeated = { - min_items: 1 - items {string {well_known_regex: HTTP_HEADER_VALUE strict: false}} - }]; - - // The list of routes that will be matched, in order, for incoming requests. - // The first route that matches will be used. - repeated Route routes = 3; - - // Specifies the type of TLS enforcement the virtual host expects. If this option is not - // specified, there is no TLS requirement for the virtual host. - TlsRequirementType require_tls = 4 [(validate.rules).enum = {defined_only: true}]; - - // A list of virtual clusters defined for this virtual host. Virtual clusters - // are used for additional statistics gathering. - repeated VirtualCluster virtual_clusters = 5; - - // Specifies a set of rate limit configurations that will be applied to the - // virtual host. - repeated RateLimit rate_limits = 6; - - // Specifies a list of HTTP headers that should be added to each request - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption request_headers_to_add = 7 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // handled by this virtual host. - repeated string request_headers_to_remove = 13; - - // Specifies a list of HTTP headers that should be added to each response - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_api_msg_route.Route` and before headers from the - // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption response_headers_to_add = 10 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // handled by this virtual host. - repeated string response_headers_to_remove = 11; - - // Indicates that the virtual host has a CORS policy. - CorsPolicy cors = 8; - - // The per_filter_config field can be used to provide virtual host-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - map per_filter_config = 12 [deprecated = true]; - - // The per_filter_config field can be used to provide virtual host-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - map typed_per_filter_config = 15; - - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the upstream request. Setting this option will cause it to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the upstream - // will see the attempt count as perceived by the second Envoy. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - // - // [#next-major-version: rename to include_attempt_count_in_request.] - bool include_request_attempt_count = 14; - - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the downstream response. Setting this option will cause the router to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the downstream - // will see the attempt count as perceived by the Envoy closest upstream from itself. Defaults to false. - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - bool include_attempt_count_in_response = 19; - - // Indicates the retry policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - RetryPolicy retry_policy = 16; - - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that setting a route level entry - // will take precedence over this config and it'll be treated independently (e.g.: values are not - // inherited). :ref:`Retry policy ` should not be - // set if this field is used. - google.protobuf.Any retry_policy_typed_config = 20; - - // Indicates the hedge policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g.: values are not inherited). - HedgePolicy hedge_policy = 17; - - // The maximum bytes which will be buffered for retries and shadowing. - // If set and a route-specific limit is not set, the bytes actually buffered will be the minimum - // value of this and the listener per_connection_buffer_limit_bytes. - google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18; -} - -// A filter-defined action type. -message FilterAction { - google.protobuf.Any action = 1; -} - -// A route is both a specification of how to match a request as well as an indication of what to do -// next (e.g., redirect, forward, rewrite, etc.). -// -// .. attention:: -// -// Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 18] -message Route { - reserved 6; - - // Name for the route. - string name = 14; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - oneof action { - option (validate.required) = true; - - // Route request to some upstream cluster. - RouteAction route = 2; - - // Return a redirect. - RedirectAction redirect = 3; - - // Return an arbitrary HTTP response directly, without proxying. - DirectResponseAction direct_response = 7; - - // [#not-implemented-hide:] - // If true, a filter will define the action (e.g., it could dynamically generate the - // RouteAction). - FilterAction filter_action = 17; - } - - // The Metadata field can be used to provide additional information - // about the route. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as *envoy.filters.http.router*. - core.Metadata metadata = 4; - - // Decorator for the matched route. - Decorator decorator = 5; - - // The per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` for - // if and how it is utilized. - map per_filter_config = 8 [deprecated = true]; - - // The typed_per_filter_config field can be used to provide route-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` for - // if and how it is utilized. - map typed_per_filter_config = 13; - - // Specifies a set of headers that will be added to requests matching this - // route. Headers specified at this level are applied before headers from the - // enclosing :ref:`envoy_api_msg_route.VirtualHost` and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption request_headers_to_add = 9 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // matching this route. - repeated string request_headers_to_remove = 12; - - // Specifies a set of headers that will be added to responses to requests - // matching this route. Headers specified at this level are applied before - // headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - repeated core.HeaderValueOption response_headers_to_add = 10 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // to requests matching this route. - repeated string response_headers_to_remove = 11; - - // Presence of the object defines whether the connection manager's tracing configuration - // is overridden by this route specific instance. - Tracing tracing = 15; - - // The maximum bytes which will be buffered for retries and shadowing. - // If set, the bytes actually buffered will be the minimum value of this and the - // listener per_connection_buffer_limit_bytes. - google.protobuf.UInt32Value per_request_buffer_limit_bytes = 16; -} - -// Compared to the :ref:`cluster ` field that specifies a -// single upstream cluster as the target of a request, the :ref:`weighted_clusters -// ` option allows for specification of -// multiple upstream clusters along with weights that indicate the percentage of -// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the -// weights. -message WeightedCluster { - // [#next-free-field: 11] - message ClusterWeight { - reserved 7; - - // Name of the upstream cluster. The cluster must exist in the - // :ref:`cluster manager configuration `. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // An integer between 0 and :ref:`total_weight - // `. When a request matches the route, - // the choice of an upstream cluster is determined by its weight. The sum of weights across all - // entries in the clusters array must add up to the total_weight, if total_weight is greater than 0. - google.protobuf.UInt32Value weight = 2; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as *envoy.lb*. - core.Metadata metadata_match = 3; - - // Specifies a list of headers to be added to requests when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption request_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request when - // this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - repeated string request_headers_to_remove = 9; - - // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_route.VirtualHost`, and - // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.HeaderValueOption response_headers_to_add = 5 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of headers to be removed from responses when this cluster is selected - // through the enclosing :ref:`envoy_api_msg_route.RouteAction`. - repeated string response_headers_to_remove = 6; - - // The per_filter_config field can be used to provide weighted cluster-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - map per_filter_config = 8 [deprecated = true]; - - // The per_filter_config field can be used to provide weighted cluster-specific - // configurations for filters. The key should match the filter name, such as - // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - // specific; see the :ref:`HTTP filter documentation ` - // for if and how it is utilized. - map typed_per_filter_config = 10; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Specifies the total weight across all clusters. The sum of all cluster weights must equal this - // value, which must be greater than 0. Defaults to 100. - google.protobuf.UInt32Value total_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Specifies the runtime key prefix that should be used to construct the - // runtime keys associated with each cluster. When the *runtime_key_prefix* is - // specified, the router will look for weights associated with each upstream - // cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where - // *cluster[i]* denotes an entry in the clusters array field. If the runtime - // key for the cluster does not exist, the value specified in the - // configuration file will be used as the default weight. See the :ref:`runtime documentation - // ` for how key names map to the underlying implementation. - string runtime_key_prefix = 2; -} - -// [#next-free-field: 12] -message RouteMatch { - message GrpcRouteMatchOptions { - } - - message TlsContextMatchOptions { - // If specified, the route will match against whether or not a certificate is presented. - // If not specified, certificate presentation status (true or false) will not be considered when route matching. - google.protobuf.BoolValue presented = 1; - - // If specified, the route will match against whether or not a certificate is validated. - // If not specified, certificate validation status (true or false) will not be considered when route matching. - google.protobuf.BoolValue validated = 2; - } - - reserved 5; - - oneof path_specifier { - option (validate.required) = true; - - // If specified, the route is a prefix rule meaning that the prefix must - // match the beginning of the *:path* header. - string prefix = 1; - - // If specified, the route is an exact path rule meaning that the path must - // exactly match the *:path* header once the query string is removed. - string path = 2; - - // If specified, the route is a regular expression rule meaning that the - // regex must match the *:path* header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the *:path* header matches the regex. The regex grammar is defined `here - // `_. - // - // Examples: - // - // * The regex ``/b[io]t`` matches the path */bit* - // * The regex ``/b[io]t`` matches the path */bot* - // * The regex ``/b[io]t`` does not match the path */bite* - // * The regex ``/b[io]t`` does not match the path */bit/bot* - // - // .. attention:: - // This field has been deprecated in favor of `safe_regex` as it is not safe for use with - // untrusted input in all cases. - string regex = 3 [ - deprecated = true, - (validate.rules).string = {max_bytes: 1024}, - (envoy.annotations.disallowed_by_default) = true - ]; - - // If specified, the route is a regular expression rule meaning that the - // regex must match the *:path* header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the *:path* header matches the regex. - // - // [#next-major-version: In the v3 API we should redo how path specification works such - // that we utilize StringMatcher, and additionally have consistent options around whether we - // strip query strings, do a case sensitive match, etc. In the interim it will be too disruptive - // to deprecate the existing options. We should even consider whether we want to do away with - // path_specifier entirely and just rely on a set of header matchers which can already match - // on :path, etc. The issue with that is it is unclear how to generically deal with query string - // stripping. This needs more thought.] - type.matcher.RegexMatcher safe_regex = 10 [(validate.rules).message = {required: true}]; - } - - // Indicates that prefix/path matching should be case sensitive. The default - // is true. - google.protobuf.BoolValue case_sensitive = 4; - - // Indicates that the route should additionally match on a runtime key. Every time the route - // is considered for a match, it must also fall under the percentage of matches indicated by - // this field. For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the router continues to evaluate the remaining match criteria. A runtime_fraction - // route configuration can be used to roll out route changes in a gradual manner without full - // code/config deploys. Refer to the :ref:`traffic shifting - // ` docs for additional documentation. - // - // .. note:: - // - // Parsing this field is implemented such that the runtime key's data may be represented - // as a FractionalPercent proto represented as JSON/YAML and may also be represented as an - // integer with the assumption that the value is an integral percentage out of 100. For - // instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent - // whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics. - core.RuntimeFractionalPercent runtime_fraction = 9; - - // Specifies a set of headers that the route should match on. The router will - // check the request’s headers against all the specified headers in the route - // config. A match will happen if all the headers in the route are present in - // the request with the same values (or based on presence if the value field - // is not in the config). - repeated HeaderMatcher headers = 6; - - // Specifies a set of URL query parameters on which the route should - // match. The router will check the query string from the *path* header - // against all the specified query parameters. If the number of specified - // query parameters is nonzero, they all must match the *path* header's - // query string for a match to occur. - repeated QueryParameterMatcher query_parameters = 7; - - // If specified, only gRPC requests will be matched. The router will check - // that the content-type header has a application/grpc or one of the various - // application/grpc+ values. - GrpcRouteMatchOptions grpc = 8; - - // If specified, the client tls context will be matched against the defined - // match options. - // - // [#next-major-version: unify with RBAC] - TlsContextMatchOptions tls_context = 11; -} - -// [#next-free-field: 12] -message CorsPolicy { - // Specifies the origins that will be allowed to do CORS requests. - // - // An origin is allowed if either allow_origin or allow_origin_regex match. - // - // .. attention:: - // This field has been deprecated in favor of `allow_origin_string_match`. - repeated string allow_origin = 1 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Specifies regex patterns that match allowed origins. - // - // An origin is allowed if either allow_origin or allow_origin_regex match. - // - // .. attention:: - // This field has been deprecated in favor of `allow_origin_string_match` as it is not safe for - // use with untrusted input in all cases. - repeated string allow_origin_regex = 8 - [deprecated = true, (validate.rules).repeated = {items {string {max_bytes: 1024}}}]; - - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - repeated type.matcher.StringMatcher allow_origin_string_match = 11; - - // Specifies the content for the *access-control-allow-methods* header. - string allow_methods = 2; - - // Specifies the content for the *access-control-allow-headers* header. - string allow_headers = 3; - - // Specifies the content for the *access-control-expose-headers* header. - string expose_headers = 4; - - // Specifies the content for the *access-control-max-age* header. - string max_age = 5; - - // Specifies whether the resource allows credentials. - google.protobuf.BoolValue allow_credentials = 6; - - oneof enabled_specifier { - // Specifies if the CORS filter is enabled. Defaults to true. Only effective on route. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`filter_enabled` field instead. - google.protobuf.BoolValue enabled = 7 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - core.RuntimeFractionalPercent filter_enabled = 9; - } - - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those - // fields have to explicitly disable the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* to determine if it's valid but will not enforce any policies. - core.RuntimeFractionalPercent shadow_enabled = 10; -} - -// [#next-free-field: 34] -message RouteAction { - enum ClusterNotFoundResponseCode { - // HTTP status code - 503 Service Unavailable. - SERVICE_UNAVAILABLE = 0; - - // HTTP status code - 404 Not Found. - NOT_FOUND = 1; - } - - // Configures :ref:`internal redirect ` behavior. - enum InternalRedirectAction { - PASS_THROUGH_INTERNAL_REDIRECT = 0; - HANDLE_INTERNAL_REDIRECT = 1; - } - - // The router is capable of shadowing traffic from one cluster to another. The current - // implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to - // respond before returning the response from the primary cluster. All normal statistics are - // collected for the shadow cluster making this feature useful for testing. - // - // During shadowing, the host/authority header is altered such that *-shadow* is appended. This is - // useful for logging. For example, *cluster1* becomes *cluster1-shadow*. - // - // .. note:: - // - // Shadowing will not be triggered if the primary cluster does not exist. - message RequestMirrorPolicy { - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // If not specified, all requests to the target cluster will be mirrored. If - // specified, Envoy will lookup the runtime key to get the % of requests to - // mirror. Valid values are from 0 to 10000, allowing for increments of - // 0.01% of requests to be mirrored. If the runtime key is specified in the - // configuration but not present in runtime, 0 is the default and thus 0% of - // requests will be mirrored. - // - // .. attention:: - // - // **This field is deprecated**. Set the - // :ref:`runtime_fraction - // ` - // field instead. Mirroring occurs if both this and - // ` - // are not set. - string runtime_key = 2 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // If not specified, all requests to the target cluster will be mirrored. - // - // If specified, this field takes precedence over the `runtime_key` field and requests must also - // fall under the percentage of matches indicated by this field. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - core.RuntimeFractionalPercent runtime_fraction = 3; - - // Determines if the trace span should be sampled. Defaults to true. - google.protobuf.BoolValue trace_sampled = 4; - } - - // Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer - // `. - // [#next-free-field: 7] - message HashPolicy { - message Header { - // The name of the request header that will be used to obtain the hash - // key. If the request header is not present, no hash will be produced. - string header_name = 1 [ - (validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false} - ]; - } - - // Envoy supports two types of cookie affinity: - // - // 1. Passive. Envoy takes a cookie that's present in the cookies header and - // hashes on its value. - // - // 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) - // on the first request from the client in its response to the client, - // based on the endpoint the request gets sent to. The client then - // presents this on the next and all subsequent requests. The hash of - // this is sufficient to ensure these requests get sent to the same - // endpoint. The cookie is generated by hashing the source and - // destination ports and addresses so that multiple independent HTTP2 - // streams on the same connection will independently receive the same - // cookie, even if they arrive at the Envoy simultaneously. - message Cookie { - // The name of the cookie that will be used to obtain the hash key. If the - // cookie is not present and ttl below is not set, no hash will be - // produced. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // If specified, a cookie with the TTL will be generated if the cookie is - // not present. If the TTL is present and zero, the generated cookie will - // be a session cookie. - google.protobuf.Duration ttl = 2; - - // The name of the path for the cookie. If no path is specified here, no path - // will be set for the cookie. - string path = 3; - } - - message ConnectionProperties { - // Hash on source IP address. - bool source_ip = 1; - } - - message QueryParameter { - // The name of the URL query parameter that will be used to obtain the hash - // key. If the parameter is not present, no hash will be produced. Query - // parameter names are case-sensitive. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - } - - message FilterState { - // The name of the Object in the per-request filterState, which is an - // Envoy::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Hashable, no hash will be produced. - string key = 1 [(validate.rules).string = {min_bytes: 1}]; - } - - oneof policy_specifier { - option (validate.required) = true; - - // Header hash policy. - Header header = 1; - - // Cookie hash policy. - Cookie cookie = 2; - - // Connection properties hash policy. - ConnectionProperties connection_properties = 3; - - // Query parameter hash policy. - QueryParameter query_parameter = 5; - - // Filter state hash policy. - FilterState filter_state = 6; - } - - // The flag that short-circuits the hash computing. This field provides a - // 'fallback' style of configuration: "if a terminal policy doesn't work, - // fallback to rest of the policy list", it saves time when the terminal - // policy works. - // - // If true, and there is already a hash computed, ignore rest of the - // list of hash polices. - // For example, if the following hash methods are configured: - // - // ========= ======== - // specifier terminal - // ========= ======== - // Header A true - // Header B false - // Header C false - // ========= ======== - // - // The generateHash process ends if policy "header A" generates a hash, as - // it's a terminal policy. - bool terminal = 4; - } - - // Allows enabling and disabling upgrades on a per-route basis. - // This overrides any enabled/disabled upgrade filter chain specified in the - // HttpConnectionManager - // :ref:`upgrade_configs - // ` - // but does not affect any custom filter chain specified there. - message UpgradeConfig { - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] will be proxied upstream. - string upgrade_type = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Determines if upgrades are available on this route. Defaults to true. - google.protobuf.BoolValue enabled = 2; - } - - reserved 12, 18, 19, 16, 22, 21; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - // *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string cluster_header = 2 - [(validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. See - // :ref:`traffic splitting ` - // for additional documentation. - WeightedCluster weighted_clusters = 3; - } - - // The HTTP status code to use when configured cluster is not found. - // The default response code is 503 Service Unavailable. - ClusterNotFoundResponseCode cluster_not_found_response_code = 20 - [(validate.rules).enum = {defined_only: true}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what's set in this field will be considered - // for load balancing. If using :ref:`weighted_clusters - // `, metadata will be merged, with values - // provided there taking precedence. The filter name should be specified as *envoy.lb*. - core.Metadata metadata_match = 4; - - // Indicates that during forwarding, the matched prefix (or path) should be - // swapped with this value. This option allows application URLs to be rooted - // at a different path from those exposed at the reverse proxy layer. The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of *prefix_rewrite* or - // :ref:`regex_rewrite ` - // may be specified. - // - // .. attention:: - // - // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. - // Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - // rewriting */prefix* to */* and */prefix/etc* to */etc* cannot be done in a single - // :ref:`Route `, as shown by the below config entries: - // - // .. code-block:: yaml - // - // - match: - // prefix: "/prefix/" - // route: - // prefix_rewrite: "/" - // - match: - // prefix: "/prefix" - // route: - // prefix_rewrite: "/" - // - // Having above entries in the config, requests to */prefix* will be stripped to */*, while - // requests to */prefix/etc* will be stripped to */etc*. - string prefix_rewrite = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during forwarding, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. The router filter will place the original path as it was - // before the rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`prefix_rewrite ` - // or *regex_rewrite* may be specified. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - type.matcher.RegexMatchAndSubstitute regex_rewrite = 32; - - oneof host_rewrite_specifier { - // Indicates that during forwarding, the host header will be swapped with - // this value. - string host_rewrite = 6 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}, - (udpa.annotations.field_migrate).rename = "host_rewrite_literal" - ]; - - // Indicates that during forwarding, the host header will be swapped with - // the hostname of the upstream host chosen by the cluster manager. This - // option is applicable only when the destination cluster for a route is of - // type ``STRICT_DNS``, ``LOGICAL_DNS`` or ``STATIC``. For ``STATIC`` clusters, the - // hostname attribute of the endpoint must be configured. Setting this to true - // with other cluster types has no effect. - google.protobuf.BoolValue auto_host_rewrite = 7; - - // Indicates that during forwarding, the host header will be swapped with the content of given - // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. - // - // .. attention:: - // - // Pay attention to the potential security implications of using this option. Provided header - // must come from trusted source. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string auto_host_rewrite_header = 29 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}, - (udpa.annotations.field_migrate).rename = "host_rewrite_header" - ]; - } - - // Specifies the upstream timeout for the route. If not specified, the default is 15s. This - // spans between the point at which the entire downstream request (i.e. end-of-stream) has been - // processed and when the upstream response has been completely processed. A value of 0 will - // disable the route's timeout. - // - // .. note:: - // - // This timeout includes all retries. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - google.protobuf.Duration timeout = 8; - - // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, - // although the connection manager wide :ref:`stream_idle_timeout - // ` - // will still apply. A value of 0 will completely disable the route's idle timeout, even if a - // connection manager stream idle timeout is configured. - // - // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound - // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount - // of time the request's stream may be idle. - // - // After header decoding, the idle timeout will apply on downstream and - // upstream request events. Each time an encode/decode event for headers or - // data is processed for the stream, the timer will be reset. If the timeout - // fires, the stream is terminated with a 408 Request Timeout error code if no - // upstream response header has been received, otherwise a stream reset - // occurs. - google.protobuf.Duration idle_timeout = 24; - - // Indicates that the route has a retry policy. Note that if this is set, - // it'll take precedence over the virtual host level retry policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - RetryPolicy retry_policy = 9; - - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that if this is set, it'll take - // precedence over the virtual host level retry policy entirely (e.g.: policies are not merged, - // most internal one becomes the enforced policy). :ref:`Retry policy ` - // should not be set if this field is used. - google.protobuf.Any retry_policy_typed_config = 33; - - // Indicates that the route has a request mirroring policy. - // - // .. attention:: - // This field has been deprecated in favor of `request_mirror_policies` which supports one or - // more mirroring policies. - RequestMirrorPolicy request_mirror_policy = 10 [deprecated = true]; - - // Indicates that the route has request mirroring policies. - repeated RequestMirrorPolicy request_mirror_policies = 30; - - // Optionally specifies the :ref:`routing priority `. - core.RoutingPriority priority = 11 [(validate.rules).enum = {defined_only: true}]; - - // Specifies a set of rate limit configurations that could be applied to the - // route. - repeated RateLimit rate_limits = 13; - - // Specifies if the rate limit filter should include the virtual host rate - // limits. By default, if the route configured rate limits, the virtual host - // :ref:`rate_limits ` are not applied to the - // request. - google.protobuf.BoolValue include_vh_rate_limits = 14; - - // Specifies a list of hash policies to use for ring hash load balancing. Each - // hash policy is evaluated individually and the combined result is used to - // route the request. The method of combination is deterministic such that - // identical lists of hash policies will produce the same hash. Since a hash - // policy examines specific parts of a request, it can fail to produce a hash - // (i.e. if the hashed header is not present). If (and only if) all configured - // hash policies fail to generate a hash, no hash will be produced for - // the route. In this case, the behavior is the same as if no hash policies - // were specified (i.e. the ring hash load balancer will choose a random - // backend). If a hash policy has the "terminal" attribute set to true, and - // there is already a hash generated, the hash is returned immediately, - // ignoring the rest of the hash policy list. - repeated HashPolicy hash_policy = 15; - - // Indicates that the route has a CORS policy. - CorsPolicy cors = 17; - - // If present, and the request is a gRPC request, use the - // `grpc-timeout header `_, - // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout - // to the maximum value specified here. If configured as 0, the maximum allowed timeout for - // gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used - // and gRPC requests time out like any other requests using - // :ref:`timeout ` or its default. - // This can be used to prevent unexpected upstream request timeouts due to potentially long - // time gaps between gRPC request and response in gRPC streaming mode. - // - // .. note:: - // - // If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes - // precedence over `grpc-timeout header `_, when - // both are present. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - google.protobuf.Duration max_grpc_timeout = 23; - - // If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting - // the provided duration from the header. This is useful in allowing Envoy to set its global - // timeout to be less than that of the deadline imposed by the calling client, which makes it more - // likely that Envoy will handle the timeout instead of having the call canceled by the client. - // The offset will only be applied if the provided grpc_timeout is greater than the offset. This - // ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning - // infinity). - google.protobuf.Duration grpc_timeout_offset = 28; - - repeated UpgradeConfig upgrade_configs = 25; - - InternalRedirectAction internal_redirect_action = 26; - - // An internal redirect is handled, iff the number of previous internal redirects that a - // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` - // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` - // set to - // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - google.protobuf.UInt32Value max_internal_redirects = 31; - - // Indicates that the route has a hedge policy. Note that if this is set, - // it'll take precedence over the virtual host level hedge policy entirely - // (e.g.: policies are not merged, most internal one becomes the enforced policy). - HedgePolicy hedge_policy = 27; -} - -// HTTP retry :ref:`architecture overview `. -// [#next-free-field: 11] -message RetryPolicy { - message RetryPriority { - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - } - - message RetryHostPredicate { - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - } - - message RetryBackOff { - // Specifies the base interval between retries. This parameter is required and must be greater - // than zero. Values less than 1 ms are rounded up to 1 ms. - // See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's - // back-off algorithm. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // Specifies the maximum interval between retries. This parameter is optional, but must be - // greater than or equal to the `base_interval` if set. The default is 10 times the - // `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion - // of Envoy's back-off algorithm. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; - } - - // Specifies the conditions under which retry takes place. These are the same - // conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and - // :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. - string retry_on = 1; - - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. These are the same conditions documented for - // :ref:`config_http_filters_router_x-envoy-max-retries`. - google.protobuf.UInt32Value num_retries = 2; - - // Specifies a non-zero upstream timeout per retry attempt. This parameter is optional. The - // same conditions documented for - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. - // - // .. note:: - // - // If left unspecified, Envoy will use the global - // :ref:`route timeout ` for the request. - // Consequently, when using a :ref:`5xx ` based - // retry policy, a request that times out will not be retried as the total timeout budget - // would have been exhausted. - google.protobuf.Duration per_try_timeout = 3; - - // Specifies an implementation of a RetryPriority which is used to determine the - // distribution of load across priorities used for retries. Refer to - // :ref:`retry plugin configuration ` for more details. - RetryPriority retry_priority = 4; - - // Specifies a collection of RetryHostPredicates that will be consulted when selecting a host - // for retries. If any of the predicates reject the host, host selection will be reattempted. - // Refer to :ref:`retry plugin configuration ` for more - // details. - repeated RetryHostPredicate retry_host_predicate = 5; - - // The maximum number of times host selection will be reattempted before giving up, at which - // point the host that was last selected will be routed to. If unspecified, this will default to - // retrying once. - int64 host_selection_retry_max_attempts = 6; - - // HTTP status codes that should trigger a retry in addition to those specified by retry_on. - repeated uint32 retriable_status_codes = 7; - - // Specifies parameters that control retry back off. This parameter is optional, in which case the - // default base interval is 25 milliseconds or, if set, the current value of the - // `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times - // the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` - // describes Envoy's back-off algorithm. - RetryBackOff retry_back_off = 8; - - // HTTP response headers that trigger a retry if present in the response. A retry will be - // triggered if any of the header matches match the upstream response headers. - // The field is only consulted if 'retriable-headers' retry policy is active. - repeated HeaderMatcher retriable_headers = 9; - - // HTTP headers which must be present in the request for retries to be attempted. - repeated HeaderMatcher retriable_request_headers = 10; -} - -// HTTP request hedging :ref:`architecture overview `. -message HedgePolicy { - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // Defaults to 1. - // [#not-implemented-hide:] - google.protobuf.UInt32Value initial_requests = 1 [(validate.rules).uint32 = {gte: 1}]; - - // Specifies a probability that an additional upstream request should be sent - // on top of what is specified by initial_requests. - // Defaults to 0. - // [#not-implemented-hide:] - type.FractionalPercent additional_request_chance = 2; - - // Indicates that a hedged request should be sent when the per-try timeout is hit. - // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. - // The first request to complete successfully will be the one returned to the caller. - // - // * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client. - // * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned ot the client - // if there are no more retries left. - // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. - // - // Note: For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least - // one error code and specifies a maximum number of retries. - // - // Defaults to false. - bool hedge_on_per_try_timeout = 3; -} - -// [#next-free-field: 9] -message RedirectAction { - enum RedirectResponseCode { - // Moved Permanently HTTP Status Code - 301. - MOVED_PERMANENTLY = 0; - - // Found HTTP Status Code - 302. - FOUND = 1; - - // See Other HTTP Status Code - 303. - SEE_OTHER = 2; - - // Temporary Redirect HTTP Status Code - 307. - TEMPORARY_REDIRECT = 3; - - // Permanent Redirect HTTP Status Code - 308. - PERMANENT_REDIRECT = 4; - } - - // When the scheme redirection take place, the following rules apply: - // 1. If the source URI scheme is `http` and the port is explicitly - // set to `:80`, the port will be removed after the redirection - // 2. If the source URI scheme is `https` and the port is explicitly - // set to `:443`, the port will be removed after the redirection - oneof scheme_rewrite_specifier { - // The scheme portion of the URL will be swapped with "https". - bool https_redirect = 4; - - // The scheme portion of the URL will be swapped with this value. - string scheme_redirect = 7; - } - - // The host portion of the URL will be swapped with this value. - string host_redirect = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // The port value of the URL will be swapped with this value. - uint32 port_redirect = 8; - - oneof path_rewrite_specifier { - // The path portion of the URL will be swapped with this value. - // Please note that query string in path_redirect will override the - // request's query string and will not be stripped. - // - // For example, let's say we have the following routes: - // - // - match: { path: "/old-path-1" } - // redirect: { path_redirect: "/new-path-1" } - // - match: { path: "/old-path-2" } - // redirect: { path_redirect: "/new-path-2", strip-query: "true" } - // - match: { path: "/old-path-3" } - // redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } - // - // 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" - // 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" - // 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1" - string path_redirect = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during redirection, the matched prefix (or path) - // should be swapped with this value. This option allows redirect URLs be dynamically created - // based on the request. - // - // .. attention:: - // - // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. - string prefix_rewrite = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // The HTTP status code to use in the redirect response. The default response - // code is MOVED_PERMANENTLY (301). - RedirectResponseCode response_code = 3 [(validate.rules).enum = {defined_only: true}]; - - // Indicates that during redirection, the query portion of the URL will - // be removed. Default value is false. - bool strip_query = 6; -} - -message DirectResponseAction { - // Specifies the HTTP response status to be returned. - uint32 status = 1 [(validate.rules).uint32 = {lt: 600 gte: 100}]; - - // Specifies the content of the response body. If this setting is omitted, - // no body is included in the generated response. - // - // .. note:: - // - // Headers can be specified using *response_headers_to_add* in the enclosing - // :ref:`envoy_api_msg_route.Route`, :ref:`envoy_api_msg_RouteConfiguration` or - // :ref:`envoy_api_msg_route.VirtualHost`. - core.DataSource body = 2; -} - -message Decorator { - // The operation name associated with the request matched to this route. If tracing is - // enabled, this information will be used as the span name reported for this request. - // - // .. note:: - // - // For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden - // by the :ref:`x-envoy-decorator-operation - // ` header. - string operation = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Whether the decorated details should be propagated to the other party. The default is true. - google.protobuf.BoolValue propagate = 2; -} - -message Tracing { - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_enabled' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - type.FractionalPercent client_sampling = 1; - - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.FractionalPercent random_sampling = 2; - - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.FractionalPercent overall_sampling = 3; - - // A list of custom tags with unique tag name to create tags for the active span. - // It will take effect after merging with the :ref:`corresponding configuration - // ` - // configured in the HTTP connection manager. If two tags with the same name are configured - // each in the HTTP connection manager and the route level, the one configured here takes - // priority. - repeated type.tracing.v2.CustomTag custom_tags = 4; -} - -// A virtual cluster is a way of specifying a regex matching rule against -// certain important endpoints such that statistics are generated explicitly for -// the matched requests. The reason this is useful is that when doing -// prefix/path matching Envoy does not always know what the application -// considers to be an endpoint. Thus, it’s impossible for Envoy to generically -// emit per endpoint statistics. However, often systems have highly critical -// endpoints that they wish to get “perfect” statistics on. Virtual cluster -// statistics are perfect in the sense that they are emitted on the downstream -// side such that they include network level failures. -// -// Documentation for :ref:`virtual cluster statistics `. -// -// .. note:: -// -// Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for -// every application endpoint. This is both not easily maintainable and as well the matching and -// statistics output are not free. -message VirtualCluster { - // Specifies a regex pattern to use for matching requests. The entire path of the request - // must match the regex. The regex grammar used is defined `here - // `_. - // - // Examples: - // - // * The regex ``/rides/\d+`` matches the path */rides/0* - // * The regex ``/rides/\d+`` matches the path */rides/123* - // * The regex ``/rides/\d+`` does not match the path */rides/123/456* - // - // .. attention:: - // This field has been deprecated in favor of `headers` as it is not safe for use with - // untrusted input in all cases. - string pattern = 1 [ - deprecated = true, - (validate.rules).string = {max_bytes: 1024}, - (envoy.annotations.disallowed_by_default) = true - ]; - - // Specifies a list of header matchers to use for matching requests. Each specified header must - // match. The pseudo-headers `:path` and `:method` can be used to match the request path and - // method, respectively. - repeated HeaderMatcher headers = 4; - - // Specifies the name of the virtual cluster. The virtual cluster name as well - // as the virtual host name are used when emitting statistics. The statistics are emitted by the - // router filter and are documented :ref:`here `. - string name = 2 [(validate.rules).string = {min_bytes: 1}]; - - // Optionally specifies the HTTP method to match on. For example GET, PUT, - // etc. - // - // .. attention:: - // This field has been deprecated in favor of `headers`. - core.RequestMethod method = 3 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; -} - -// Global rate limiting :ref:`architecture overview `. -message RateLimit { - // [#next-free-field: 7] - message Action { - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("source_cluster", "") - // - // is derived from the :option:`--service-cluster` option. - message SourceCluster { - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("destination_cluster", "") - // - // Once a request matches against a route table rule, a routed cluster is determined by one of - // the following :ref:`route table configuration ` - // settings: - // - // * :ref:`cluster ` indicates the upstream cluster - // to route to. - // * :ref:`weighted_clusters ` - // chooses a cluster randomly from a set of clusters with attributed weight. - // * :ref:`cluster_header ` indicates which - // header in the request contains the target cluster. - message DestinationCluster { - } - - // The following descriptor entry is appended when a header contains a key that matches the - // *header_name*: - // - // .. code-block:: cpp - // - // ("", "") - message RequestHeaders { - // The header name to be queried from the request headers. The header’s - // value is used to populate the value of the descriptor entry for the - // descriptor_key. - string header_name = 1 [ - (validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false} - ]; - - // The key to use in the descriptor entry. - string descriptor_key = 2 [(validate.rules).string = {min_bytes: 1}]; - } - - // The following descriptor entry is appended to the descriptor and is populated using the - // trusted address from :ref:`x-forwarded-for `: - // - // .. code-block:: cpp - // - // ("remote_address", "") - message RemoteAddress { - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("generic_key", "") - message GenericKey { - // The value to use in the descriptor entry. - string descriptor_value = 1 [(validate.rules).string = {min_bytes: 1}]; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("header_match", "") - message HeaderValueMatch { - // The value to use in the descriptor entry. - string descriptor_value = 1 [(validate.rules).string = {min_bytes: 1}]; - - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - google.protobuf.BoolValue expect_match = 2; - - // Specifies a set of headers that the rate limit action should match - // on. The action will check the request’s headers against all the - // specified headers in the config. A match will happen if all the - // headers in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - repeated HeaderMatcher headers = 3 [(validate.rules).repeated = {min_items: 1}]; - } - - oneof action_specifier { - option (validate.required) = true; - - // Rate limit on source cluster. - SourceCluster source_cluster = 1; - - // Rate limit on destination cluster. - DestinationCluster destination_cluster = 2; - - // Rate limit on request headers. - RequestHeaders request_headers = 3; - - // Rate limit on remote address. - RemoteAddress remote_address = 4; - - // Rate limit on a generic key. - GenericKey generic_key = 5; - - // Rate limit on the existence of request headers. - HeaderValueMatch header_value_match = 6; - } - } - - // Refers to the stage set in the filter. The rate limit configuration only - // applies to filters with the same stage number. The default stage number is - // 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - google.protobuf.UInt32Value stage = 1 [(validate.rules).uint32 = {lte: 10}]; - - // The key to be set in runtime to disable this rate limit configuration. - string disable_key = 2; - - // A list of actions that are to be applied for this rate limit configuration. - // Order matters as the actions are processed sequentially and the descriptor - // is composed by appending descriptor entries in that sequence. If an action - // cannot append a descriptor entry, no descriptor is generated for the - // configuration. See :ref:`composing actions - // ` for additional documentation. - repeated Action actions = 3 [(validate.rules).repeated = {min_items: 1}]; -} - -// .. attention:: -// -// Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* -// header. Thus, if attempting to match on *Host*, match on *:authority* instead. -// -// .. attention:: -// -// To route on HTTP method, use the special HTTP/2 *:method* header. This works for both -// HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., -// -// .. code-block:: json -// -// { -// "name": ":method", -// "exact_match": "POST" -// } -// -// .. attention:: -// In the absence of any header match specifier, match will default to :ref:`present_match -// `. i.e, a request that has the :ref:`name -// ` header will match, regardless of the header's -// value. -// -// [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 12] -message HeaderMatcher { - reserved 2, 3; - - // Specifies the name of the header in the request. - string name = 1 - [(validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Specifies how the header match will be performed to route the request. - oneof header_match_specifier { - // If specified, header match will be performed based on the value of the header. - string exact_match = 4; - - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. The regex grammar used in the value field is defined - // `here `_. - // - // Examples: - // - // * The regex ``\d{3}`` matches the value *123* - // * The regex ``\d{3}`` does not match the value *1234* - // * The regex ``\d{3}`` does not match the value *123.456* - // - // .. attention:: - // This field has been deprecated in favor of `safe_regex_match` as it is not safe for use - // with untrusted input in all cases. - string regex_match = 5 [ - deprecated = true, - (validate.rules).string = {max_bytes: 1024}, - (envoy.annotations.disallowed_by_default) = true - ]; - - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. - type.matcher.RegexMatcher safe_regex_match = 11; - - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting of - // an optional plus or minus sign followed by a sequence of digits. The rule will not match if - // the header value does not represent an integer. Match will fail for empty values, floating - // point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, - // "-1somestring" - type.Int64Range range_match = 6; - - // If specified, header match will be performed based on whether the header is in the - // request. - bool present_match = 7; - - // If specified, header match will be performed based on the prefix of the header value. - // Note: empty prefix is not allowed, please use present_match instead. - // - // Examples: - // - // * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. - string prefix_match = 9 [(validate.rules).string = {min_bytes: 1}]; - - // If specified, header match will be performed based on the suffix of the header value. - // Note: empty suffix is not allowed, please use present_match instead. - // - // Examples: - // - // * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. - string suffix_match = 10 [(validate.rules).string = {min_bytes: 1}]; - } - - // If specified, the match result will be inverted before checking. Defaults to false. - // - // Examples: - // - // * The regex ``\d{3}`` does not match the value *1234*, so it will match when inverted. - // * The range [-10,0) will match the value -1, so it will not match when inverted. - bool invert_match = 8; -} - -// Query parameter matching treats the query string of a request's :path header -// as an ampersand-separated list of keys and/or key=value elements. -// [#next-free-field: 7] -message QueryParameterMatcher { - // Specifies the name of a key that must be present in the requested - // *path*'s query string. - string name = 1 [(validate.rules).string = {min_bytes: 1 max_bytes: 1024}]; - - // Specifies the value of the key. If the value is absent, a request - // that contains the key in its query string will match, whether the - // key appears with a value (e.g., "?debug=true") or not (e.g., "?debug") - // - // ..attention:: - // This field is deprecated. Use an `exact` match inside the `string_match` field. - string value = 3 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Specifies whether the query parameter value is a regular expression. - // Defaults to false. The entire query parameter value (i.e., the part to - // the right of the equals sign in "key=value") must match the regex. - // E.g., the regex ``\d+$`` will match *123* but not *a123* or *123a*. - // - // ..attention:: - // This field is deprecated. Use a `safe_regex` match inside the `string_match` field. - google.protobuf.BoolValue regex = 4 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - oneof query_parameter_match_specifier { - // Specifies whether a query parameter value should match against a string. - type.matcher.StringMatcher string_match = 5 [(validate.rules).message = {required: true}]; - - // Specifies whether a query parameter should be present. - bool present_match = 6; - } -} diff --git a/src/main/proto/envoy/api/v2/scoped_route.proto b/src/main/proto/envoy/api/v2/scoped_route.proto deleted file mode 100644 index 99a39ae..0000000 --- a/src/main/proto/envoy/api/v2/scoped_route.proto +++ /dev/null @@ -1,110 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "ScopedRouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP scoped routing configuration] -// * Routing :ref:`architecture overview ` - -// Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name). -// -// The HTTP connection manager builds up a table consisting of these Key to -// RouteConfiguration mappings, and looks up the RouteConfiguration to use per -// request according to the algorithm specified in the -// :ref:`scope_key_builder` -// assigned to the HttpConnectionManager. -// -// For example, with the following configurations (in YAML): -// -// HttpConnectionManager config: -// -// .. code:: -// -// ... -// scoped_routes: -// name: foo-scoped-routes -// scope_key_builder: -// fragments: -// - header_value_extractor: -// name: X-Route-Selector -// element_separator: "," -// element: -// separator: = -// key: vip -// -// ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` -// or obtained dynamically via SRDS): -// -// .. code:: -// -// (1) -// name: route-scope1 -// route_configuration_name: route-config1 -// key: -// fragments: -// - string_key: 172.10.10.20 -// -// (2) -// name: route-scope2 -// route_configuration_name: route-config2 -// key: -// fragments: -// - string_key: 172.20.20.30 -// -// A request from a client such as: -// -// .. code:: -// -// GET / HTTP/1.1 -// Host: foo.com -// X-Route-Selector: vip=172.10.10.20 -// -// would result in the routing table defined by the `route-config1` -// RouteConfiguration being assigned to the HTTP request/stream. -// -message ScopedRouteConfiguration { - // Specifies a key which is matched against the output of the - // :ref:`scope_key_builder` - // specified in the HttpConnectionManager. The matching is done per HTTP - // request and is dependent on the order of the fragments contained in the - // Key. - message Key { - message Fragment { - oneof type { - option (validate.required) = true; - - // A string to match against. - string string_key = 1; - } - } - - // The ordered set of fragments to match against. The order must match the - // fragments in the corresponding - // :ref:`scope_key_builder`. - repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // The name assigned to the routing scope. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated - // with this scope. - string route_configuration_name = 2 [(validate.rules).string = {min_bytes: 1}]; - - // The key to match against. - Key key = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/api/v2/srds.proto b/src/main/proto/envoy/api/v2/srds.proto deleted file mode 100644 index 1f61def..0000000 --- a/src/main/proto/envoy/api/v2/srds.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package envoy.api.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -import public "envoy/api/v2/scoped_route.proto"; - -option java_package = "io.envoyproxy.envoy.api.v2"; -option java_outer_classname = "SrdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: SRDS] -// * Routing :ref:`architecture overview ` - -// The Scoped Routes Discovery Service (SRDS) API distributes -// :ref:`ScopedRouteConfiguration` -// resources. Each ScopedRouteConfiguration resource represents a "routing -// scope" containing a mapping that allows the HTTP connection manager to -// dynamically assign a routing table (specified via a -// :ref:`RouteConfiguration` message) to each -// HTTP request. -service ScopedRoutesDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.ScopedRouteConfiguration"; - - rpc StreamScopedRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc DeltaScopedRoutes(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { - } - - rpc FetchScopedRoutes(DiscoveryRequest) returns (DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:scoped-routes"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message SrdsDummy { -} diff --git a/src/main/proto/envoy/config/accesslog/v2/als.proto b/src/main/proto/envoy/config/accesslog/v2/als.proto deleted file mode 100644 index 38f5edf..0000000 --- a/src/main/proto/envoy/config/accesslog/v2/als.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; - -package envoy.config.accesslog.v2; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.accesslog.v2"; -option java_outer_classname = "AlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v2;accesslogv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.access_loggers.grpc.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC Access Log Service (ALS)] - -// Configuration for the built-in *envoy.access_loggers.http_grpc* -// :ref:`AccessLog `. This configuration will -// populate :ref:`StreamAccessLogsMessage.http_logs -// `. -// [#extension: envoy.access_loggers.http_grpc] -message HttpGrpcAccessLogConfig { - CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; - - // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. - repeated string additional_request_headers_to_log = 2; - - // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. - repeated string additional_response_headers_to_log = 3; - - // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. - repeated string additional_response_trailers_to_log = 4; -} - -// Configuration for the built-in *envoy.access_loggers.tcp_grpc* type. This configuration will -// populate *StreamAccessLogsMessage.tcp_logs*. -// [#extension: envoy.access_loggers.tcp_grpc] -message TcpGrpcAccessLogConfig { - CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; -} - -// Common configuration for gRPC access logs. -// [#next-free-field: 6] -message CommonGrpcAccessLogConfig { - // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier - // `. This allows the - // access log server to differentiate between different access logs coming from the same Envoy. - string log_name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The gRPC service for the access log service. - api.v2.core.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; - - // Interval for flushing access logs to the gRPC stream. Logger will flush requests every time - // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to - // 1 second. - google.protobuf.Duration buffer_flush_interval = 3 [(validate.rules).duration = {gt {}}]; - - // Soft size limit in bytes for access log entries buffer. Logger will buffer requests until - // this limit it hit, or every time flush interval is elapsed, whichever comes first. Setting it - // to zero effectively disables the batching. Defaults to 16384. - google.protobuf.UInt32Value buffer_size_bytes = 4; - - // Additional filter state objects to log in :ref:`filter_state_objects - // `. - // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. - repeated string filter_state_objects_to_log = 5; -} diff --git a/src/main/proto/envoy/config/accesslog/v2/file.proto b/src/main/proto/envoy/config/accesslog/v2/file.proto deleted file mode 100644 index 0619493..0000000 --- a/src/main/proto/envoy/config/accesslog/v2/file.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.config.accesslog.v2; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.accesslog.v2"; -option java_outer_classname = "FileProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v2;accesslogv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.access_loggers.file.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: File access log] -// [#extension: envoy.access_loggers.file] - -// Custom configuration for an :ref:`AccessLog ` -// that writes log entries directly to a file. Configures the built-in *envoy.access_loggers.file* -// AccessLog. -message FileAccessLog { - // A path to a local file to which to write the access log entries. - string path = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof access_log_format { - // Access log :ref:`format string`. - // Envoy supports :ref:`custom access log formats ` as well as a - // :ref:`default format `. - string format = 2; - - // Access log :ref:`format dictionary`. All values - // are rendered as strings. - google.protobuf.Struct json_format = 3; - - // Access log :ref:`format dictionary`. Values are - // rendered as strings, numbers, or boolean values as appropriate. Nested JSON objects may - // be produced by some command operators (e.g.FILTER_STATE or DYNAMIC_METADATA). See the - // documentation for a specific command operator for details. - google.protobuf.Struct typed_json_format = 4; - } -} diff --git a/src/main/proto/envoy/config/accesslog/v3/accesslog.proto b/src/main/proto/envoy/config/accesslog/v3/accesslog.proto deleted file mode 100644 index f273f2e..0000000 --- a/src/main/proto/envoy/config/accesslog/v3/accesslog.proto +++ /dev/null @@ -1,355 +0,0 @@ -syntax = "proto3"; - -package envoy.config.accesslog.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; -import "envoy/type/matcher/v3/metadata.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.accesslog.v3"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v3;accesslogv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common access log types] - -message AccessLog { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.AccessLog"; - - reserved 3; - - reserved "config"; - - // The name of the access log extension configuration. - string name = 1; - - // Filter which is used to determine if the access log needs to be written. - AccessLogFilter filter = 2; - - // Custom configuration that must be set according to the access logger extension being instantiated. - // [#extension-category: envoy.access_loggers] - oneof config_type { - google.protobuf.Any typed_config = 4; - } -} - -// [#next-free-field: 14] -message AccessLogFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.AccessLogFilter"; - - oneof filter_specifier { - option (validate.required) = true; - - // Status code filter. - StatusCodeFilter status_code_filter = 1; - - // Duration filter. - DurationFilter duration_filter = 2; - - // Not health check filter. - NotHealthCheckFilter not_health_check_filter = 3; - - // Traceable filter. - TraceableFilter traceable_filter = 4; - - // Runtime filter. - RuntimeFilter runtime_filter = 5; - - // And filter. - AndFilter and_filter = 6; - - // Or filter. - OrFilter or_filter = 7; - - // Header filter. - HeaderFilter header_filter = 8; - - // Response flag filter. - ResponseFlagFilter response_flag_filter = 9; - - // gRPC status filter. - GrpcStatusFilter grpc_status_filter = 10; - - // Extension filter. - // [#extension-category: envoy.access_loggers.extension_filters] - ExtensionFilter extension_filter = 11; - - // Metadata Filter - MetadataFilter metadata_filter = 12; - - // Log Type Filter - LogTypeFilter log_type_filter = 13; - } -} - -// Filter on an integer comparison. -message ComparisonFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.ComparisonFilter"; - - enum Op { - // = - EQ = 0; - - // >= - GE = 1; - - // <= - LE = 2; - - // != - NE = 3; - } - - // Comparison operator. - Op op = 1 [(validate.rules).enum = {defined_only: true}]; - - // Value to compare against. - core.v3.RuntimeUInt32 value = 2 [(validate.rules).message = {required: true}]; -} - -// Filters on HTTP response/status code. -message StatusCodeFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.StatusCodeFilter"; - - // Comparison. - ComparisonFilter comparison = 1 [(validate.rules).message = {required: true}]; -} - -// Filters based on the duration of the request or stream, in milliseconds. -// For end of stream access logs, the total duration of the stream will be used. -// For :ref:`periodic access logs`, -// the duration of the stream at the time of log recording will be used. -message DurationFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.DurationFilter"; - - // Comparison. - ComparisonFilter comparison = 1 [(validate.rules).message = {required: true}]; -} - -// Filters for requests that are not health check requests. A health check -// request is marked by the health check filter. -message NotHealthCheckFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.NotHealthCheckFilter"; -} - -// Filters for requests that are traceable. See the tracing overview for more -// information on how a request becomes traceable. -message TraceableFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.TraceableFilter"; -} - -// Filters requests based on runtime-configurable sampling rates. -message RuntimeFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.RuntimeFilter"; - - // Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this - // key, it will override the default sampling rate specified in ``percent_sampled``. - string runtime_key = 1 [(validate.rules).string = {min_len: 1}]; - - // Defines the default sampling percentage when no runtime override is present. If not specified, the default is - // **0%** (with a denominator of 100). - type.v3.FractionalPercent percent_sampled = 2; - - // Controls how sampling decisions are made. - // - // - Default behavior (``false``): - // - // * Uses the :ref:`x-request-id` as a consistent sampling pivot. - // * When :ref:`x-request-id` is present, sampling will be consistent - // across multiple hosts based on both the ``runtime_key`` and - // :ref:`x-request-id`. - // * Useful for tracking related requests across a distributed system. - // - // - When set to ``true`` or :ref:`x-request-id` is missing: - // - // * Sampling decisions are made randomly based only on the ``runtime_key``. - // * Useful in complex filter configurations (like nested - // :ref:`AndFilter`/ - // :ref:`OrFilter` blocks) where independent probability - // calculations are desired. - // * Can be used to implement logging kill switches with predictable probability distributions. - // - bool use_independent_randomness = 3; -} - -// Performs a logical “and” operation on the result of each filter in filters. -// Filters are evaluated sequentially and if one of them returns false, the -// filter returns false immediately. -message AndFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.AndFilter"; - - repeated AccessLogFilter filters = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// Performs a logical “or” operation on the result of each individual filter. -// Filters are evaluated sequentially and if one of them returns true, the -// filter returns true immediately. -message OrFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.OrFilter"; - - repeated AccessLogFilter filters = 2 [(validate.rules).repeated = {min_items: 2}]; -} - -// Filters requests based on the presence or value of a request header. -message HeaderFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.HeaderFilter"; - - // Only requests with a header which matches the specified HeaderMatcher will - // pass the filter check. - route.v3.HeaderMatcher header = 1 [(validate.rules).message = {required: true}]; -} - -// Filters requests that received responses with an Envoy response flag set. -// A list of the response flags can be found -// in the access log formatter -// :ref:`documentation`. -message ResponseFlagFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.ResponseFlagFilter"; - - // Only responses with the any of the flags listed in this field will be - // logged. This field is optional. If it is not specified, then any response - // flag will pass the filter check. - repeated string flags = 1 [(validate.rules).repeated = { - items { - string { - in: "LH" - in: "UH" - in: "UT" - in: "LR" - in: "UR" - in: "UF" - in: "UC" - in: "UO" - in: "NR" - in: "DI" - in: "FI" - in: "RL" - in: "UAEX" - in: "RLSE" - in: "DC" - in: "URX" - in: "SI" - in: "IH" - in: "DPE" - in: "UMSDR" - in: "RFCF" - in: "NFCF" - in: "DT" - in: "UPE" - in: "NC" - in: "OM" - in: "DF" - in: "DO" - in: "DR" - in: "UDO" - } - } - }]; -} - -// Filters gRPC requests based on their response status. If a gRPC status is not -// provided, the filter will infer the status from the HTTP status code. -message GrpcStatusFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.GrpcStatusFilter"; - - enum Status { - OK = 0; - CANCELED = 1; - UNKNOWN = 2; - INVALID_ARGUMENT = 3; - DEADLINE_EXCEEDED = 4; - NOT_FOUND = 5; - ALREADY_EXISTS = 6; - PERMISSION_DENIED = 7; - RESOURCE_EXHAUSTED = 8; - FAILED_PRECONDITION = 9; - ABORTED = 10; - OUT_OF_RANGE = 11; - UNIMPLEMENTED = 12; - INTERNAL = 13; - UNAVAILABLE = 14; - DATA_LOSS = 15; - UNAUTHENTICATED = 16; - } - - // Logs only responses that have any one of the gRPC statuses in this field. - repeated Status statuses = 1 [(validate.rules).repeated = {items {enum {defined_only: true}}}]; - - // If included and set to true, the filter will instead block all responses - // with a gRPC status or inferred gRPC status enumerated in statuses, and - // allow all other responses. - bool exclude = 2; -} - -// Filters based on matching dynamic metadata. -// If the matcher path and key correspond to an existing key in dynamic -// metadata, the request is logged only if the matcher value is equal to the -// metadata value. If the matcher path and key *do not* correspond to an -// existing key in dynamic metadata, the request is logged only if -// match_if_key_not_found is "true" or unset. -message MetadataFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.MetadataFilter"; - - // Matcher to check metadata for specified value. For example, to match on the - // access_log_hint metadata, set the filter to "envoy.common" and the path to - // "access_log_hint", and the value to "true". - type.matcher.v3.MetadataMatcher matcher = 1; - - // Default result if the key does not exist in dynamic metadata: if unset or - // true, then log; if false, then don't log. - google.protobuf.BoolValue match_if_key_not_found = 2; -} - -// Filters based on access log type. -message LogTypeFilter { - // Logs only records which their type is one of the types defined in this field. - repeated data.accesslog.v3.AccessLogType types = 1 - [(validate.rules).repeated = {items {enum {defined_only: true}}}]; - - // If this field is set to true, the filter will instead block all records - // with a access log type in types field, and allow all other records. - bool exclude = 2; -} - -// Extension filter is statically registered at runtime. -message ExtensionFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.accesslog.v2.ExtensionFilter"; - - reserved 2; - - reserved "config"; - - // The name of the filter implementation to instantiate. The name must - // match a statically registered filter. - string name = 1; - - // Custom configuration that depends on the filter being instantiated. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} diff --git a/src/main/proto/envoy/config/bootstrap/v2/bootstrap.proto b/src/main/proto/envoy/config/bootstrap/v2/bootstrap.proto deleted file mode 100644 index 68a08bc..0000000 --- a/src/main/proto/envoy/config/bootstrap/v2/bootstrap.proto +++ /dev/null @@ -1,353 +0,0 @@ -syntax = "proto3"; - -package envoy.config.bootstrap.v2; - -import "envoy/api/v2/auth/secret.proto"; -import "envoy/api/v2/cluster.proto"; -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/config_source.proto"; -import "envoy/api/v2/core/event_service_config.proto"; -import "envoy/api/v2/core/socket_option.proto"; -import "envoy/api/v2/listener.proto"; -import "envoy/config/metrics/v2/stats.proto"; -import "envoy/config/overload/v2alpha/overload.proto"; -import "envoy/config/trace/v2/http_tracer.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.bootstrap.v2"; -option java_outer_classname = "BootstrapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2;bootstrapv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Bootstrap] -// This proto is supplied via the :option:`-c` CLI flag and acts as the root -// of the Envoy v2 configuration. See the :ref:`v2 configuration overview -// ` for more detail. - -// Bootstrap :ref:`configuration overview `. -// [#next-free-field: 21] -message Bootstrap { - message StaticResources { - // Static :ref:`Listeners `. These listeners are - // available regardless of LDS configuration. - repeated api.v2.Listener listeners = 1; - - // If a network based configuration source is specified for :ref:`cds_config - // `, it's necessary - // to have some initial cluster definitions available to allow Envoy to know - // how to speak to the management server. These cluster definitions may not - // use :ref:`EDS ` (i.e. they should be static - // IP or DNS-based). - repeated api.v2.Cluster clusters = 2; - - // These static secrets can be used by :ref:`SdsSecretConfig - // ` - repeated api.v2.auth.Secret secrets = 3; - } - - message DynamicResources { - reserved 4; - - // All :ref:`Listeners ` are provided by a single - // :ref:`LDS ` configuration source. - api.v2.core.ConfigSource lds_config = 1; - - // All post-bootstrap :ref:`Cluster ` definitions are - // provided by a single :ref:`CDS ` - // configuration source. - api.v2.core.ConfigSource cds_config = 2; - - // A single :ref:`ADS ` source may be optionally - // specified. This must have :ref:`api_type - // ` :ref:`GRPC - // `. Only - // :ref:`ConfigSources ` that have - // the :ref:`ads ` field set will be - // streamed on the ADS channel. - api.v2.core.ApiConfigSource ads_config = 3; - } - - reserved 10; - - // Node identity to present to the management server and for instance - // identification purposes (e.g. in generated headers). - api.v2.core.Node node = 1; - - // Statically specified resources. - StaticResources static_resources = 2; - - // xDS configuration sources. - DynamicResources dynamic_resources = 3; - - // Configuration for the cluster manager which owns all upstream clusters - // within the server. - ClusterManager cluster_manager = 4; - - // Health discovery service config option. - // (:ref:`core.ApiConfigSource `) - api.v2.core.ApiConfigSource hds_config = 14; - - // Optional file system path to search for startup flag files. - string flags_path = 5; - - // Optional set of stats sinks. - repeated metrics.v2.StatsSink stats_sinks = 6; - - // Configuration for internal processing of stats. - metrics.v2.StatsConfig stats_config = 13; - - // Optional duration between flushes to configured stats sinks. For - // performance reasons Envoy latches counters and only flushes counters and - // gauges at a periodic interval. If not specified the default is 5000ms (5 - // seconds). - // Duration must be at least 1ms and at most 5 min. - google.protobuf.Duration stats_flush_interval = 7 [(validate.rules).duration = { - lt {seconds: 300} - gte {nanos: 1000000} - }]; - - // Optional watchdog configuration. - Watchdog watchdog = 8; - - // Configuration for an external tracing provider. - // - // .. attention:: - // This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider - // `. - trace.v2.Tracing tracing = 9; - - // Configuration for the runtime configuration provider (deprecated). If not - // specified, a “null” provider will be used which will result in all defaults - // being used. - Runtime runtime = 11 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Configuration for the runtime configuration provider. If not - // specified, a “null” provider will be used which will result in all defaults - // being used. - LayeredRuntime layered_runtime = 17; - - // Configuration for the local administration HTTP server. - Admin admin = 12; - - // Optional overload manager configuration. - overload.v2alpha.OverloadManager overload_manager = 15; - - // Enable :ref:`stats for event dispatcher `, defaults to false. - // Note that this records a value for each iteration of the event loop on every thread. This - // should normally be minimal overhead, but when using - // :ref:`statsd `, it will send each observed value - // over the wire individually because the statsd protocol doesn't have any way to represent a - // histogram summary. Be aware that this can be a very large volume of data. - bool enable_dispatcher_stats = 16; - - // Optional string which will be used in lieu of x-envoy in prefixing headers. - // - // For example, if this string is present and set to X-Foo, then x-envoy-retry-on will be - // transformed into x-foo-retry-on etc. - // - // Note this applies to the headers Envoy will generate, the headers Envoy will sanitize, and the - // headers Envoy will trust for core code and core extensions only. Be VERY careful making - // changes to this string, especially in multi-layer Envoy deployments or deployments using - // extensions which are not upstream. - string header_prefix = 18; - - // Optional proxy version which will be used to set the value of :ref:`server.version statistic - // ` if specified. Envoy will not process this value, it will be sent as is to - // :ref:`stats sinks `. - google.protobuf.UInt64Value stats_server_version_override = 19; - - // Always use TCP queries instead of UDP queries for DNS lookups. - // This may be overridden on a per-cluster basis in cds_config, - // when :ref:`dns_resolvers ` and - // :ref:`use_tcp_for_dns_lookups ` are - // specified. - // Setting this value causes failure if the - // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - // server startup. Apple' API only uses UDP for DNS resolution. - bool use_tcp_for_dns_lookups = 20; -} - -// Administration interface :ref:`operations documentation -// `. -message Admin { - // The path to write the access log for the administration server. If no - // access log is desired specify ‘/dev/null’. This is only required if - // :ref:`address ` is set. - string access_log_path = 1; - - // The cpu profiler output path for the administration server. If no profile - // path is specified, the default is ‘/var/log/envoy/envoy.prof’. - string profile_path = 2; - - // The TCP address that the administration server will listen on. - // If not specified, Envoy will not start an administration server. - api.v2.core.Address address = 3; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated api.v2.core.SocketOption socket_options = 4; -} - -// Cluster manager :ref:`architecture overview `. -message ClusterManager { - message OutlierDetection { - // Specifies the path to the outlier event log. - string event_log_path = 1; - - // [#not-implemented-hide:] - // The gRPC service for the outlier detection event service. - // If empty, outlier detection events won't be sent to a remote endpoint. - api.v2.core.EventServiceConfig event_service = 2; - } - - // Name of the local cluster (i.e., the cluster that owns the Envoy running - // this configuration). In order to enable :ref:`zone aware routing - // ` this option must be set. - // If *local_cluster_name* is defined then :ref:`clusters - // ` must be defined in the :ref:`Bootstrap - // static cluster resources - // `. This is unrelated to - // the :option:`--service-cluster` option which does not `affect zone aware - // routing `_. - string local_cluster_name = 1; - - // Optional global configuration for outlier detection. - OutlierDetection outlier_detection = 2; - - // Optional configuration used to bind newly established upstream connections. - // This may be overridden on a per-cluster basis by upstream_bind_config in the cds_config. - api.v2.core.BindConfig upstream_bind_config = 3; - - // A management server endpoint to stream load stats to via - // *StreamLoadStats*. This must have :ref:`api_type - // ` :ref:`GRPC - // `. - api.v2.core.ApiConfigSource load_stats_config = 4; -} - -// Envoy process watchdog configuration. When configured, this monitors for -// nonresponsive threads and kills the process after the configured thresholds. -// See the :ref:`watchdog documentation ` for more information. -message Watchdog { - // The duration after which Envoy counts a nonresponsive thread in the - // *watchdog_miss* statistic. If not specified the default is 200ms. - google.protobuf.Duration miss_timeout = 1; - - // The duration after which Envoy counts a nonresponsive thread in the - // *watchdog_mega_miss* statistic. If not specified the default is - // 1000ms. - google.protobuf.Duration megamiss_timeout = 2; - - // If a watched thread has been nonresponsive for this duration, assume a - // programming error and kill the entire Envoy process. Set to 0 to disable - // kill behavior. If not specified the default is 0 (disabled). - google.protobuf.Duration kill_timeout = 3; - - // If at least two watched threads have been nonresponsive for at least this - // duration assume a true deadlock and kill the entire Envoy process. Set to 0 - // to disable this behavior. If not specified the default is 0 (disabled). - google.protobuf.Duration multikill_timeout = 4; -} - -// Runtime :ref:`configuration overview ` (deprecated). -message Runtime { - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. Envoy - // will watch the location for changes and reload the file system tree when - // they happen. If this parameter is not set, there will be no disk based - // runtime. - string symlink_root = 1; - - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - string subdirectory = 2; - - // Specifies an optional subdirectory to load within the root directory. If - // specified and the directory exists, configuration values within this - // directory will override those found in the primary subdirectory. This is - // useful when Envoy is deployed across many different types of servers. - // Sometimes it is useful to have a per service cluster directory for runtime - // configuration. See below for exactly how the override directory is used. - string override_subdirectory = 3; - - // Static base runtime. This will be :ref:`overridden - // ` by other runtime layers, e.g. - // disk or admin. This follows the :ref:`runtime protobuf JSON representation - // encoding `. - google.protobuf.Struct base = 4; -} - -// [#next-free-field: 6] -message RuntimeLayer { - // :ref:`Disk runtime ` layer. - message DiskLayer { - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. - // Envoy will watch the location for changes and reload the file system tree - // when they happen. See documentation on runtime :ref:`atomicity - // ` for further details on how reloads are - // treated. - string symlink_root = 1; - - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - string subdirectory = 3; - - // :ref:`Append ` the - // service cluster to the path under symlink root. - bool append_service_cluster = 2; - } - - // :ref:`Admin console runtime ` layer. - message AdminLayer { - } - - // :ref:`Runtime Discovery Service (RTDS) ` layer. - message RtdsLayer { - // Resource to subscribe to at *rtds_config* for the RTDS layer. - string name = 1; - - // RTDS configuration source. - api.v2.core.ConfigSource rtds_config = 2; - } - - // Descriptive name for the runtime layer. This is only used for the runtime - // :http:get:`/runtime` output. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof layer_specifier { - option (validate.required) = true; - - // :ref:`Static runtime ` layer. - // This follows the :ref:`runtime protobuf JSON representation encoding - // `. Unlike static xDS resources, this static - // layer is overridable by later layers in the runtime virtual filesystem. - google.protobuf.Struct static_layer = 2; - - DiskLayer disk_layer = 3; - - AdminLayer admin_layer = 4; - - RtdsLayer rtds_layer = 5; - } -} - -// Runtime :ref:`configuration overview `. -message LayeredRuntime { - // The :ref:`layers ` of the runtime. This is ordered - // such that later layers in the list overlay earlier entries. - repeated RuntimeLayer layers = 1; -} diff --git a/src/main/proto/envoy/config/bootstrap/v3/bootstrap.proto b/src/main/proto/envoy/config/bootstrap/v3/bootstrap.proto deleted file mode 100644 index 7b862c1..0000000 --- a/src/main/proto/envoy/config/bootstrap/v3/bootstrap.proto +++ /dev/null @@ -1,786 +0,0 @@ -syntax = "proto3"; - -package envoy.config.bootstrap.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/cluster/v3/cluster.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/event_service_config.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/resolver.proto"; -import "envoy/config/core/v3/socket_option.proto"; -import "envoy/config/listener/v3/listener.proto"; -import "envoy/config/metrics/v3/stats.proto"; -import "envoy/config/overload/v3/overload.proto"; -import "envoy/config/trace/v3/http_tracer.proto"; -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.bootstrap.v3"; -option java_outer_classname = "BootstrapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3;bootstrapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Bootstrap] -// This proto is supplied via the :option:`-c` CLI flag and acts as the root -// of the Envoy v3 configuration. See the :ref:`v3 configuration overview -// ` for more detail. - -// Bootstrap :ref:`configuration overview `. -// [#next-free-field: 43] -message Bootstrap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.Bootstrap"; - - message StaticResources { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.Bootstrap.StaticResources"; - - // Static :ref:`Listeners `. These listeners are - // available regardless of LDS configuration. - repeated listener.v3.Listener listeners = 1; - - // If a network based configuration source is specified for :ref:`cds_config - // `, it's necessary - // to have some initial cluster definitions available to allow Envoy to know - // how to speak to the management server. - repeated cluster.v3.Cluster clusters = 2; - - // These static secrets can be used by :ref:`SdsSecretConfig - // ` - repeated envoy.extensions.transport_sockets.tls.v3.Secret secrets = 3; - } - - // [#next-free-field: 7] - message DynamicResources { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.Bootstrap.DynamicResources"; - - reserved 4; - - // All :ref:`Listeners ` are provided by a single - // :ref:`LDS ` configuration source. - core.v3.ConfigSource lds_config = 1; - - // ``xdstp://`` resource locator for listener collection. - // [#not-implemented-hide:] - string lds_resources_locator = 5; - - // All post-bootstrap :ref:`Cluster ` definitions are - // provided by a single :ref:`CDS ` - // configuration source. - core.v3.ConfigSource cds_config = 2; - - // ``xdstp://`` resource locator for cluster collection. - // [#not-implemented-hide:] - string cds_resources_locator = 6; - - // A single :ref:`ADS ` source may be optionally - // specified. This must have :ref:`api_type - // ` :ref:`GRPC - // `. Only - // :ref:`ConfigSources ` that have - // the :ref:`ads ` field set will be - // streamed on the ADS channel. - core.v3.ApiConfigSource ads_config = 3; - } - - message ApplicationLogConfig { - message LogFormat { - oneof log_format { - option (validate.required) = true; - - // Flush application logs in JSON format. The configured JSON struct can - // support all the format flags specified in the :option:`--log-format` - // command line options section, except for the ``%v`` and ``%_`` flags. - google.protobuf.Struct json_format = 1; - - // Flush application log in a format defined by a string. The text format - // can support all the format flags specified in the :option:`--log-format` - // command line option section. - string text_format = 2; - } - } - - // Optional field to set the application logs format. If this field is set, it will override - // the default log format. Setting both this field and :option:`--log-format` command line - // option is not allowed, and will cause a bootstrap error. - LogFormat log_format = 1; - } - - message DeferredStatOptions { - // When the flag is enabled, Envoy will lazily initialize a subset of the stats (see below). - // This will save memory and CPU cycles when creating the objects that own these stats, if those - // stats are never referenced throughout the lifetime of the process. However, it will incur additional - // memory overhead for these objects, and a small increase of CPU usage when at least one of the stats - // is updated for the first time. - // - // Groups of stats that will be lazily initialized: - // - // - Cluster traffic stats: a subgroup of the :ref:`cluster statistics ` - // that are used when requests are routed to the cluster. - bool enable_deferred_creation_stats = 1; - } - - message GrpcAsyncClientManagerConfig { - // Optional field to set the expiration time for the cached gRPC client object. - // The minimal value is ``5s`` and the default is ``50s``. - google.protobuf.Duration max_cached_entry_idle_duration = 1 - [(validate.rules).duration = {gte {seconds: 5}}]; - } - - reserved 10, 11; - - reserved "runtime"; - - // Node identity to present to the management server and for instance - // identification purposes (e.g. in generated headers). - core.v3.Node node = 1; - - // A list of :ref:`Node ` field names - // that will be included in the context parameters of the effective - // ``xdstp://`` URL that is sent in a discovery request when resource - // locators are used for LDS/CDS. Any non-string field will have its JSON - // encoding set as the context parameter value, with the exception of - // metadata, which will be flattened (see example below). The supported field - // names are: - // - ``cluster`` - // - ``id`` - // - ``locality.region`` - // - ``locality.sub_zone`` - // - ``locality.zone`` - // - ``metadata`` - // - ``user_agent_build_version.metadata`` - // - ``user_agent_build_version.version`` - // - ``user_agent_name`` - // - ``user_agent_version`` - // - // The node context parameters act as a base layer dictionary for the context - // parameters (i.e. more specific resource specific context parameters will - // override). Field names will be prefixed with ````"udpa.node."```` when included in - // context parameters. - // - // For example, if node_context_params is ``["user_agent_name", "metadata"]``, - // the implied context parameters might be:: - // - // node.user_agent_name: "envoy" - // node.metadata.foo: "{\"bar\": \"baz\"}" - // node.metadata.some: "42" - // node.metadata.thing: "\"thing\"" - // - // [#not-implemented-hide:] - repeated string node_context_params = 26; - - // Statically specified resources. - StaticResources static_resources = 2; - - // xDS configuration sources. - DynamicResources dynamic_resources = 3; - - // Configuration for the cluster manager which owns all upstream clusters - // within the server. - ClusterManager cluster_manager = 4; - - // Health discovery service config option. - // (:ref:`core.ApiConfigSource `) - core.v3.ApiConfigSource hds_config = 14; - - // Optional file system path to search for startup flag files. - string flags_path = 5; - - // Optional set of stats sinks. - repeated metrics.v3.StatsSink stats_sinks = 6; - - // Options to control behaviors of deferred creation compatible stats. - DeferredStatOptions deferred_stat_options = 39; - - // Configuration for internal processing of stats. - metrics.v3.StatsConfig stats_config = 13; - - // Optional duration between flushes to configured stats sinks. For - // performance reasons Envoy latches counters and only flushes counters and - // gauges at a periodic interval. If not specified the default is ``5000ms`` (``5`` seconds). - // Only one of ``stats_flush_interval`` or ``stats_flush_on_admin`` - // can be set. - // Duration must be at least ``1ms`` and at most ``5 min``. - google.protobuf.Duration stats_flush_interval = 7 [ - (validate.rules).duration = { - lt {seconds: 300} - gte {nanos: 1000000} - }, - (udpa.annotations.field_migrate).oneof_promotion = "stats_flush" - ]; - - oneof stats_flush { - // Flush stats to sinks only when queried for on the admin interface. If set, - // a flush timer is not created. Only one of ``stats_flush_on_admin`` or - // ``stats_flush_interval`` can be set. - bool stats_flush_on_admin = 29 [(validate.rules).bool = {const: true}]; - } - - oneof stats_eviction { - // Optional duration to perform metric eviction. At every interval, during the stats flush - // the unused metrics are removed from the worker caches and the used metrics - // are marked as unused. Must be a multiple of the ``stats_flush_interval``. - google.protobuf.Duration stats_eviction_interval = 42 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - } - - // Optional watchdog configuration. - // This is for a single watchdog configuration for the entire system. - // Deprecated in favor of ``watchdogs`` which has finer granularity. - Watchdog watchdog = 8 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Optional watchdogs configuration. - // This is used for specifying different watchdogs for the different subsystems. - // [#extension-category: envoy.guarddog_actions] - Watchdogs watchdogs = 27; - - // Configuration for an external tracing provider. - // - // .. attention:: - // This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider - // `. - trace.v3.Tracing tracing = 9 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Configuration for the runtime configuration provider. If not - // specified, a “null” provider will be used which will result in all defaults - // being used. - LayeredRuntime layered_runtime = 17; - - // Configuration for the local administration HTTP server. - Admin admin = 12; - - // Optional overload manager configuration. - overload.v3.OverloadManager overload_manager = 15 [ - (udpa.annotations.security).configure_for_untrusted_downstream = true, - (udpa.annotations.security).configure_for_untrusted_upstream = true - ]; - - // Enable :ref:`stats for event dispatcher `. Defaults to ``false``. - // - // .. note:: - // - // This records a value for each iteration of the event loop on every thread. This - // should normally be minimal overhead, but when using - // :ref:`statsd `, it will send each observed value - // over the wire individually because the statsd protocol doesn't have any way to represent a - // histogram summary. Be aware that this can be a very large volume of data. - bool enable_dispatcher_stats = 16; - - // Optional string which will be used in lieu of ``x-envoy`` in prefixing headers. - // - // For example, if this string is present and set to ``X-Foo``, then ``x-envoy-retry-on`` will be - // transformed into ``x-foo-retry-on`` etc. - // - // .. note:: - // - // This applies to the headers Envoy will generate, the headers Envoy will sanitize, and the - // headers Envoy will trust for core code and core extensions only. Be VERY careful making - // changes to this string, especially in multi-layer Envoy deployments or deployments using - // extensions which are not upstream. - string header_prefix = 18; - - // Optional proxy version which will be used to set the value of :ref:`server.version statistic - // ` if specified. Envoy will not process this value, it will be sent as is to - // :ref:`stats sinks `. - google.protobuf.UInt64Value stats_server_version_override = 19; - - // Always use ``TCP`` queries instead of ``UDP`` queries for DNS lookups. - // This may be overridden on a per-cluster basis in ``cds_config``, - // when :ref:`dns_resolvers ` and - // :ref:`use_tcp_for_dns_lookups ` are - // specified. - // This field is deprecated in favor of ``dns_resolution_config`` - // which aggregates all of the DNS resolver configuration in a single message. - bool use_tcp_for_dns_lookups = 20 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolution configuration which includes the underlying DNS resolver addresses and options. - // This may be overridden on a per-cluster basis in ``cds_config``, when - // :ref:`dns_resolution_config ` - // is specified. - // This field is deprecated in favor of - // :ref:`typed_dns_resolver_config `. - core.v3.DnsResolutionConfig dns_resolution_config = 30 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolver type configuration extension. This extension can be used to configure ``c-ares``, ``apple``, - // or any other DNS resolver types and the related parameters. - // For example, an object of - // :ref:`CaresDnsResolverConfig ` - // can be packed into this ``typed_dns_resolver_config``. This configuration replaces the - // :ref:`dns_resolution_config ` - // configuration. - // - // During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exist, - // when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. - // When ``typed_dns_resolver_config`` is missing, the default behavior is in place. - // [#extension-category: envoy.network.dns_resolver] - core.v3.TypedExtensionConfig typed_dns_resolver_config = 31; - - // Specifies optional bootstrap extensions to be instantiated at startup time. - // Each item contains extension specific configuration. - // [#extension-category: envoy.bootstrap] - repeated core.v3.TypedExtensionConfig bootstrap_extensions = 21; - - // Specifies optional extensions instantiated at startup time and - // invoked during crash time on the request that caused the crash. - repeated FatalAction fatal_actions = 28; - - // Configuration sources that will participate in - // ``xdstp://`` URL authority resolution. The algorithm is as - // follows: - // - // 1. The authority field is taken from the ``xdstp://`` URL, call - // this ``resource_authority``. - // 2. ``resource_authority`` is compared against the authorities in any peer - // ``ConfigSource``. The peer ``ConfigSource`` is the configuration source - // message which would have been used unconditionally for resolution - // with opaque resource names. If there is a match with an authority, the - // peer ``ConfigSource`` message is used. - // 3. ``resource_authority`` is compared sequentially with the authorities in - // each configuration source in ``config_sources``. The first ``ConfigSource`` - // to match wins. - // 4. As a fallback, if no configuration source matches, then - // ``default_config_source`` is used. - // 5. If ``default_config_source`` is not specified, resolution fails. - // [#not-implemented-hide:] - repeated core.v3.ConfigSource config_sources = 22; - - // Default configuration source for ``xdstp://`` URLs if all - // other resolution fails. - // [#not-implemented-hide:] - core.v3.ConfigSource default_config_source = 23; - - // Optional overriding of default socket interface. The value must be the name of one of the - // socket interface factories initialized through a bootstrap extension - string default_socket_interface = 24; - - // Global map of CertificateProvider instances. These instances are referred to by name in the - // :ref:`CommonTlsContext.CertificateProviderInstance.instance_name - // ` - // field. - // [#not-implemented-hide:] - map certificate_provider_instances = 25; - - // Specifies a set of headers that need to be registered as inline header. This configuration - // allows users to customize the inline headers on-demand at Envoy startup without modifying - // Envoy's source code. - // - // .. note:: - // - // The ``set-cookie`` header cannot be registered as inline header. - repeated CustomInlineHeader inline_headers = 32; - - // Optional path to a file with performance tracing data created by ``Perfetto`` SDK in binary - // ProtoBuf format. The default value is ``envoy.pftrace``. - string perf_tracing_file_path = 33; - - // Optional overriding of default regex engine. - // If the value is not specified, ``Google RE2`` will be used by default. - // [#extension-category: envoy.regex_engines] - core.v3.TypedExtensionConfig default_regex_engine = 34; - - // Optional XdsResourcesDelegate configuration, which allows plugging custom logic into both - // fetch and load events during xDS processing. - // If a value is not specified, no ``XdsResourcesDelegate`` will be used. - // TODO(abeyad): Add public-facing documentation. - // [#not-implemented-hide:] - core.v3.TypedExtensionConfig xds_delegate_extension = 35; - - // Optional XdsConfigTracker configuration, which allows tracking xDS responses in external components, - // e.g., external tracer or monitor. It provides the process point when receive, ingest, or fail to - // process xDS resources and messages. If a value is not specified, no ``XdsConfigTracker`` will be used. - // - // .. note:: - // - // There are no in-repo extensions currently, and the :repo:`XdsConfigTracker ` - // interface should be implemented before using. - // See :repo:`xds_config_tracker_integration_test ` - // for an example usage of the interface. - core.v3.TypedExtensionConfig xds_config_tracker_extension = 36; - - // [#not-implemented-hide:] - // This controls the type of listener manager configured for Envoy. Currently - // Envoy only supports ``ListenerManager`` for this field and Envoy Mobile - // supports ``ApiListenerManager``. - core.v3.TypedExtensionConfig listener_manager = 37; - - // Optional application log configuration. - ApplicationLogConfig application_log_config = 38; - - // Optional gRPC async client manager config. - GrpcAsyncClientManagerConfig grpc_async_client_manager_config = 40; - - // Optional configuration for memory allocation manager. - // Memory releasing is only supported for `tcmalloc allocator `_. - MemoryAllocatorManager memory_allocator_manager = 41; -} - -// Administration interface :ref:`operations documentation -// `. -// [#next-free-field: 8] -message Admin { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v2.Admin"; - - // Configuration for :ref:`access logs ` - // emitted by the administration server. - repeated accesslog.v3.AccessLog access_log = 5; - - // The path to write the access log for the administration server. If no - // access log is desired specify ``/dev/null``. This is only required if - // :ref:`address ` is set. - // Deprecated in favor of ``access_log`` which offers more options. - string access_log_path = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The CPU profiler output path for the administration server. If no profile - // path is specified, the default is ``/var/log/envoy/envoy.prof``. - string profile_path = 2; - - // The TCP address that the administration server will listen on. - // If not specified, Envoy will not start an administration server. - core.v3.Address address = 3; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated core.v3.SocketOption socket_options = 4; - - // Indicates whether :ref:`global_downstream_max_connections ` - // should apply to the admin interface or not. - bool ignore_global_conn_limit = 6; - - // List of admin paths that are accessible. If not specified, all admin endpoints are accessible. - // - // When specified, only paths in this list will be accessible, all others will return ``HTTP 403 Forbidden``. - // - // Example: - // - // .. code-block:: yaml - // - // allow_paths: - // - exact: /stats - // - exact: /ready - // - prefix: /healthcheck - // - repeated type.matcher.v3.StringMatcher allow_paths = 7; -} - -// Cluster manager :ref:`architecture overview `. -// [#next-free-field: 6] -message ClusterManager { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.ClusterManager"; - - message OutlierDetection { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.ClusterManager.OutlierDetection"; - - // Specifies the path to the outlier event log. - string event_log_path = 1; - - // [#not-implemented-hide:] - // The gRPC service for the outlier detection event service. - // If empty, outlier detection events won't be sent to a remote endpoint. - core.v3.EventServiceConfig event_service = 2; - } - - // Name of the local cluster (i.e., the cluster that owns the Envoy running - // this configuration). In order to enable :ref:`zone aware routing - // ` this option must be set. - // If ``local_cluster_name`` is defined then :ref:`clusters - // ` must be defined in the :ref:`Bootstrap - // static cluster resources - // `. This is unrelated to - // the :option:`--service-cluster` option which does not `affect zone aware - // routing `_. - string local_cluster_name = 1; - - // Optional global configuration for outlier detection. - OutlierDetection outlier_detection = 2; - - // Optional configuration used to bind newly established upstream connections. - // This may be overridden on a per-cluster basis by ``upstream_bind_config`` in the ``cds_config``. - core.v3.BindConfig upstream_bind_config = 3; - - // A management server endpoint to stream load stats to via - // ``StreamLoadStats``. This must have :ref:`api_type - // ` :ref:`GRPC - // `. - core.v3.ApiConfigSource load_stats_config = 4; - - // Whether the ClusterManager will create clusters on the worker threads - // inline during requests. This will save memory and CPU cycles in cases where - // there are lots of inactive clusters and ``> 1`` worker thread. - bool enable_deferred_cluster_creation = 5; -} - -// Allows you to specify different watchdog configs for different subsystems. -// This allows finer tuned policies for the watchdog. If a subsystem is omitted -// the default values for that system will be used. -message Watchdogs { - // Watchdog for the main thread. - Watchdog main_thread_watchdog = 1; - - // Watchdog for the worker threads. - Watchdog worker_watchdog = 2; -} - -// Envoy process watchdog configuration. When configured, this monitors for -// nonresponsive threads and kills the process after the configured thresholds. -// See the :ref:`watchdog documentation ` for more information. -// [#next-free-field: 8] -message Watchdog { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v2.Watchdog"; - - message WatchdogAction { - // The events are fired in this order: ``KILL``, ``MULTIKILL``, ``MEGAMISS``, ``MISS``. - // Within an event type, actions execute in the order they are configured. - // For ``KILL``/``MULTIKILL`` there is a default ``PANIC`` that will run after the - // registered actions and kills the process if it wasn't already killed. - // It might be useful to specify several debug actions, and possibly an - // alternate ``FATAL`` action. - enum WatchdogEvent { - UNKNOWN = 0; - KILL = 1; - MULTIKILL = 2; - MEGAMISS = 3; - MISS = 4; - } - - // Extension specific configuration for the action. - core.v3.TypedExtensionConfig config = 1; - - WatchdogEvent event = 2 [(validate.rules).enum = {defined_only: true}]; - } - - // Register actions that will fire on given Watchdog events. - // See ``WatchdogAction`` for priority of events. - repeated WatchdogAction actions = 7; - - // The duration after which Envoy counts a nonresponsive thread in the - // ``watchdog_miss`` statistic. If not specified the default is ``200ms``. - google.protobuf.Duration miss_timeout = 1; - - // The duration after which Envoy counts a nonresponsive thread in the - // ``watchdog_mega_miss`` statistic. If not specified the default is ``1000ms``. - google.protobuf.Duration megamiss_timeout = 2; - - // If a watched thread has been nonresponsive for this duration, assume a - // programming error and kill the entire Envoy process. Set to ``0`` to disable - // kill behavior. If not specified the default is ``0`` (disabled). - google.protobuf.Duration kill_timeout = 3; - - // Defines the maximum jitter used to adjust the ``kill_timeout`` if ``kill_timeout`` is - // enabled. Enabling this feature would help to reduce risk of synchronized - // watchdog kill events across proxies due to external triggers. Set to ``0`` to - // disable. If not specified the default is ``0`` (disabled). - google.protobuf.Duration max_kill_timeout_jitter = 6 [(validate.rules).duration = {gte {}}]; - - // If ``max(2, ceil(registered_threads * Fraction(multikill_threshold)))`` - // threads have been nonresponsive for at least this duration kill the entire - // Envoy process. Set to ``0`` to disable this behavior. If not specified the - // default is ``0`` (disabled). - google.protobuf.Duration multikill_timeout = 4; - - // Sets the threshold for ``multikill_timeout`` in terms of the percentage of - // nonresponsive threads required for the ``multikill_timeout``. - // If not specified the default is ``0``. - type.v3.Percent multikill_threshold = 5; -} - -// Fatal actions to run while crashing. Actions can be safe (meaning they are -// async-signal safe) or unsafe. We run all safe actions before we run unsafe actions. -// -// .. note:: -// -// If using an unsafe action that could get stuck or deadlock, it is important to -// have an out of band system to terminate the process. -// -// The interface for the extension is ``Envoy::Server::Configuration::FatalAction``. -// ``FatalAction`` extensions live in the ``envoy.extensions.fatal_actions`` API -// namespace. -message FatalAction { - // Extension specific configuration for the action. It's expected to conform - // to the ``Envoy::Server::Configuration::FatalAction`` interface. - core.v3.TypedExtensionConfig config = 1; -} - -// Runtime :ref:`configuration overview ` (deprecated). -message Runtime { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.bootstrap.v2.Runtime"; - - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. Envoy - // will watch the location for changes and reload the file system tree when - // they happen. If this parameter is not set, there will be no disk based - // runtime. - string symlink_root = 1; - - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - string subdirectory = 2; - - // Specifies an optional subdirectory to load within the root directory. If - // specified and the directory exists, configuration values within this - // directory will override those found in the primary subdirectory. This is - // useful when Envoy is deployed across many different types of servers. - // Sometimes it is useful to have a per service cluster directory for runtime - // configuration. See below for exactly how the override directory is used. - string override_subdirectory = 3; - - // Static base runtime. This will be :ref:`overridden - // ` by other runtime layers, e.g. - // disk or admin. This follows the :ref:`runtime protobuf JSON representation - // encoding `. - google.protobuf.Struct base = 4; -} - -// [#next-free-field: 6] -message RuntimeLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.RuntimeLayer"; - - // :ref:`Disk runtime ` layer. - message DiskLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.RuntimeLayer.DiskLayer"; - - // The implementation assumes that the file system tree is accessed via a - // symbolic link. An atomic link swap is used when a new tree should be - // switched to. This parameter specifies the path to the symbolic link. - // Envoy will watch the location for changes and reload the file system tree - // when they happen. See documentation on runtime :ref:`atomicity - // ` for further details on how reloads are - // treated. - string symlink_root = 1; - - // Specifies the subdirectory to load within the root directory. This is - // useful if multiple systems share the same delivery mechanism. Envoy - // configuration elements can be contained in a dedicated subdirectory. - string subdirectory = 3; - - // :ref:`Append ` the - // service cluster to the path under symlink root. - bool append_service_cluster = 2; - } - - // :ref:`Admin console runtime ` layer. - message AdminLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.RuntimeLayer.AdminLayer"; - } - - // :ref:`Runtime Discovery Service (RTDS) ` layer. - message RtdsLayer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.RuntimeLayer.RtdsLayer"; - - // Resource to subscribe to at the ``rtds_config`` for the RTDS layer. - string name = 1; - - // RTDS configuration source. - core.v3.ConfigSource rtds_config = 2; - } - - // Descriptive name for the runtime layer. This is only used for the runtime - // :http:get:`/runtime` output. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof layer_specifier { - option (validate.required) = true; - - // :ref:`Static runtime ` layer. - // This follows the :ref:`runtime protobuf JSON representation encoding - // `. Unlike static xDS resources, this static - // layer is overridable by later layers in the runtime virtual filesystem. - google.protobuf.Struct static_layer = 2; - - DiskLayer disk_layer = 3; - - AdminLayer admin_layer = 4; - - RtdsLayer rtds_layer = 5; - } -} - -// Runtime :ref:`configuration overview `. -message LayeredRuntime { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.bootstrap.v2.LayeredRuntime"; - - // The :ref:`layers ` of the runtime. This is ordered - // such that later layers in the list overlay earlier entries. - repeated RuntimeLayer layers = 1; -} - -// Used to specify the header that needs to be registered as an inline header. -// -// If request or response contain multiple headers with the same name and the header -// name is registered as an inline header, then multiple headers will be folded -// into one, and multiple header values will be concatenated by a suitable delimiter. -// The delimiter is generally a comma. -// -// For example, if ``foo`` is registered as an inline header, and the headers contain -// the following two headers: -// -// .. code-block:: text -// -// foo: bar -// foo: eep -// -// Then they will eventually be folded into: -// -// .. code-block:: text -// -// foo: bar, eep -// -// Inline headers provide O(1) search performance, but each inline header imposes -// an additional memory overhead on all instances of the corresponding type of -// HeaderMap or TrailerMap. -message CustomInlineHeader { - enum InlineHeaderType { - REQUEST_HEADER = 0; - REQUEST_TRAILER = 1; - RESPONSE_HEADER = 2; - RESPONSE_TRAILER = 3; - } - - // The name of the header that is expected to be set as the inline header. - string inline_header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The type of the header that is expected to be set as the inline header. - InlineHeaderType inline_header_type = 2 [(validate.rules).enum = {defined_only: true}]; -} - -message MemoryAllocatorManager { - // Configures tcmalloc to perform background release of free memory in amount of bytes per ``memory_release_interval`` interval. - // If equals to ``0``, no memory release will occur. Defaults to ``0``. - uint64 bytes_to_release = 1; - - // Interval in milliseconds for memory releasing. If specified, during every - // interval Envoy will try to release ``bytes_to_release`` of free memory back to operating system for reuse. - // Defaults to ``1000`` milliseconds. - google.protobuf.Duration memory_release_interval = 2; -} diff --git a/src/main/proto/envoy/config/cluster/aggregate/v2alpha/cluster.proto b/src/main/proto/envoy/config/cluster/aggregate/v2alpha/cluster.proto deleted file mode 100644 index 3a6506e..0000000 --- a/src/main/proto/envoy/config/cluster/aggregate/v2alpha/cluster.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.aggregate.v2alpha; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.aggregate.v2alpha"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/aggregate/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.clusters.aggregate.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Aggregate cluster configuration] - -// Configuration for the aggregate cluster. See the :ref:`architecture overview -// ` for more information. -// [#extension: envoy.clusters.aggregate] -message ClusterConfig { - // Load balancing clusters in aggregate cluster. Clusters are prioritized based on the order they - // appear in this list. - repeated string clusters = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto b/src/main/proto/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto deleted file mode 100644 index fb3fc83..0000000 --- a/src/main/proto/envoy/config/cluster/dynamic_forward_proxy/v2alpha/cluster.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.dynamic_forward_proxy.v2alpha; - -import "envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.dynamic_forward_proxy.v2alpha"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/dynamic_forward_proxy/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.clusters.dynamic_forward_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dynamic forward proxy cluster configuration] - -// Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview -// ` for more information. -// [#extension: envoy.clusters.dynamic_forward_proxy] -message ClusterConfig { - // The DNS cache configuration that the cluster will attach to. Note this configuration must - // match that of associated :ref:`dynamic forward proxy HTTP filter configuration - // `. - common.dynamic_forward_proxy.v2alpha.DnsCacheConfig dns_cache_config = 1 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/cluster/redis/redis_cluster.proto b/src/main/proto/envoy/config/cluster/redis/redis_cluster.proto deleted file mode 100644 index ec07961..0000000 --- a/src/main/proto/envoy/config/cluster/redis/redis_cluster.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.redis; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.redis"; -option java_outer_classname = "RedisClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/redis"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Redis Cluster Configuration] -// This cluster adds support for `Redis Cluster `_, as part -// of :ref:`Envoy's support for Redis Cluster `. -// -// Redis Cluster is an extension of Redis which supports sharding and high availability (where a -// shard that loses its primary fails over to a replica, and designates it as the new primary). -// However, as there is no unified frontend or proxy service in front of Redis Cluster, the client -// (in this case Envoy) must locally maintain the state of the Redis Cluster, specifically the -// topology. A random node in the cluster is queried for the topology using the `CLUSTER SLOTS -// command `_. This result is then stored locally, and -// updated at user-configured intervals. -// -// Additionally, if -// :ref:`enable_redirection` -// is true, then moved and ask redirection errors from upstream servers will trigger a topology -// refresh when they exceed a user-configured error threshold. -// -// Example: -// -// .. code-block:: yaml -// -// name: name -// connect_timeout: 0.25s -// dns_lookup_family: V4_ONLY -// hosts: -// - socket_address: -// address: foo.bar.com -// port_value: 22120 -// cluster_type: -// name: envoy.clusters.redis -// typed_config: -// "@type": type.googleapis.com/google.protobuf.Struct -// value: -// cluster_refresh_rate: 30s -// cluster_refresh_timeout: 0.5s -// redirect_refresh_interval: 10s -// redirect_refresh_threshold: 10 -// [#extension: envoy.clusters.redis] - -// [#next-free-field: 7] -message RedisClusterConfig { - // Interval between successive topology refresh requests. If not set, this defaults to 5s. - google.protobuf.Duration cluster_refresh_rate = 1 [(validate.rules).duration = {gt {}}]; - - // Timeout for topology refresh request. If not set, this defaults to 3s. - google.protobuf.Duration cluster_refresh_timeout = 2 [(validate.rules).duration = {gt {}}]; - - // The minimum interval that must pass after triggering a topology refresh request before a new - // request can possibly be triggered again. Any errors received during one of these - // time intervals are ignored. If not set, this defaults to 5s. - google.protobuf.Duration redirect_refresh_interval = 3; - - // The number of redirection errors that must be received before - // triggering a topology refresh request. If not set, this defaults to 5. - // If this is set to 0, topology refresh after redirect is disabled. - google.protobuf.UInt32Value redirect_refresh_threshold = 4; - - // The number of failures that must be received before triggering a topology refresh request. - // If not set, this defaults to 0, which disables the topology refresh due to failure. - uint32 failure_refresh_threshold = 5; - - // The number of hosts became degraded or unhealthy before triggering a topology refresh request. - // If not set, this defaults to 0, which disables the topology refresh due to degraded or - // unhealthy host. - uint32 host_degraded_refresh_threshold = 6; -} diff --git a/src/main/proto/envoy/config/cluster/v3/circuit_breaker.proto b/src/main/proto/envoy/config/cluster/v3/circuit_breaker.proto deleted file mode 100644 index fe798ce..0000000 --- a/src/main/proto/envoy/config/cluster/v3/circuit_breaker.proto +++ /dev/null @@ -1,121 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v3"; -option java_outer_classname = "CircuitBreakerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Circuit breakers] - -// :ref:`Circuit breaking` settings can be -// specified individually for each defined priority. -message CircuitBreakers { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.cluster.CircuitBreakers"; - - // A Thresholds defines CircuitBreaker settings for a - // :ref:`RoutingPriority`. - // [#next-free-field: 9] - message Thresholds { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.cluster.CircuitBreakers.Thresholds"; - - message RetryBudget { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget"; - - // Specifies the limit on concurrent retries as a percentage of the sum of active requests and - // active pending requests. For example, if there are 100 active requests and the - // budget_percent is set to 25, there may be 25 active retries. - // - // This parameter is optional. Defaults to 20%. - type.v3.Percent budget_percent = 1; - - // Specifies the minimum retry concurrency allowed for the retry budget. The limit on the - // number of active retries may never go below this number. - // - // This parameter is optional. Defaults to 3. - google.protobuf.UInt32Value min_retry_concurrency = 2; - } - - // The :ref:`RoutingPriority` - // the specified CircuitBreaker settings apply to. - core.v3.RoutingPriority priority = 1 [(validate.rules).enum = {defined_only: true}]; - - // The maximum number of connections that Envoy will make to the upstream - // cluster. If not specified, the default is 1024. - google.protobuf.UInt32Value max_connections = 2; - - // The maximum number of pending requests that Envoy will allow to the - // upstream cluster. If not specified, the default is 1024. - // This limit is applied as a connection limit for non-HTTP traffic. - google.protobuf.UInt32Value max_pending_requests = 3; - - // The maximum number of parallel requests that Envoy will make to the - // upstream cluster. If not specified, the default is 1024. - // This limit does not apply to non-HTTP traffic. - google.protobuf.UInt32Value max_requests = 4; - - // The maximum number of parallel retries that Envoy will allow to the - // upstream cluster. If not specified, the default is 3. - google.protobuf.UInt32Value max_retries = 5; - - // Specifies a limit on concurrent retries in relation to the number of active requests. This - // parameter is optional. - // - // .. note:: - // - // If this field is set, the retry budget will override any configured retry circuit - // breaker. - RetryBudget retry_budget = 8; - - // If track_remaining is true, then stats will be published that expose - // the number of resources remaining until the circuit breakers open. If - // not specified, the default is false. - // - // .. note:: - // - // If a retry budget is used in lieu of the max_retries circuit breaker, - // the remaining retry resources remaining will not be tracked. - bool track_remaining = 6; - - // The maximum number of connection pools per cluster that Envoy will concurrently support at - // once. If not specified, the default is unlimited. Set this for clusters which create a - // large number of connection pools. See - // :ref:`Circuit Breaking ` for - // more details. - google.protobuf.UInt32Value max_connection_pools = 7; - } - - // If multiple :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, - // the first one in the list is used. If no Thresholds is defined for a given - // :ref:`RoutingPriority`, the default values - // are used. - repeated Thresholds thresholds = 1; - - // Optional per-host limits which apply to each individual host in a cluster. - // - // .. note:: - // currently only the :ref:`max_connections - // ` field is supported for per-host limits. - // - // If multiple per-host :ref:`Thresholds` - // are defined with the same :ref:`RoutingPriority`, - // the first one in the list is used. If no per-host Thresholds are defined for a given - // :ref:`RoutingPriority`, - // the cluster will not have per-host limits. - repeated Thresholds per_host_thresholds = 2; -} diff --git a/src/main/proto/envoy/config/cluster/v3/cluster.proto b/src/main/proto/envoy/config/cluster/v3/cluster.proto deleted file mode 100644 index 1924090..0000000 --- a/src/main/proto/envoy/config/cluster/v3/cluster.proto +++ /dev/null @@ -1,1407 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v3; - -import "envoy/config/cluster/v3/circuit_breaker.proto"; -import "envoy/config/cluster/v3/filter.proto"; -import "envoy/config/cluster/v3/outlier_detection.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/health_check.proto"; -import "envoy/config/core/v3/protocol.proto"; -import "envoy/config/core/v3/resolver.proto"; -import "envoy/config/endpoint/v3/endpoint.proto"; -import "envoy/type/metadata/v3/metadata.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/collection_entry.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v3"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Cluster configuration] - -// Cluster list collections. Entries are ``Cluster`` resources or references. -// [#not-implemented-hide:] -message ClusterCollection { - xds.core.v3.CollectionEntry entries = 1; -} - -// Configuration for a single upstream cluster. -// [#next-free-field: 60] -message Cluster { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster"; - - // Refer to :ref:`service discovery type ` - // for an explanation on each type. - enum DiscoveryType { - // Refer to the :ref:`static discovery type` - // for an explanation. - STATIC = 0; - - // Refer to the :ref:`strict DNS discovery - // type` - // for an explanation. - STRICT_DNS = 1; - - // Refer to the :ref:`logical DNS discovery - // type` - // for an explanation. - LOGICAL_DNS = 2; - - // Refer to the :ref:`service discovery type` - // for an explanation. - EDS = 3; - - // Refer to the :ref:`original destination discovery - // type` - // for an explanation. - ORIGINAL_DST = 4; - } - - // Refer to :ref:`load balancer type ` architecture - // overview section for information on each type. - enum LbPolicy { - reserved 4; - - reserved "ORIGINAL_DST_LB"; - - // Refer to the :ref:`round robin load balancing - // policy` - // for an explanation. - ROUND_ROBIN = 0; - - // Refer to the :ref:`least request load balancing - // policy` - // for an explanation. - LEAST_REQUEST = 1; - - // Refer to the :ref:`ring hash load balancing - // policy` - // for an explanation. - RING_HASH = 2; - - // Refer to the :ref:`random load balancing - // policy` - // for an explanation. - RANDOM = 3; - - // Refer to the :ref:`Maglev load balancing policy` - // for an explanation. - MAGLEV = 5; - - // This load balancer type must be specified if the configured cluster provides a cluster - // specific load balancer. Consult the configured cluster's documentation for whether to set - // this option or not. - CLUSTER_PROVIDED = 6; - - // Use the new :ref:`load_balancing_policy - // ` field to determine the LB policy. - // This has been deprecated in favor of using the :ref:`load_balancing_policy - // ` field without - // setting any value in :ref:`lb_policy`. - LOAD_BALANCING_POLICY_CONFIG = 7; - } - - // When V4_ONLY is selected, the DNS resolver will only perform a lookup for - // addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will - // only perform a lookup for addresses in the IPv6 family. If AUTO is - // specified, the DNS resolver will first perform a lookup for addresses in - // the IPv6 family and fallback to a lookup for addresses in the IPv4 family. - // This is semantically equivalent to a non-existent V6_PREFERRED option. - // AUTO is a legacy name that is more opaque than - // necessary and will be deprecated in favor of V6_PREFERRED in a future major version of the API. - // If V4_PREFERRED is specified, the DNS resolver will first perform a lookup for addresses in the - // IPv4 family and fallback to a lookup for addresses in the IPv6 family. i.e., the callback - // target will only get v6 addresses if there were NO v4 addresses to return. - // If ALL is specified, the DNS resolver will perform a lookup for both IPv4 and IPv6 families, - // and return all resolved addresses. When this is used, Happy Eyeballs will be enabled for - // upstream connections. Refer to :ref:`Happy Eyeballs Support ` - // for more information. - // For cluster types other than - // :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS`, - // this setting is - // ignored. - // [#next-major-version: deprecate AUTO in favor of a V6_PREFERRED option.] - enum DnsLookupFamily { - AUTO = 0; - V4_ONLY = 1; - V6_ONLY = 2; - V4_PREFERRED = 3; - ALL = 4; - } - - enum ClusterProtocolSelection { - // Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2). - // If :ref:`http2_protocol_options ` are - // present, HTTP2 will be used, otherwise HTTP1.1 will be used. - USE_CONFIGURED_PROTOCOL = 0; - - // Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection. - USE_DOWNSTREAM_PROTOCOL = 1; - } - - // TransportSocketMatch specifies what transport socket config will be used - // when the match conditions are satisfied. - message TransportSocketMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.TransportSocketMatch"; - - // The name of the match, used in stats generation. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional metadata match criteria. - // The connection to the endpoint with metadata matching what is set in this field - // will use the transport socket configuration specified here. - // The endpoint's metadata entry in ``envoy.transport_socket_match`` is used to match - // against the values specified in this field. - google.protobuf.Struct match = 2; - - // The configuration of the transport socket. - // [#extension-category: envoy.transport_sockets.upstream] - core.v3.TransportSocket transport_socket = 3; - } - - // Extended cluster type. - message CustomClusterType { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.CustomClusterType"; - - // The type of the cluster to instantiate. The name must match a supported cluster type. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Cluster specific configuration which depends on the cluster being instantiated. - // See the supported cluster for further documentation. - // [#extension-category: envoy.clusters] - google.protobuf.Any typed_config = 2; - } - - // Only valid when discovery type is EDS. - message EdsClusterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.EdsClusterConfig"; - - // Configuration for the source of EDS updates for this Cluster. - core.v3.ConfigSource eds_config = 1; - - // Optional alternative to cluster name to present to EDS. This does not - // have the same restrictions as cluster name, i.e. it may be arbitrary - // length. This may be a xdstp:// URL. - string service_name = 2; - } - - // Optionally divide the endpoints in this cluster into subsets defined by - // endpoint metadata and selected by route and weighted cluster metadata. - // [#next-free-field: 9] - message LbSubsetConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.LbSubsetConfig"; - - // If NO_FALLBACK is selected, a result - // equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, - // any cluster endpoint may be returned (subject to policy, health checks, - // etc). If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - enum LbSubsetFallbackPolicy { - NO_FALLBACK = 0; - ANY_ENDPOINT = 1; - DEFAULT_SUBSET = 2; - } - - enum LbSubsetMetadataFallbackPolicy { - // No fallback. Route metadata will be used as-is. - METADATA_NO_FALLBACK = 0; - - // A special metadata key ``fallback_list`` will be used to provide variants of metadata to try. - // Value of ``fallback_list`` key has to be a list. Every list element has to be a struct - it will - // be merged with route metadata, overriding keys that appear in both places. - // ``fallback_list`` entries will be used in order until a host is found. - // - // ``fallback_list`` key itself is removed from metadata before subset load balancing is performed. - // - // Example: - // - // for metadata: - // - // .. code-block:: yaml - // - // version: 1.0 - // fallback_list: - // - version: 2.0 - // hardware: c64 - // - hardware: c32 - // - version: 3.0 - // - // at first, metadata: - // - // .. code-block:: json - // - // {"version": "2.0", "hardware": "c64"} - // - // will be used for load balancing. If no host is found, metadata: - // - // .. code-block:: json - // - // {"version": "1.0", "hardware": "c32"} - // - // is next to try. If it still results in no host, finally metadata: - // - // .. code-block:: json - // - // {"version": "3.0"} - // - // is used. - FALLBACK_LIST = 1; - } - - // Specifications for subsets. - message LbSubsetSelector { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector"; - - // Allows to override top level fallback policy per selector. - enum LbSubsetSelectorFallbackPolicy { - // If NOT_DEFINED top level config fallback policy is used instead. - NOT_DEFINED = 0; - - // If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. - NO_FALLBACK = 1; - - // If ANY_ENDPOINT is selected, any cluster endpoint may be returned - // (subject to policy, health checks, etc). - ANY_ENDPOINT = 2; - - // If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - DEFAULT_SUBSET = 3; - - // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata - // keys reduced to - // :ref:`fallback_keys_subset`. - // It allows for a fallback to a different, less specific selector if some of the keys of - // the selector are considered optional. - KEYS_SUBSET = 4; - } - - // List of keys to match with the weighted cluster metadata. - repeated string keys = 1; - - // Selects a mode of operation in which each subset has only one host. This mode uses the same rules for - // choosing a host, but updating hosts is faster, especially for large numbers of hosts. - // - // If a match is found to a host, that host will be used regardless of priority levels. - // - // When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys`` - // will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge - // :ref:`lb_subsets_single_host_per_subset_duplicate` indicates how many duplicates are - // present in the current configuration. - bool single_host_per_subset = 4; - - // The behavior used when no endpoint subset matches the selected route's - // metadata. - LbSubsetSelectorFallbackPolicy fallback_policy = 2 - [(validate.rules).enum = {defined_only: true}]; - - // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` - // fallback policy. - // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. - // For any other fallback policy the parameter is not used and should not be set. - // Only values also present in - // :ref:`keys` are allowed, but - // ``fallback_keys_subset`` cannot be equal to ``keys``. - repeated string fallback_keys_subset = 3; - } - - // The behavior used when no endpoint subset matches the selected route's - // metadata. The value defaults to - // :ref:`NO_FALLBACK`. - LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}]; - - // Specifies the default subset of endpoints used during fallback if - // fallback_policy is - // :ref:`DEFAULT_SUBSET`. - // Each field in default_subset is - // compared to the matching LbEndpoint.Metadata under the ``envoy.lb`` - // namespace. It is valid for no hosts to match, in which case the behavior - // is the same as a fallback_policy of - // :ref:`NO_FALLBACK`. - google.protobuf.Struct default_subset = 2; - - // For each entry, LbEndpoint.Metadata's - // ``envoy.lb`` namespace is traversed and a subset is created for each unique - // combination of key and value. For example: - // - // .. code-block:: json - // - // { "subset_selectors": [ - // { "keys": [ "version" ] }, - // { "keys": [ "stage", "hardware_type" ] } - // ]} - // - // A subset is matched when the metadata from the selected route and - // weighted cluster contains the same keys and values as the subset's - // metadata. The same host may appear in multiple subsets. - repeated LbSubsetSelector subset_selectors = 3; - - // If true, routing to subsets will take into account the localities and locality weights of the - // endpoints when making the routing decision. - // - // There are some potential pitfalls associated with enabling this feature, as the resulting - // traffic split after applying both a subset match and locality weights might be undesirable. - // - // Consider for example a situation in which you have 50/50 split across two localities X/Y - // which have 100 hosts each without subsetting. If the subset LB results in X having only 1 - // host selected but Y having 100, then a lot more load is being dumped on the single host in X - // than originally anticipated in the load balancing assignment delivered via EDS. - bool locality_weight_aware = 4; - - // When used with locality_weight_aware, scales the weight of each locality by the ratio - // of hosts in the subset vs hosts in the original subset. This aims to even out the load - // going to an individual locality if said locality is disproportionately affected by the - // subset predicate. - bool scale_locality_weight = 5; - - // If true, when a fallback policy is configured and its corresponding subset fails to find - // a host this will cause any host to be selected instead. - // - // This is useful when using the default subset as the fallback policy, given the default - // subset might become empty. With this option enabled, if that happens the LB will attempt - // to select a host from the entire cluster. - bool panic_mode_any = 6; - - // If true, metadata specified for a metadata key will be matched against the corresponding - // endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value - // and any of the elements in the list matches the criteria. - bool list_as_any = 7; - - // Fallback mechanism that allows to try different route metadata until a host is found. - // If load balancing process, including all its mechanisms (like - // :ref:`fallback_policy`) - // fails to select a host, this policy decides if and how the process is repeated using another metadata. - // - // The value defaults to - // :ref:`METADATA_NO_FALLBACK`. - LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 - [(validate.rules).enum = {defined_only: true}]; - } - - // Configuration for :ref:`slow start mode `. - message SlowStartConfig { - // Represents the size of slow start window. - // If set, the newly created host remains in slow start mode starting from its creation time - // for the duration of slow start window. - google.protobuf.Duration slow_start_window = 1; - - // This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0, - // so that endpoint would get linearly increasing amount of traffic. - // When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly. - // The value of aggression parameter should be greater than 0.0. - // By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. - // - // During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: - // ``new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))``, - // where ``time_factor=(time_since_start_seconds / slow_start_time_seconds)``. - // - // As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. - // Once host exits slow start, time_factor and aggression no longer affect its weight. - core.v3.RuntimeDouble aggression = 2; - - // Configures the minimum percentage of origin weight that avoids too small new weight, - // which may cause endpoints in slow start mode receive no traffic in slow start window. - // If not specified, the default is 10%. - type.v3.Percent min_weight_percent = 3; - } - - // Specific configuration for the RoundRobin load balancing policy. - message RoundRobinLbConfig { - // Configuration for slow start mode. - // If this configuration is not set, slow start will not be not enabled. - SlowStartConfig slow_start_config = 1; - } - - // Specific configuration for the LeastRequest load balancing policy. - message LeastRequestLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.LeastRequestLbConfig"; - - // The number of random healthy hosts from which the host with the fewest active requests will - // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. - google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}]; - - // The following formula is used to calculate the dynamic weights when hosts have different load - // balancing weights: - // - // ``weight = load_balancing_weight / (active_requests + 1)^active_request_bias`` - // - // The larger the active request bias is, the more aggressively active requests will lower the - // effective weight when all host weights are not equal. - // - // ``active_request_bias`` must be greater than or equal to 0.0. - // - // When ``active_request_bias == 0.0`` the Least Request Load Balancer doesn't consider the number - // of active requests at the time it picks a host and behaves like the Round Robin Load - // Balancer. - // - // When ``active_request_bias > 0.0`` the Least Request Load Balancer scales the load balancing - // weight by the number of active requests at the time it does a pick. - // - // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's - // host sets changes, e.g., whenever there is a host membership update or a host load balancing - // weight change. - // - // .. note:: - // This setting only takes effect if all host weights are not equal. - core.v3.RuntimeDouble active_request_bias = 2; - - // Configuration for slow start mode. - // If this configuration is not set, slow start will not be not enabled. - SlowStartConfig slow_start_config = 3; - } - - // Specific configuration for the :ref:`RingHash` - // load balancing policy. - message RingHashLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.RingHashLbConfig"; - - // The hash function used to hash hosts onto the ketama ring. - enum HashFunction { - // Use `xxHash `_, this is the default hash function. - XX_HASH = 0; - - // Use `MurmurHash2 `_, this is compatible with - // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled - // on Linux and not macOS. - MURMUR_HASH_2 = 1; - } - - reserved 2; - - // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each - // provided host) the better the request distribution will reflect the desired weights. Defaults - // to 1024 entries, and limited to 8M entries. See also - // :ref:`maximum_ring_size`. - google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}]; - - // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. - HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}]; - - // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered - // to further constrain resource use. See also - // :ref:`minimum_ring_size`. - google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}]; - } - - // Specific configuration for the :ref:`Maglev` - // load balancing policy. - message MaglevLbConfig { - // The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee. - // Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same - // upstream as it was before. Increasing the table size reduces the amount of disruption. - // The table size must be prime number limited to 5000011. If it is not specified, the default is 65537. - google.protobuf.UInt64Value table_size = 1 [(validate.rules).uint64 = {lte: 5000011}]; - } - - // Specific configuration for the - // :ref:`Original Destination ` - // load balancing policy. - // [#extension: envoy.clusters.original_dst] - message OriginalDstLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.OriginalDstLbConfig"; - - // When true, a HTTP header can be used to override the original dst address. The default header is - // :ref:`x-envoy-original-dst-host `. - // - // .. attention:: - // - // This header isn't sanitized by default, so enabling this feature allows HTTP clients to - // route traffic to arbitrary hosts and/or ports, which may have serious security - // consequences. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - bool use_http_header = 1; - - // The http header to override destination address if :ref:`use_http_header `. - // is set to true. If the value is empty, :ref:`x-envoy-original-dst-host ` will be used. - string http_header_name = 2; - - // The port to override for the original dst address. This port - // will take precedence over filter state and header override ports - google.protobuf.UInt32Value upstream_port_override = 3 [(validate.rules).uint32 = {lte: 65535}]; - - // The dynamic metadata key to override destination address. - // First the request metadata is considered, then the connection one. - type.metadata.v3.MetadataKey metadata_key = 4; - } - - // Common configuration for all load balancer implementations. - // [#next-free-field: 9] - message CommonLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.CommonLbConfig"; - - // Configuration for :ref:`zone aware routing - // `. - message ZoneAwareLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig"; - - // Configures percentage of requests that will be considered for zone aware routing - // if zone aware routing is configured. If not specified, the default is 100%. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - type.v3.Percent routing_enabled = 1; - - // Configures minimum upstream cluster size required for zone aware routing - // If upstream cluster size is less than specified, zone aware routing is not performed - // even if zone aware routing is configured. If not specified, the default is 6. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - google.protobuf.UInt64Value min_cluster_size = 2; - - // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic - // mode`. Instead, the cluster will fail all - // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a - // failing service. - bool fail_traffic_on_panic = 3; - } - - // Configuration for :ref:`locality weighted load balancing - // ` - message LocalityWeightedLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig"; - } - - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - message ConsistentHashingLbConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Cluster.CommonLbConfig.ConsistentHashingLbConfig"; - - // If set to ``true``, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - bool use_hostname_for_hashing = 1; - - // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 - // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. - // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. - // Minimum is 100. - // - // Applies to both Ring Hash and Maglev load balancers. - // - // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - // ``hash_balance_factor``, requests to any upstream host are capped at ``hash_balance_factor/100`` times the average number of requests - // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing - // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify - // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the - // cascading overflow effect when choosing the next host in the ring/table). - // - // If weights are specified on the hosts, they are respected. - // - // This is an O(N) algorithm, unlike other load balancers. Using a lower ``hash_balance_factor`` results in more hosts - // being probed, so use a higher value if you require better performance. - google.protobuf.UInt32Value hash_balance_factor = 2 [(validate.rules).uint32 = {gte: 100}]; - } - - // Configures the :ref:`healthy panic threshold `. - // If not specified, the default is 50%. - // To disable panic mode, set to 0%. - // - // .. note:: - // The specified percent will be truncated to the nearest 1%. - type.v3.Percent healthy_panic_threshold = 1; - - oneof locality_config_specifier { - ZoneAwareLbConfig zone_aware_lb_config = 2; - - LocalityWeightedLbConfig locality_weighted_lb_config = 3; - } - - // If set, all health check/weight/metadata updates that happen within this duration will be - // merged and delivered in one shot when the duration expires. The start of the duration is when - // the first update happens. This is useful for big clusters, with potentially noisy deploys - // that might trigger excessive CPU usage due to a constant stream of healthcheck state changes - // or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new - // cluster). Please always keep in mind that the use of sandbox technologies may change this - // behavior. - // - // If this is not set, we default to a merge window of 1000ms. To disable it, set the merge - // window to 0. - // - // .. note:: - // Merging does not apply to cluster membership changes (e.g.: adds/removes); this is - // because merging those updates isn't currently safe. See - // https://github.com/envoyproxy/envoy/pull/3941. - google.protobuf.Duration update_merge_window = 4; - - // If set to true, Envoy will :ref:`exclude ` new hosts - // when computing load balancing weights until they have been health checked for the first time. - // This will have no effect unless active health checking is also configured. - bool ignore_new_hosts_until_first_hc = 5; - - // If set to ``true``, the cluster manager will drain all existing - // connections to upstream hosts whenever hosts are added or removed from the cluster. - bool close_connections_on_host_set_change = 6; - - // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) - ConsistentHashingLbConfig consistent_hashing_lb_config = 7; - - // This controls what hosts are considered valid when using - // :ref:`host overrides `, which is used by some - // filters to modify the load balancing decision. - // - // If this is unset then [UNKNOWN, HEALTHY, DEGRADED] will be applied by default. If this is - // set with an empty set of statuses then host overrides will be ignored by the load balancing. - core.v3.HealthStatusSet override_host_status = 8; - } - - message RefreshRate { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster.RefreshRate"; - - // Specifies the base interval between refreshes. This parameter is required and must be greater - // than zero and less than - // :ref:`max_interval `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {nanos: 1000000} - }]; - - // Specifies the maximum interval between refreshes. This parameter is optional, but must be - // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}]; - } - - message PreconnectPolicy { - // Indicates how many streams (rounded up) can be anticipated per-upstream for each - // incoming stream. This is useful for high-QPS or latency-sensitive services. Preconnecting - // will only be done if the upstream is healthy and the cluster has traffic. - // - // For example if this is 2, for an incoming HTTP/1.1 stream, 2 connections will be - // established, one for the new incoming stream, and one for a presumed follow-up stream. For - // HTTP/2, only one connection would be established by default as one connection can - // serve both the original and presumed follow-up stream. - // - // In steady state for non-multiplexed connections a value of 1.5 would mean if there were 100 - // active streams, there would be 100 connections in use, and 50 connections preconnected. - // This might be a useful value for something like short lived single-use connections, - // for example proxying HTTP/1.1 if keep-alive were false and each stream resulted in connection - // termination. It would likely be overkill for long lived connections, such as TCP proxying SMTP - // or regular HTTP/1.1 with keep-alive. For long lived traffic, a value of 1.05 would be more - // reasonable, where for every 100 connections, 5 preconnected connections would be in the queue - // in case of unexpected disconnects where the connection could not be reused. - // - // If this value is not set, or set explicitly to one, Envoy will fetch as many connections - // as needed to serve streams in flight. This means in steady state if a connection is torn down, - // a subsequent streams will pay an upstream-rtt latency penalty waiting for a new connection. - // - // This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can - // harm latency more than the preconnecting helps. - google.protobuf.DoubleValue per_upstream_preconnect_ratio = 1 - [(validate.rules).double = {lte: 3.0 gte: 1.0}]; - - // Indicates how many streams (rounded up) can be anticipated across a cluster for each - // stream, useful for low QPS services. This is currently supported for a subset of - // deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - // Unlike ``per_upstream_preconnect_ratio`` this preconnects across the upstream instances in a - // cluster, doing best effort predictions of what upstream would be picked next and - // pre-establishing a connection. - // - // Preconnecting will be limited to one preconnect per configured upstream in the cluster and will - // only be done if there are healthy upstreams and the cluster has traffic. - // - // For example if preconnecting is set to 2 for a round robin HTTP/2 cluster, on the first - // incoming stream, 2 connections will be preconnected - one to the first upstream for this - // cluster, one to the second on the assumption there will be a follow-up stream. - // - // If this value is not set, or set explicitly to one, Envoy will fetch as many connections - // as needed to serve streams in flight, so during warm up and in steady state if a connection - // is closed (and per_upstream_preconnect_ratio is not set), there will be a latency hit for - // connection establishment. - // - // If both this and preconnect_ratio are set, Envoy will make sure both predicted needs are met, - // basically preconnecting max(predictive-preconnect, per-upstream-preconnect), for each - // upstream. - // - // This is limited somewhat arbitrarily to 3 because preconnecting too aggressively can - // harm latency more than the preconnecting helps. - google.protobuf.DoubleValue predictive_preconnect_ratio = 2 - [(validate.rules).double = {lte: 3.0 gte: 1.0}]; - } - - reserved 12, 15, 7, 11, 35; - - reserved "hosts", "tls_context", "extension_protocol_options"; - - // Configuration to use different transport sockets for different endpoints. The entry of - // ``envoy.transport_socket_match`` in the :ref:`LbEndpoint.Metadata - // ` is used to match against the - // transport sockets as they appear in the list. If a match is not found, the search continues in - // :ref:`LocalityLbEndpoints.Metadata - // `. The first :ref:`match - // ` is used. For example, with - // the following match - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "enableMTLS" - // match: - // acceptMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - name: "defaultToPlaintext" - // match: {} - // transport_socket: - // name: envoy.transport_sockets.raw_buffer - // - // Connections to the endpoints whose metadata value under ``envoy.transport_socket_match`` - // having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. - // - // If a :ref:`socket match ` with empty match - // criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" - // socket match in case above. - // - // If an endpoint metadata's value under ``envoy.transport_socket_match`` does not match any - // ``TransportSocketMatch``, the locality metadata is then checked for a match. Barring any - // matches in the endpoint or locality metadata, the socket configuration fallbacks to use the - // ``tls_context`` or ``transport_socket`` specified in this cluster. - // - // This field allows gradual and flexible transport socket configuration changes. - // - // The metadata of endpoints in EDS can indicate transport socket capabilities. For example, - // an endpoint's metadata can have two key value pairs as "acceptMTLS": "true", - // "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic - // has "acceptPlaintext": "true" metadata information. - // - // Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS - // traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - // ``TransportSocketMatch`` in this field. Other client Envoys receive CDS without - // ``transport_socket_match`` set, and still send plain text traffic to the same cluster. - // - // This field can be used to specify custom transport socket configurations for health - // checks by adding matching key/value pairs in a health check's - // :ref:`transport socket match criteria ` field. - // - // [#comment:TODO(incfly): add a detailed architecture doc on intended usage.] - repeated TransportSocketMatch transport_socket_matches = 43; - - // Optional matcher that selects a transport socket from - // :ref:`transport_socket_matches `. - // - // This matcher uses the generic xDS matcher framework to select a named transport socket - // based on various inputs available at transport socket selection time. - // - // Supported matching inputs: - // - // * ``endpoint_metadata``: Extract values from the selected endpoint's metadata. - // * ``locality_metadata``: Extract values from the endpoint's locality metadata. - // * ``transport_socket_filter_state``: Extract values from filter state that was explicitly shared from - // downstream to upstream via ``TransportSocketOptions``. This enables flexible - // downstream-connection-based matching, such as: - // - // - Network namespace matching. - // - Custom connection attributes. - // - Any data explicitly passed via filter state. - // - // .. note:: - // Filter state sharing follows the same pattern as tunneling in Envoy. Filters must explicitly - // share data by setting filter state with the appropriate sharing mode. The filter state is - // then accessible via the ``transport_socket_filter_state`` input during transport socket selection. - // - // If this field is set, it takes precedence over legacy metadata-based selection - // performed by :ref:`transport_socket_matches - // ` alone. - // If the matcher does not yield a match, Envoy uses the default transport socket - // configured for the cluster. - // - // When using this field, each entry in - // :ref:`transport_socket_matches ` - // must have a unique ``name``. The matcher outcome is expected to reference one of - // these names. - xds.type.matcher.v3.Matcher transport_socket_matcher = 59; - - // Supplies the name of the cluster which must be unique across all clusters. - // The cluster name is used when emitting - // :ref:`statistics ` if :ref:`alt_stat_name - // ` is not provided. - // Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // An optional alternative to the cluster name to be used for observability. This name is used - // for emitting stats for the cluster and access logging the cluster name. This will appear as - // additional information in configuration dumps of a cluster's current status as - // :ref:`observability_name ` - // and as an additional tag "upstream_cluster.name" while tracing. - // - // .. note:: - // Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be confused with - // :ref:`Router Filter Header `. - string alt_stat_name = 28 [(udpa.annotations.field_migrate).rename = "observability_name"]; - - oneof cluster_discovery_type { - // The :ref:`service discovery type ` - // to use for resolving the cluster. - DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}]; - - // The custom cluster type. - CustomClusterType cluster_type = 38; - } - - // Configuration to use for EDS updates for the Cluster. - EdsClusterConfig eds_cluster_config = 3; - - // The timeout for new network connections to hosts in the cluster. - // If not set, a default value of 5s will be used. - google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}]; - - // Soft limit on size of the cluster’s connections read and write buffers. If - // unspecified, an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5 - [(udpa.annotations.security).configure_for_untrusted_upstream = true]; - - // The :ref:`load balancer type ` to use - // when picking a host in the cluster. - LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}]; - - // Setting this is required for specifying members of - // :ref:`STATIC`, - // :ref:`STRICT_DNS` - // or :ref:`LOGICAL_DNS` clusters. - // This field supersedes the ``hosts`` field in the v2 API. - // - // .. attention:: - // - // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. - // - endpoint.v3.ClusterLoadAssignment load_assignment = 33; - - // Optional :ref:`active health checking ` - // configuration for the cluster. If no - // configuration is specified no health checking will be done and all cluster - // members will be considered healthy at all times. - repeated core.v3.HealthCheck health_checks = 8; - - // Optional maximum requests for a single upstream connection. This parameter - // is respected by both the HTTP/1.1 and HTTP/2 connection pool - // implementations. If not specified, there is no limit. Setting this - // parameter to 1 will effectively disable keep alive. - // - // .. attention:: - // This field has been deprecated in favor of the :ref:`max_requests_per_connection ` field. - google.protobuf.UInt32Value max_requests_per_connection = 9 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Optional :ref:`circuit breaking ` for the cluster. - CircuitBreakers circuit_breakers = 10; - - // HTTP protocol options that are applied only to upstream HTTP connections. - // These options apply to all HTTP versions. - // This has been deprecated in favor of - // :ref:`upstream_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. - // upstream_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See :ref:`upstream_http_protocol_options - // ` - // for example usage. - core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 46 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Additional options when handling HTTP requests upstream. These options will be applicable to - // both HTTP1 and HTTP2 requests. - // This has been deprecated in favor of - // :ref:`common_http_protocol_options ` - // in the :ref:`http_protocol_options ` message. - // common_http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See :ref:`upstream_http_protocol_options - // ` - // for example usage. - core.v3.HttpProtocolOptions common_http_protocol_options = 29 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Additional options when handling HTTP1 requests. - // This has been deprecated in favor of http_protocol_options fields in the - // :ref:`http_protocol_options ` message. - // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See :ref:`upstream_http_protocol_options - // ` - // for example usage. - core.v3.Http1ProtocolOptions http_protocol_options = 13 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Even if default HTTP2 protocol options are desired, this field must be - // set so that Envoy will assume that the upstream supports HTTP/2 when - // making new HTTP connection pool connections. Currently, Envoy only - // supports prior knowledge for upstream connections. Even if TLS is used - // with ALPN, ``http2_protocol_options`` must be specified. As an aside this allows HTTP/2 - // connections to happen over plain text. - // This has been deprecated in favor of http2_protocol_options fields in the - // :ref:`http_protocol_options ` - // message. http2_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - // See :ref:`upstream_http_protocol_options - // ` - // for example usage. - core.v3.Http2ProtocolOptions http2_protocol_options = 14 [ - deprecated = true, - (udpa.annotations.security).configure_for_untrusted_upstream = true, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // The extension_protocol_options field is used to provide extension-specific protocol options - // for upstream connections. The key should match the extension filter name, such as - // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on - // specific options. - // [#next-major-version: make this a list of typed extensions.] - // [#extension-category: envoy.upstream_options] - map typed_extension_protocol_options = 36; - - // If the DNS refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used as the cluster’s DNS refresh - // rate. The value configured must be at least 1ms. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - // This field is deprecated in favor of using the :ref:`cluster_type` - // extension point and configuring it with :ref:`DnsCluster`. - // If :ref:`cluster_type` is configured with - // :ref:`DnsCluster`, this field will be ignored. - google.protobuf.Duration dns_refresh_rate = 16 [ - deprecated = true, - (validate.rules).duration = {gt {nanos: 1000000}}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // DNS jitter can be optionally specified if the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`. - // DNS jitter causes the cluster to refresh DNS entries later by a random amount of time to avoid a - // stampede of DNS requests. This value sets the upper bound (exclusive) for the random amount. - // There will be no jitter if this value is omitted. For cluster types other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - // This field is deprecated in favor of using the :ref:`cluster_type` - // extension point and configuring it with :ref:`DnsCluster`. - // If :ref:`cluster_type` is configured with - // :ref:`DnsCluster`, this field will be ignored. - google.protobuf.Duration dns_jitter = 58 [ - deprecated = true, - (validate.rules).duration = {gte {}}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If the DNS failure refresh rate is specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this is used as the cluster’s DNS refresh rate when requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types - // other than :ref:`STRICT_DNS` and - // :ref:`LOGICAL_DNS` this setting is - // ignored. - // This field is deprecated in favor of using the :ref:`cluster_type` - // extension point and configuring it with :ref:`DnsCluster`. - // If :ref:`cluster_type` is configured with - // :ref:`DnsCluster`, this field will be ignored. - RefreshRate dns_failure_refresh_rate = 44 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, - // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS - // resolution. - // This field is deprecated in favor of using the :ref:`cluster_type` - // extension point and configuring it with :ref:`DnsCluster`. - // If :ref:`cluster_type` is configured with - // :ref:`DnsCluster`, this field will be ignored. - bool respect_dns_ttl = 39 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The DNS IP address resolution policy. If this setting is not specified, the - // value defaults to - // :ref:`AUTO`. - // For logical and strict dns cluster, this field is deprecated in favor of using the - // :ref:`cluster_type` - // extension point and configuring it with :ref:`DnsCluster`. - // If :ref:`cluster_type` is configured with - // :ref:`DnsCluster`, this field will be ignored. - DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}]; - - // If DNS resolvers are specified and the cluster type is either - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // this value is used to specify the cluster’s dns resolvers. - // If this setting is not specified, the value defaults to the default - // resolver, which uses /etc/resolv.conf for configuration. For cluster types - // other than - // :ref:`STRICT_DNS` - // and :ref:`LOGICAL_DNS` - // this setting is ignored. - // This field is deprecated in favor of ``dns_resolution_config`` - // which aggregates all of the DNS resolver configuration in a single message. - repeated core.v3.Address dns_resolvers = 18 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Always use TCP queries instead of UDP queries for DNS lookups. - // This field is deprecated in favor of ``dns_resolution_config`` - // which aggregates all of the DNS resolver configuration in a single message. - bool use_tcp_for_dns_lookups = 45 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolution configuration which includes the underlying dns resolver addresses and options. - // This field is deprecated in favor of - // :ref:`typed_dns_resolver_config `. - core.v3.DnsResolutionConfig dns_resolution_config = 53 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, - // or any other DNS resolver types and the related parameters. - // For example, an object of - // :ref:`CaresDnsResolverConfig ` - // can be packed into this ``typed_dns_resolver_config``. This configuration replaces the - // :ref:`dns_resolution_config ` - // configuration. - // During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exists, - // when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. - // When ``typed_dns_resolver_config`` is missing, the default behavior is in place. - // Also note that this field is deprecated for logical dns and strict dns clusters and will be ignored when - // :ref:`cluster_type` is configured with - // :ref:`DnsCluster`. - // [#extension-category: envoy.network.dns_resolver] - core.v3.TypedExtensionConfig typed_dns_resolver_config = 55; - - // Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for - // :ref:`STRICT_DNS`, - // or :ref:`LOGICAL_DNS`, - // or :ref:`Redis Cluster`. - // If true, cluster readiness blocks on warm-up. If false, the cluster will complete - // initialization whether or not warm-up has completed. Defaults to true. - google.protobuf.BoolValue wait_for_warm_on_init = 54; - - // If specified, outlier detection will be enabled for this upstream cluster. - // Each of the configuration values can be overridden via - // :ref:`runtime values `. - OutlierDetection outlier_detection = 19; - - // The interval for removing stale hosts from a cluster type - // :ref:`ORIGINAL_DST`. - // Hosts are considered stale if they have not been used - // as upstream destinations during this interval. New hosts are added - // to original destination clusters on demand as new connections are - // redirected to Envoy, causing the number of hosts in the cluster to - // grow over time. Hosts that are not stale (they are actively used as - // destinations) are kept in the cluster, which allows connections to - // them remain open, saving the latency that would otherwise be spent - // on opening new connections. If this setting is not specified, the - // value defaults to 5000ms. For cluster types other than - // :ref:`ORIGINAL_DST` - // this setting is ignored. - google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}]; - - // Optional configuration used to bind newly established upstream connections. - // This overrides any bind_config specified in the bootstrap proto. - // If the address and port are empty, no bind will be performed. - core.v3.BindConfig upstream_bind_config = 21; - - // Configuration for load balancing subsetting. - LbSubsetConfig lb_subset_config = 22; - - // Optional configuration for the load balancing algorithm selected by - // LbPolicy. Currently only - // :ref:`RING_HASH`, - // :ref:`MAGLEV` and - // :ref:`LEAST_REQUEST` - // has additional configuration options. - // Specifying ring_hash_lb_config or maglev_lb_config or least_request_lb_config without setting the corresponding - // LbPolicy will generate an error at runtime. - oneof lb_config { - // Optional configuration for the Ring Hash load balancing policy. - RingHashLbConfig ring_hash_lb_config = 23; - - // Optional configuration for the Maglev load balancing policy. - MaglevLbConfig maglev_lb_config = 52; - - // Optional configuration for the Original Destination load balancing policy. - OriginalDstLbConfig original_dst_lb_config = 34; - - // Optional configuration for the LeastRequest load balancing policy. - LeastRequestLbConfig least_request_lb_config = 37; - - // Optional configuration for the RoundRobin load balancing policy. - RoundRobinLbConfig round_robin_lb_config = 56; - } - - // Common configuration for all load balancer implementations. - CommonLbConfig common_lb_config = 27; - - // Optional custom transport socket implementation to use for upstream connections. - // To setup TLS, set a transport socket with name ``envoy.transport_sockets.tls`` and - // :ref:`UpstreamTlsContexts ` in the ``typed_config``. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - core.v3.TransportSocket transport_socket = 24; - - // The Metadata field can be used to provide additional information about the - // cluster. It can be used for stats, logging, and varying filter behavior. - // Fields should use reverse DNS notation to denote which entity within Envoy - // will need the information. For instance, if the metadata is intended for - // the Router filter, the filter name should be specified as ``envoy.filters.http.router``. - core.v3.Metadata metadata = 25; - - // Determines how Envoy selects the protocol used to speak to upstream hosts. - // This has been deprecated in favor of setting explicit protocol selection - // in the :ref:`http_protocol_options - // ` message. - // http_protocol_options can be set via the cluster's - // :ref:`extension_protocol_options`. - ClusterProtocolSelection protocol_selection = 26 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Optional options for upstream connections. - UpstreamConnectionOptions upstream_connection_options = 30; - - // If an upstream host becomes unhealthy (as determined by the configured health checks - // or outlier detection), immediately close all connections to the failed host. - // - // .. note:: - // - // This is currently only supported for connections created by tcp_proxy. - // - // .. note:: - // - // The current implementation of this feature closes all connections immediately when - // the unhealthy status is detected. If there are a large number of connections open - // to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of - // time exclusively closing these connections, and not processing any other traffic. - bool close_connections_on_host_health_failure = 31; - - // If set to true, Envoy will ignore the health value of a host when processing its removal - // from service discovery. This means that if active health checking is used, Envoy will *not* - // wait for the endpoint to go unhealthy before removing it. - bool ignore_health_on_host_removal = 32; - - // An (optional) network filter chain, listed in the order the filters should be applied. - // The chain will be applied to all outgoing connections that Envoy makes to the upstream - // servers of this cluster. - repeated Filter filters = 40; - - // If this field is set and is supported by the client, it will supersede the value of - // :ref:`lb_policy`. - LoadBalancingPolicy load_balancing_policy = 41; - - // [#not-implemented-hide:] - // If present, tells the client where to send load reports via LRS. If not present, the - // client will fall back to a client-side default, which may be either (a) don't send any - // load reports or (b) send load reports for all clusters to a single default server - // (which may be configured in the bootstrap file). - // - // Note that if multiple clusters point to the same LRS server, the client may choose to - // create a separate stream for each cluster or it may choose to coalesce the data for - // multiple clusters onto a single stream. Either way, the client must make sure to send - // the data for any given cluster on no more than one stream. - // - // [#next-major-version: In the v3 API, we should consider restructuring this somehow, - // maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation - // from the LRS stream here.] - core.v3.ConfigSource lrs_server = 42; - - // A list of metric names from :ref:`ORCA load reports ` to propagate to LRS. - // - // If not specified, then ORCA load reports will not be propagated to LRS. - // - // For map fields in the ORCA proto, the string will be of the form ``.``. - // For example, the string ``named_metrics.foo`` will mean to look for the key ``foo`` in the ORCA - // :ref:`named_metrics ` field. - // - // The special map key ``*`` means to report all entries in the map (e.g., ``named_metrics.*`` means to - // report all entries in the ORCA named_metrics field). Note that this should be used only with trusted - // backends. - // - // The metric names in LRS will follow the same semantics as this field. In other words, if this field - // contains ``named_metrics.foo``, then the LRS load report will include the data with that same string - // as the key. - repeated string lrs_report_endpoint_metrics = 57; - - // If track_timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - // - // .. attention:: - // - // This field has been deprecated in favor of ``timeout_budgets``, part of - // :ref:`track_cluster_stats `. - bool track_timeout_budgets = 47 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Optional customization and configuration of upstream connection pool, and upstream type. - // - // Currently this field only applies for HTTP traffic but is designed for eventual use for custom - // TCP upstreams. - // - // For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream - // HTTP, using the http connection pool and the codec from ``http2_protocol_options`` - // - // For routes where CONNECT termination is configured, Envoy will take downstream CONNECT - // requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool. - // - // The default pool used is the generic connection pool which creates the HTTP upstream for most - // HTTP requests, and the TCP upstream if CONNECT termination is configured. - // - // If users desire custom connection pool or upstream behavior, for example terminating - // CONNECT only if a custom filter indicates it is appropriate, the custom factories - // can be registered and configured here. - // [#extension-category: envoy.upstreams] - core.v3.TypedExtensionConfig upstream_config = 48; - - // Configuration to track optional cluster stats. - TrackClusterStats track_cluster_stats = 49; - - // Preconnect configuration for this cluster. - PreconnectPolicy preconnect_policy = 50; - - // If ``connection_pool_per_downstream_connection`` is true, the cluster will use a separate - // connection pool for every downstream connection - bool connection_pool_per_downstream_connection = 51; -} - -// Extensible load balancing policy configuration. -// -// Every LB policy defined via this mechanism will be identified via a unique name using reverse -// DNS notation. If the policy needs configuration parameters, it must define a message for its -// own configuration, which will be stored in the config field. The name of the policy will tell -// clients which type of message they should expect to see in the config field. -// -// Note that there are cases where it is useful to be able to independently select LB policies -// for choosing a locality and for choosing an endpoint within that locality. For example, a -// given deployment may always use the same policy to choose the locality, but for choosing the -// endpoint within the locality, some clusters may use weighted-round-robin, while others may -// use some sort of session-based balancing. -// -// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a -// child LB policy for each locality. For each request, the parent chooses the locality and then -// delegates to the child policy for that locality to choose the endpoint within the locality. -// -// To facilitate this, the config message for the top-level LB policy may include a field of -// type LoadBalancingPolicy that specifies the child policy. -message LoadBalancingPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.LoadBalancingPolicy"; - - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.LoadBalancingPolicy.Policy"; - - reserved 2, 1, 3; - - reserved "config", "name", "typed_config"; - - // [#extension-category: envoy.load_balancing_policies] - core.v3.TypedExtensionConfig typed_extension_config = 4; - } - - // Each client will iterate over the list in order and stop at the first policy that it - // supports. This provides a mechanism for starting to use new LB policies that are not yet - // supported by all clients. - repeated Policy policies = 1; -} - -message UpstreamConnectionOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.UpstreamConnectionOptions"; - - enum FirstAddressFamilyVersion { - // respect the native ranking of destination ip addresses returned from dns - // resolution - DEFAULT = 0; - - V4 = 1; - - V6 = 2; - } - - message HappyEyeballsConfig { - // Specify the IP address family to attempt connection first in happy - // eyeballs algorithm according to RFC8305#section-4. - FirstAddressFamilyVersion first_address_family_version = 1; - - // Specify the number of addresses of the first_address_family_version being - // attempted for connection before the other address family. - google.protobuf.UInt32Value first_address_family_count = 2 [(validate.rules).uint32 = {gte: 1}]; - } - - // If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. - core.v3.TcpKeepalive tcp_keepalive = 1; - - // If enabled, associates the interface name of the local address with the upstream connection. - // This can be used by extensions during processing of requests. The association mechanism is - // implementation specific. Defaults to false due to performance concerns. - bool set_local_interface_name_on_upstream_connections = 2; - - // Configurations for happy eyeballs algorithm. - // Add configs for first_address_family_version and first_address_family_count - // when sorting destination ip addresses. - HappyEyeballsConfig happy_eyeballs_config = 3; -} - -message TrackClusterStats { - // If timeout_budgets is true, the :ref:`timeout budget histograms - // ` will be published for each - // request. These show what percentage of a request's per try and global timeout was used. A value - // of 0 would indicate that none of the timeout was used or that the timeout was infinite. A value - // of 100 would indicate that the request took the entirety of the timeout given to it. - bool timeout_budgets = 1; - - // If request_response_sizes is true, then the :ref:`histograms - // ` tracking header and body sizes - // of requests and responses will be published. Additionally, number of headers in the requests and responses will be tracked. - bool request_response_sizes = 2; - - // If true, some stats will be emitted per-endpoint, similar to the stats in admin ``/clusters`` - // output. - // - // This does not currently output correct stats during a hot-restart. - // - // This is not currently implemented by all stat sinks. - // - // These stats do not honor filtering or tag extraction rules in :ref:`StatsConfig - // ` (but fixed-value tags are supported). Admin - // endpoint filtering is supported. - // - // This may not be used at the same time as - // :ref:`load_stats_config `. - bool per_endpoint_stats = 3; -} diff --git a/src/main/proto/envoy/config/cluster/v3/filter.proto b/src/main/proto/envoy/config/cluster/v3/filter.proto deleted file mode 100644 index 54611ed..0000000 --- a/src/main/proto/envoy/config/cluster/v3/filter.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v3; - -import "envoy/config/core/v3/config_source.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v3"; -option java_outer_classname = "FilterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Upstream network filters] -// Upstream network filters apply to the connections to the upstream cluster hosts. - -message Filter { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.cluster.Filter"; - - // The name of the filter configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - // Note that Envoy's :ref:`downstream network - // filters ` are not valid upstream network filters. - // Only one of typed_config or config_discovery can be used. - google.protobuf.Any typed_config = 2; - - // Configuration source specifier for an extension configuration discovery - // service. In case of a failure and without the default configuration, the - // listener closes the connections. - // Only one of typed_config or config_discovery can be used. - core.v3.ExtensionConfigSource config_discovery = 3; -} diff --git a/src/main/proto/envoy/config/cluster/v3/outlier_detection.proto b/src/main/proto/envoy/config/cluster/v3/outlier_detection.proto deleted file mode 100644 index 822d81d..0000000 --- a/src/main/proto/envoy/config/cluster/v3/outlier_detection.proto +++ /dev/null @@ -1,180 +0,0 @@ -syntax = "proto3"; - -package envoy.config.cluster.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.cluster.v3"; -option java_outer_classname = "OutlierDetectionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3;clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Outlier detection] - -// See the :ref:`architecture overview ` for -// more information on outlier detection. -// [#next-free-field: 26] -message OutlierDetection { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.cluster.OutlierDetection"; - - // The number of consecutive server-side error responses (for HTTP traffic, - // 5xx responses; for TCP traffic, connection failures; for Redis, failure to - // respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5. - google.protobuf.UInt32Value consecutive_5xx = 1; - - // The time interval between ejection analysis sweeps. This can result in - // both new ejections as well as hosts being returned to service. Defaults - // to 10000ms or 10s. - google.protobuf.Duration interval = 2 [(validate.rules).duration = {gt {}}]; - - // The base time that a host is ejected for. The real time is equal to the - // base time multiplied by the number of times the host has been ejected and is - // capped by :ref:`max_ejection_time`. - // Defaults to 30000ms or 30s. - google.protobuf.Duration base_ejection_time = 3 [(validate.rules).duration = {gt {}}]; - - // The maximum % of an upstream cluster that can be ejected due to outlier detection. Defaults to 10% . - // Will eject at least one host regardless of the value if :ref:`always_eject_one_host` is enabled. - google.protobuf.UInt32Value max_ejection_percent = 4 [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive 5xx. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. - google.protobuf.UInt32Value enforcing_consecutive_5xx = 5 [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics. This setting can be used to - // disable ejection or to ramp it up slowly. Defaults to 100. - google.protobuf.UInt32Value enforcing_success_rate = 6 [(validate.rules).uint32 = {lte: 100}]; - - // The number of hosts in a cluster that must have enough request volume to - // detect success rate outliers. If the number of hosts is less than this - // setting, outlier detection via success rate statistics is not performed - // for any host in the cluster. Defaults to 5. - google.protobuf.UInt32Value success_rate_minimum_hosts = 7; - - // The minimum number of total requests that must be collected in one - // interval (as defined by the interval duration above) to include this host - // in success rate based outlier detection. If the volume is lower than this - // setting, outlier detection via success rate statistics is not performed - // for that host. Defaults to 100. - google.protobuf.UInt32Value success_rate_request_volume = 8; - - // This factor is used to determine the ejection threshold for success rate - // outlier ejection. The ejection threshold is the difference between the - // mean success rate, and the product of this factor and the standard - // deviation of the mean success rate: mean - (stdev * - // success_rate_stdev_factor). This factor is divided by a thousand to get a - // double. That is, if the desired factor is 1.9, the runtime value should - // be 1900. Defaults to 1900. - google.protobuf.UInt32Value success_rate_stdev_factor = 9; - - // The number of consecutive gateway failures (502, 503, 504 status codes) - // before a consecutive gateway failure ejection occurs. Defaults to 5. - google.protobuf.UInt32Value consecutive_gateway_failure = 10; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive gateway failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 0. - google.protobuf.UInt32Value enforcing_consecutive_gateway_failure = 11 - [(validate.rules).uint32 = {lte: 100}]; - - // Determines whether to distinguish local origin failures from external errors. If set to true - // the following configuration parameters are taken into account: - // :ref:`consecutive_local_origin_failure`, - // :ref:`enforcing_consecutive_local_origin_failure` - // and - // :ref:`enforcing_local_origin_success_rate`. - // Defaults to false. - bool split_external_local_origin_errors = 12; - - // The number of consecutive locally originated failures before ejection - // occurs. Defaults to 5. Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value consecutive_local_origin_failure = 13; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through consecutive locally originated failures. This setting can be - // used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value enforcing_consecutive_local_origin_failure = 14 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status - // is detected through success rate statistics for locally originated errors. - // This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. - // Parameter takes effect only when - // :ref:`split_external_local_origin_errors` - // is set to true. - google.protobuf.UInt32Value enforcing_local_origin_success_rate = 15 - [(validate.rules).uint32 = {lte: 100}]; - - // The failure percentage to use when determining failure percentage-based outlier detection. If - // the failure percentage of a given host is greater than or equal to this value, it will be - // ejected. Defaults to 85. - google.protobuf.UInt32Value failure_percentage_threshold = 16 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status is detected through - // failure percentage statistics. This setting can be used to disable ejection or to ramp it up - // slowly. Defaults to 0. - // - // [#next-major-version: setting this without setting failure_percentage_threshold should be - // invalid in v4.] - google.protobuf.UInt32Value enforcing_failure_percentage = 17 - [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host will be actually ejected when an outlier status is detected through - // local-origin failure percentage statistics. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. - google.protobuf.UInt32Value enforcing_failure_percentage_local_origin = 18 - [(validate.rules).uint32 = {lte: 100}]; - - // The minimum number of hosts in a cluster in order to perform failure percentage-based ejection. - // If the total number of hosts in the cluster is less than this value, failure percentage-based - // ejection will not be performed. Defaults to 5. - google.protobuf.UInt32Value failure_percentage_minimum_hosts = 19; - - // The minimum number of total requests that must be collected in one interval (as defined by the - // interval duration above) to perform failure percentage-based ejection for this host. If the - // volume is lower than this setting, failure percentage-based ejection will not be performed for - // this host. Defaults to 50. - google.protobuf.UInt32Value failure_percentage_request_volume = 20; - - // The maximum time that a host is ejected for. See :ref:`base_ejection_time` - // for more information. If not specified, the default value (300000ms or 300s) or - // :ref:`base_ejection_time` value is applied, whatever is larger. - google.protobuf.Duration max_ejection_time = 21 [(validate.rules).duration = {gt {}}]; - - // The maximum amount of jitter to add to the ejection time, in order to prevent - // a 'thundering herd' effect where all proxies try to reconnect to host at the same time. - // See :ref:`max_ejection_time_jitter` - // Defaults to 0s. - google.protobuf.Duration max_ejection_time_jitter = 22; - - // If active health checking is enabled and a host is ejected by outlier detection, a successful active health check - // unejects the host by default and considers it as healthy. Unejection also clears all the outlier detection counters. - // To change this default behavior set this config to ``false`` where active health checking will not uneject the host. - // Defaults to true. - google.protobuf.BoolValue successful_active_health_check_uneject_host = 23; - - // Set of host's passive monitors. - // [#not-implemented-hide:] - repeated core.v3.TypedExtensionConfig monitors = 24; - - // If enabled, at least one host is ejected regardless of the value of :ref:`max_ejection_percent`. - // Defaults to false. - google.protobuf.BoolValue always_eject_one_host = 25; -} diff --git a/src/main/proto/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto b/src/main/proto/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto deleted file mode 100644 index d04754b..0000000 --- a/src/main/proto/envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.config.common.dynamic_forward_proxy.v2alpha; - -import "envoy/api/v2/cluster.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.common.dynamic_forward_proxy.v2alpha"; -option java_outer_classname = "DnsCacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/dynamic_forward_proxy/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.common.dynamic_forward_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dynamic forward proxy common configuration] - -// Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview -// ` for more information. -// [#next-free-field: 7] -message DnsCacheConfig { - // The name of the cache. Multiple named caches allow independent dynamic forward proxy - // configurations to operate within a single Envoy process using different configurations. All - // configurations with the same name *must* otherwise have the same settings when referenced - // from different configuration components. Configuration will fail to load if this is not - // the case. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The DNS lookup family to use during resolution. - // - // [#comment:TODO(mattklein123): Figure out how to support IPv4/IPv6 "happy eyeballs" mode. The - // way this might work is a new lookup family which returns both IPv4 and IPv6 addresses, and - // then configures a host to have a primary and fall back address. With this, we could very - // likely build a "happy eyeballs" connection pool which would race the primary / fall back - // address and return the one that wins. This same method could potentially also be used for - // QUIC to TCP fall back.] - api.v2.Cluster.DnsLookupFamily dns_lookup_family = 2 - [(validate.rules).enum = {defined_only: true}]; - - // The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s. - // - // .. note: - // - // The returned DNS TTL is not currently used to alter the refresh rate. This feature will be - // added in a future change. - // - // .. note: - // - // The refresh rate is rounded to the closest millisecond, and must be at least 1ms. - google.protobuf.Duration dns_refresh_rate = 3 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // The TTL for hosts that are unused. Hosts that have not been used in the configured time - // interval will be purged. If not specified defaults to 5m. - // - // .. note: - // - // The TTL is only checked at the time of DNS refresh, as specified by *dns_refresh_rate*. This - // means that if the configured TTL is shorter than the refresh rate the host may not be removed - // immediately. - // - // .. note: - // - // The TTL has no relation to DNS TTL and is only used to control Envoy's resource usage. - google.protobuf.Duration host_ttl = 4 [(validate.rules).duration = {gt {}}]; - - // The maximum number of hosts that the cache will hold. If not specified defaults to 1024. - // - // .. note: - // - // The implementation is approximate and enforced independently on each worker thread, thus - // it is possible for the maximum hosts in the cache to go slightly above the configured - // value depending on timing. This is similar to how other circuit breakers work. - google.protobuf.UInt32Value max_hosts = 5 [(validate.rules).uint32 = {gt: 0}]; - - // If the DNS failure refresh rate is specified, - // this is used as the cache's DNS refresh rate when DNS requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the dns_refresh_rate. - api.v2.Cluster.RefreshRate dns_failure_refresh_rate = 6; -} diff --git a/src/main/proto/envoy/config/common/key_value/v3/config.proto b/src/main/proto/envoy/config/common/key_value/v3/config.proto deleted file mode 100644 index a20e6ea..0000000 --- a/src/main/proto/envoy/config/common/key_value/v3/config.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.config.common.key_value.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.common.key_value.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/key_value/v3;key_valuev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Key/value store storage plugin] - -// This shared configuration for Envoy key value stores. -message KeyValueStoreConfig { - option (xds.annotations.v3.message_status).work_in_progress = true; - - // [#extension-category: envoy.common.key_value] - core.v3.TypedExtensionConfig config = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/common/matcher/v3/matcher.proto b/src/main/proto/envoy/config/common/matcher/v3/matcher.proto deleted file mode 100644 index 9b189d1..0000000 --- a/src/main/proto/envoy/config/common/matcher/v3/matcher.proto +++ /dev/null @@ -1,239 +0,0 @@ -syntax = "proto3"; - -package envoy.config.common.matcher.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.common.matcher.v3"; -option java_outer_classname = "MatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Unified Matcher API] - -// A matcher, which may traverse a matching tree in order to result in a match action. -// During matching, the tree will be traversed until a match is found, or if no match -// is found the action specified by the most specific on_no_match will be evaluated. -// As an on_no_match might result in another matching tree being evaluated, this process -// might repeat several times until the final OnMatch (or no match) is decided. -// -// .. note:: -// Please use the syntactically equivalent :ref:`matching API ` -message Matcher { - // What to do if a match is successful. - message OnMatch { - oneof on_match { - option (validate.required) = true; - - // Nested matcher to evaluate. - // If the nested matcher does not match and does not specify - // on_no_match, then this matcher is considered not to have - // matched, even if a predicate at this level or above returned - // true. - Matcher matcher = 1; - - // Protocol-specific action to take. - core.v3.TypedExtensionConfig action = 2; - } - - // If true, the action will be taken but the caller will behave as if no - // match was found. This applies both to actions directly encoded in the - // action field and to actions returned from a nested matcher tree in the - // matcher field. A subsequent matcher on_no_match action will be used - // instead. - // - // This field is not supported in all contexts in which the matcher API is - // used. If this field is set in a context in which it's not supported, - // the resource will be rejected. - bool keep_matching = 3; - } - - // A linear list of field matchers. - // The field matchers are evaluated in order, and the first match - // wins. - message MatcherList { - // Predicate to determine if a match is successful. - message Predicate { - // Predicate for a single input field. - message SinglePredicate { - // Protocol-specific specification of input field to match on. - // [#extension-category: envoy.matching.common_inputs] - core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; - - oneof matcher { - option (validate.required) = true; - - // Built-in string matcher. - type.matcher.v3.StringMatcher value_match = 2; - - // Extension for custom matching logic. - // [#extension-category: envoy.matching.input_matchers] - core.v3.TypedExtensionConfig custom_match = 3; - } - } - - // A list of two or more matchers. Used to allow using a list within a oneof. - message PredicateList { - repeated Predicate predicate = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof match_type { - option (validate.required) = true; - - // A single predicate to evaluate. - SinglePredicate single_predicate = 1; - - // A list of predicates to be OR-ed together. - PredicateList or_matcher = 2; - - // A list of predicates to be AND-ed together. - PredicateList and_matcher = 3; - - // The inverse of a predicate - Predicate not_matcher = 4; - } - } - - // An individual matcher. - message FieldMatcher { - // Determines if the match succeeds. - Predicate predicate = 1 [(validate.rules).message = {required: true}]; - - // What to do if the match succeeds. - OnMatch on_match = 2 [(validate.rules).message = {required: true}]; - } - - // A list of matchers. First match wins. - repeated FieldMatcher matchers = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - message MatcherTree { - // A map of configured matchers. Used to allow using a map within a oneof. - message MatchMap { - map map = 1 [(validate.rules).map = {min_pairs: 1}]; - } - - // Protocol-specific specification of input field to match on. - core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; - - // Exact or prefix match maps in which to look up the input value. - // If the lookup succeeds, the match is considered successful, and - // the corresponding OnMatch is used. - oneof tree_type { - option (validate.required) = true; - - MatchMap exact_match_map = 2; - - // Longest matching prefix wins. - MatchMap prefix_match_map = 3; - - // Extension for custom matching logic. - core.v3.TypedExtensionConfig custom_match = 4; - } - } - - oneof matcher_type { - option (validate.required) = true; - - // A linear list of matchers to evaluate. - MatcherList matcher_list = 1; - - // A match tree to evaluate. - MatcherTree matcher_tree = 2; - } - - // Optional ``OnMatch`` to use if the matcher failed. - // If specified, the ``OnMatch`` is used, and the matcher is considered - // to have matched. - // If not specified, the matcher is considered not to have matched. - OnMatch on_no_match = 3; -} - -// Match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 11] -message MatchPredicate { - // A set of match configurations used for logical operations. - message MatchSet { - // The list of rules that make up the set. - repeated MatchPredicate rules = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - MatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // HTTP request headers match configuration. - HttpHeadersMatch http_request_headers_match = 5; - - // HTTP request trailers match configuration. - HttpHeadersMatch http_request_trailers_match = 6; - - // HTTP response headers match configuration. - HttpHeadersMatch http_response_headers_match = 7; - - // HTTP response trailers match configuration. - HttpHeadersMatch http_response_trailers_match = 8; - - // HTTP request generic body match configuration. - HttpGenericBodyMatch http_request_generic_body_match = 9; - - // HTTP response generic body match configuration. - HttpGenericBodyMatch http_response_generic_body_match = 10; - } -} - -// HTTP headers match configuration. -message HttpHeadersMatch { - // HTTP headers to match. - repeated route.v3.HeaderMatcher headers = 1; -} - -// HTTP generic body match configuration. -// List of text strings and hex strings to be located in HTTP body. -// All specified strings must be found in the HTTP body for positive match. -// The search may be limited to specified number of bytes from the body start. -// -// .. attention:: -// -// Searching for patterns in HTTP body is potentially CPU-intensive. For each specified pattern, HTTP body is scanned byte by byte to find a match. -// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified -// to scan only part of the HTTP body. -message HttpGenericBodyMatch { - message GenericTextMatch { - oneof rule { - option (validate.required) = true; - - // Text string to be located in HTTP body. - string string_match = 1 [(validate.rules).string = {min_len: 1}]; - - // Sequence of bytes to be located in HTTP body. - bytes binary_match = 2 [(validate.rules).bytes = {min_len: 1}]; - } - } - - // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). - uint32 bytes_limit = 1; - - // List of patterns to match. - repeated GenericTextMatch patterns = 2 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/config/common/mutation_rules/v3/mutation_rules.proto b/src/main/proto/envoy/config/common/mutation_rules/v3/mutation_rules.proto deleted file mode 100644 index c015db2..0000000 --- a/src/main/proto/envoy/config/common/mutation_rules/v3/mutation_rules.proto +++ /dev/null @@ -1,113 +0,0 @@ -syntax = "proto3"; - -package envoy.config.common.mutation_rules.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/matcher/v3/regex.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.common.mutation_rules.v3"; -option java_outer_classname = "MutationRulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/mutation_rules/v3;mutation_rulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Header mutation rules] - -// The HeaderMutationRules structure specifies what headers may be -// manipulated by a processing filter. This set of rules makes it -// possible to control which modifications a filter may make. -// -// By default, an external processing server may add, modify, or remove -// any header except for an "Envoy internal" header (which is typically -// denoted by an x-envoy prefix) or specific headers that may affect -// further filter processing: -// -// * ``host`` -// * ``:authority`` -// * ``:scheme`` -// * ``:method`` -// -// Every attempt to add, change, append, or remove a header will be -// tested against the rules here. Disallowed header mutations will be -// ignored unless ``disallow_is_error`` is set to true. -// -// Attempts to remove headers are further constrained -- regardless of the -// settings, system-defined headers (that start with ``:``) and the ``host`` -// header may never be removed. -// -// In addition, a counter will be incremented whenever a mutation is -// rejected. In the ext_proc filter, that counter is named -// ``rejected_header_mutations``. -// [#next-free-field: 8] -message HeaderMutationRules { - // By default, certain headers that could affect processing of subsequent - // filters or request routing cannot be modified. These headers are - // ``host``, ``:authority``, ``:scheme``, and ``:method``. Setting this parameter - // to true allows these headers to be modified as well. - google.protobuf.BoolValue allow_all_routing = 1; - - // If true, allow modification of envoy internal headers. By default, these - // start with ``x-envoy`` but this may be overridden in the ``Bootstrap`` - // configuration using the - // :ref:`header_prefix ` - // field. Default is false. - google.protobuf.BoolValue allow_envoy = 2; - - // If true, prevent modification of any system header, defined as a header - // that starts with a ``:`` character, regardless of any other settings. - // A processing server may still override the ``:status`` of an HTTP response - // using an ``ImmediateResponse`` message. Default is false. - google.protobuf.BoolValue disallow_system = 3; - - // If true, prevent modifications of all header values, regardless of any - // other settings. A processing server may still override the ``:status`` - // of an HTTP response using an ``ImmediateResponse`` message. Default is false. - google.protobuf.BoolValue disallow_all = 4; - - // If set, specifically allow any header that matches this regular - // expression. This overrides all other settings except for - // ``disallow_expression``. - type.matcher.v3.RegexMatcher allow_expression = 5; - - // If set, specifically disallow any header that matches this regular - // expression regardless of any other settings. - type.matcher.v3.RegexMatcher disallow_expression = 6; - - // If true, and if the rules in this list cause a header mutation to be - // disallowed, then the filter using this configuration will terminate the - // request with a 500 error. In addition, regardless of the setting of this - // parameter, any attempt to set, add, or modify a disallowed header will - // cause the ``rejected_header_mutations`` counter to be incremented. - // Default is false. - google.protobuf.BoolValue disallow_is_error = 7; -} - -// The HeaderMutation structure specifies an action that may be taken on HTTP -// headers. -message HeaderMutation { - message RemoveOnMatch { - // A string matcher that will be applied to the header key. If the header key - // matches, the header will be removed. - type.matcher.v3.StringMatcher key_matcher = 1 [(validate.rules).message = {required: true}]; - } - - oneof action { - option (validate.required) = true; - - // Remove the specified header if it exists. - string remove = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Append new header by the specified HeaderValueOption. - core.v3.HeaderValueOption append = 2; - - // Remove the header if the key matches the specified string matcher. - RemoveOnMatch remove_on_match = 3; - } -} diff --git a/src/main/proto/envoy/config/common/tap/v2alpha/common.proto b/src/main/proto/envoy/config/common/tap/v2alpha/common.proto deleted file mode 100644 index 23b7eee..0000000 --- a/src/main/proto/envoy/config/common/tap/v2alpha/common.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package envoy.config.common.tap.v2alpha; - -import "envoy/service/tap/v2alpha/common.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.common.tap.v2alpha"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/common/tap/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.common.tap.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common tap extension configuration] - -// Common configuration for all tap extensions. -message CommonExtensionConfig { - oneof config_type { - option (validate.required) = true; - - // If specified, the tap filter will be configured via an admin handler. - AdminConfig admin_config = 1; - - // If specified, the tap filter will be configured via a static configuration that cannot be - // changed. - service.tap.v2alpha.TapConfig static_config = 2; - } -} - -// Configuration for the admin handler. See :ref:`here ` for -// more information. -message AdminConfig { - // Opaque configuration ID. When requests are made to the admin handler, the passed opaque ID is - // matched to the configured filter opaque ID to determine which filter to configure. - string config_id = 1 [(validate.rules).string = {min_bytes: 1}]; -} diff --git a/src/main/proto/envoy/config/core/v3/address.proto b/src/main/proto/envoy/config/core/v3/address.proto deleted file mode 100644 index 17a6826..0000000 --- a/src/main/proto/envoy/config/core/v3/address.proto +++ /dev/null @@ -1,214 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/socket_option.proto"; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "AddressProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Network addresses] - -message Pipe { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Pipe"; - - // Unix Domain Socket path. On Linux, paths starting with '@' will use the - // abstract namespace. The starting '@' is replaced by a null byte by Envoy. - // Paths starting with '@' will result in an error in environments other than - // Linux. - string path = 1 [(validate.rules).string = {min_len: 1}]; - - // The mode for the Pipe. Not applicable for abstract sockets. - uint32 mode = 2 [(validate.rules).uint32 = {lte: 511}]; -} - -// The address represents an envoy internal listener. -// [#comment: TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30.] -message EnvoyInternalAddress { - oneof address_name_specifier { - option (validate.required) = true; - - // Specifies the :ref:`name ` of the - // internal listener. - string server_listener_name = 1; - } - - // Specifies an endpoint identifier to distinguish between multiple endpoints for the same internal listener in a - // single upstream pool. Only used in the upstream addresses for tracking changes to individual endpoints. This, for - // example, may be set to the final destination IP for the target internal listener. - string endpoint_id = 2; -} - -// [#next-free-field: 8] -message SocketAddress { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SocketAddress"; - - enum Protocol { - TCP = 0; - UDP = 1; - } - - Protocol protocol = 1 [(validate.rules).enum = {defined_only: true}]; - - // The address for this socket. :ref:`Listeners ` will bind - // to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` - // to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: - // It is possible to distinguish a Listener address via the prefix/suffix matching - // in :ref:`FilterChainMatch `.] When used - // within an upstream :ref:`BindConfig `, the address - // controls the source address of outbound connections. For :ref:`clusters - // `, the cluster type determines whether the - // address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS - // (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized - // via :ref:`resolver_name `. - string address = 2 [(validate.rules).string = {min_len: 1}]; - - oneof port_specifier { - option (validate.required) = true; - - uint32 port_value = 3 [(validate.rules).uint32 = {lte: 65535}]; - - // This is only valid if :ref:`resolver_name - // ` is specified below and the - // named resolver is capable of named port resolution. - string named_port = 4; - } - - // The name of the custom resolver. This must have been registered with Envoy. If - // this is empty, a context dependent default applies. If the address is a concrete - // IP address, no resolution will occur. If address is a hostname this - // should be set for resolution other than DNS. Specifying a custom resolver with - // ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime. - string resolver_name = 5; - - // When binding to an IPv6 address above, this enables `IPv4 compatibility - // `_. Binding to ``::`` will - // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into - // IPv6 space as ``::FFFF:``. - bool ipv4_compat = 6; - - // Filepath that specifies the Linux network namespace this socket will be created in (see ``man 7 - // network_namespaces``). If this field is set, Envoy will create the socket in the specified - // network namespace. - // - // .. note:: - // Setting this parameter requires Envoy to run with the ``CAP_NET_ADMIN`` capability. - // - // .. attention:: - // Network namespaces are only configurable on Linux. Otherwise, this field has no effect. - string network_namespace_filepath = 7; -} - -message TcpKeepalive { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.TcpKeepalive"; - - // Maximum number of keepalive probes to send without response before deciding - // the connection is dead. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 9.) Setting this to ``0`` disables TCP keepalive. - google.protobuf.UInt32Value keepalive_probes = 1; - - // The number of seconds a connection needs to be idle before keep-alive probes - // start being sent. Default is to use the OS level configuration (unless - // overridden, Linux defaults to 7200s (i.e., 2 hours.) Setting this to ``0`` disables - // TCP keepalive. - google.protobuf.UInt32Value keepalive_time = 2; - - // The number of seconds between keep-alive probes. Default is to use the OS - // level configuration (unless overridden, Linux defaults to 75s.) Setting this to - // ``0`` disables TCP keepalive. - google.protobuf.UInt32Value keepalive_interval = 3; -} - -message ExtraSourceAddress { - // The additional address to bind. - SocketAddress address = 1 [(validate.rules).message = {required: true}]; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. If specified, this will override the - // :ref:`socket_options ` - // in the BindConfig. If specified with no - // :ref:`socket_options ` - // or an empty list of :ref:`socket_options `, - // it means no socket option will apply. - SocketOptionsOverride socket_options = 2; -} - -// [#next-free-field: 7] -message BindConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.BindConfig"; - - // The address to bind to when creating a socket. - SocketAddress source_address = 1; - - // Whether to set the ``IP_FREEBIND`` option when creating the socket. When this - // flag is set to true, allows the :ref:`source_address - // ` to be an IP address - // that is not configured on the system running Envoy. When this flag is set - // to false, the option ``IP_FREEBIND`` is disabled on the socket. When this - // flag is not set (default), the socket is not modified, i.e. the option is - // neither enabled nor disabled. - google.protobuf.BoolValue freebind = 2; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - repeated SocketOption socket_options = 3; - - // Extra source addresses appended to the address specified in the ``source_address`` - // field. This enables to specify multiple source addresses. - // The source address selection is determined by :ref:`local_address_selector - // `. - repeated ExtraSourceAddress extra_source_addresses = 5; - - // Deprecated by - // :ref:`extra_source_addresses ` - repeated SocketAddress additional_source_addresses = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Custom local address selector to override the default (i.e. - // :ref:`DefaultLocalAddressSelector - // `). - // [#extension-category: envoy.upstream.local_address_selector] - TypedExtensionConfig local_address_selector = 6; -} - -// Addresses specify either a logical or physical address and port, which are -// used to tell Envoy where to bind/listen, connect to upstream and find -// management servers. -message Address { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Address"; - - oneof address { - option (validate.required) = true; - - SocketAddress socket_address = 1; - - Pipe pipe = 2; - - // Specifies a user-space address handled by :ref:`internal listeners - // `. - EnvoyInternalAddress envoy_internal_address = 3; - } -} - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. -message CidrRange { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.CidrRange"; - - // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. - string address_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. - google.protobuf.UInt32Value prefix_len = 2 [(validate.rules).uint32 = {lte: 128}]; -} diff --git a/src/main/proto/envoy/config/core/v3/backoff.proto b/src/main/proto/envoy/config/core/v3/backoff.proto deleted file mode 100644 index 435b361..0000000 --- a/src/main/proto/envoy/config/core/v3/backoff.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "BackoffProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Backoff strategy] - -// Configuration defining a jittered exponential back off strategy. -message BackoffStrategy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.BackoffStrategy"; - - // The base interval to be used for the next back off computation. It should - // be greater than zero and less than or equal to :ref:`max_interval - // `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; - - // Specifies the maximum interval between retries. This parameter is optional, - // but must be greater than or equal to the :ref:`base_interval - // ` if set. The default - // is 10 times the :ref:`base_interval - // `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; -} diff --git a/src/main/proto/envoy/config/core/v3/base.proto b/src/main/proto/envoy/config/core/v3/base.proto deleted file mode 100644 index 978f365..0000000 --- a/src/main/proto/envoy/config/core/v3/base.proto +++ /dev/null @@ -1,662 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/backoff.proto"; -import "envoy/config/core/v3/http_uri.proto"; -import "envoy/type/v3/percent.proto"; -import "envoy/type/v3/semantic_version.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/context_params.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "BaseProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common types] - -// Envoy supports :ref:`upstream priority routing -// ` both at the route and the virtual -// cluster level. The current priority implementation uses different connection -// pool and circuit breaking settings for each priority level. This means that -// even for HTTP/2 requests, two physical connections will be used to an -// upstream host. In the future Envoy will likely support true HTTP/2 priority -// over a single upstream connection. -enum RoutingPriority { - DEFAULT = 0; - HIGH = 1; -} - -// HTTP request method. -enum RequestMethod { - METHOD_UNSPECIFIED = 0; - GET = 1; - HEAD = 2; - POST = 3; - PUT = 4; - DELETE = 5; - CONNECT = 6; - OPTIONS = 7; - TRACE = 8; - PATCH = 9; -} - -// Identifies the direction of the traffic relative to the local Envoy. -enum TrafficDirection { - // Default option is unspecified. - UNSPECIFIED = 0; - - // The transport is used for incoming traffic. - INBOUND = 1; - - // The transport is used for outgoing traffic. - OUTBOUND = 2; -} - -// Identifies location of where either Envoy runs or where upstream hosts run. -message Locality { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Locality"; - - // Region this :ref:`zone ` belongs to. - string region = 1; - - // Defines the local service zone where Envoy is running. Though optional, it - // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, - // either in this message or via :option:`--service-zone`. The meaning of zone - // is context dependent, e.g. `Availability Zone (AZ) - // `_ - // on AWS, `Zone `_ on - // GCP, etc. - string zone = 2; - - // When used for locality of upstream hosts, this field further splits zone - // into smaller chunks of sub-zones so they can be load balanced - // independently. - string sub_zone = 3; -} - -// BuildVersion combines SemVer version of extension with free-form build information -// (i.e. 'alpha', 'private-build') as a set of strings. -message BuildVersion { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.BuildVersion"; - - // SemVer version of extension. - type.v3.SemanticVersion version = 1; - - // Free-form build information. - // Envoy defines several well known keys in the source/common/version/version.h file - google.protobuf.Struct metadata = 2; -} - -// Version and identification for an Envoy extension. -// [#next-free-field: 7] -message Extension { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Extension"; - - // This is the name of the Envoy filter as specified in the Envoy - // configuration, e.g. envoy.filters.http.router, com.acme.widget. - string name = 1; - - // Category of the extension. - // Extension category names use reverse DNS notation. For instance "envoy.filters.listener" - // for Envoy's built-in listener filters or "com.acme.filters.http" for HTTP filters from - // acme.com vendor. - // [#comment:TODO(yanavlasov): Link to the doc with existing envoy category names.] - string category = 2; - - // [#not-implemented-hide:] Type descriptor of extension configuration proto. - // [#comment:TODO(yanavlasov): Link to the doc with existing configuration protos.] - // [#comment:TODO(yanavlasov): Add tests when PR #9391 lands.] - string type_descriptor = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The version is a property of the extension and maintained independently - // of other extensions and the Envoy API. - // This field is not set when extension did not provide version information. - BuildVersion version = 4; - - // Indicates that the extension is present but was disabled via dynamic configuration. - bool disabled = 5; - - // Type URLs of extension configuration protos. - repeated string type_urls = 6; -} - -// Identifies a specific Envoy instance. The node identifier is presented to the -// management server, which may use this identifier to distinguish per Envoy -// configuration for serving. -// [#next-free-field: 13] -message Node { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Node"; - - reserved 5; - - reserved "build_version"; - - // An opaque node identifier for the Envoy node. This also provides the local - // service node name. It should be set if any of the following features are - // used: :ref:`statsd `, :ref:`CDS - // `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-node`. - string id = 1; - - // Defines the local service cluster name where Envoy is running. Though - // optional, it should be set if any of the following features are used: - // :ref:`statsd `, :ref:`health check cluster - // verification - // `, - // :ref:`runtime override directory `, - // :ref:`user agent addition - // `, - // :ref:`HTTP global rate limiting `, - // :ref:`CDS `, and :ref:`HTTP tracing - // `, either in this message or via - // :option:`--service-cluster`. - string cluster = 2; - - // Opaque metadata extending the node identifier. Envoy will pass this - // directly to the management server. - google.protobuf.Struct metadata = 3; - - // Map from xDS resource type URL to dynamic context parameters. These may vary at runtime (unlike - // other fields in this message). For example, the xDS client may have a shard identifier that - // changes during the lifetime of the xDS client. In Envoy, this would be achieved by updating the - // dynamic context on the Server::Instance's LocalInfo context provider. The shard ID dynamic - // parameter then appears in this field during future discovery requests. - map dynamic_parameters = 12; - - // Locality specifying where the Envoy instance is running. - Locality locality = 4; - - // Free-form string that identifies the entity requesting config. - // E.g. "envoy" or "grpc" - string user_agent_name = 6; - - oneof user_agent_version_type { - // Free-form string that identifies the version of the entity requesting config. - // E.g. "1.12.2" or "abcd1234", or "SpecialEnvoyBuild" - string user_agent_version = 7; - - // Structured version of the entity requesting config. - BuildVersion user_agent_build_version = 8; - } - - // List of extensions and their versions supported by the node. - repeated Extension extensions = 9; - - // Client feature support list. These are well known features described - // in the Envoy API repository for a given major version of an API. Client features - // use reverse DNS naming scheme, for example ``com.acme.feature``. - // See :ref:`the list of features ` that xDS client may - // support. - repeated string client_features = 10; - - // Known listening ports on the node as a generic hint to the management server - // for filtering :ref:`listeners ` to be returned. For example, - // if there is a listener bound to port 80, the list can optionally contain the - // SocketAddress ``(0.0.0.0,80)``. The field is optional and just a hint. - repeated Address listening_addresses = 11 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; -} - -// Metadata provides additional inputs to filters based on matched listeners, -// filter chains, routes and endpoints. It is structured as a map, usually from -// filter name (in reverse DNS format) to metadata specific to the filter. Metadata -// key-values for a filter are merged as connection and request handling occurs, -// with later values for the same key overriding earlier values. -// -// An example use of metadata is providing additional values to -// http_connection_manager in the envoy.http_connection_manager.access_log -// namespace. -// -// Another example use of metadata is to per service config info in cluster metadata, which may get -// consumed by multiple filters. -// -// For load balancing, Metadata provides a means to subset cluster endpoints. -// Endpoints have a Metadata object associated and routes contain a Metadata -// object to match against. There are some well defined metadata used today for -// this purpose: -// -// * ``{"envoy.lb": {"canary": }}`` This indicates the canary status of an -// endpoint and is also used during header processing -// (x-envoy-upstream-canary) and for stats purposes. -// [#next-major-version: move to type/metadata/v2] -message Metadata { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.Metadata"; - - // Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*`` - // namespace is reserved for Envoy's built-in filters. - // If both ``filter_metadata`` and - // :ref:`typed_filter_metadata ` - // fields are present in the metadata with same keys, - // only ``typed_filter_metadata`` field will be parsed. - map filter_metadata = 1 - [(validate.rules).map = {keys {string {min_len: 1}}}]; - - // Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*`` - // namespace is reserved for Envoy's built-in filters. - // The value is encoded as google.protobuf.Any. - // If both :ref:`filter_metadata ` - // and ``typed_filter_metadata`` fields are present in the metadata with same keys, - // only ``typed_filter_metadata`` field will be parsed. - map typed_filter_metadata = 2 - [(validate.rules).map = {keys {string {min_len: 1}}}]; -} - -// Runtime derived uint32 with a default when not specified. -message RuntimeUInt32 { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.RuntimeUInt32"; - - // Default value if runtime value is not available. - uint32 default_value = 2; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 3; -} - -// Runtime derived percentage with a default when not specified. -message RuntimePercent { - // Default value if runtime value is not available. - type.v3.Percent default_value = 1; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 2; -} - -// Runtime derived double with a default when not specified. -message RuntimeDouble { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.RuntimeDouble"; - - // Default value if runtime value is not available. - double default_value = 1; - - // Runtime key to get value for comparison. This value is used if defined. - string runtime_key = 2; -} - -// Runtime derived bool with a default when not specified. -message RuntimeFeatureFlag { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.RuntimeFeatureFlag"; - - // Default value if runtime value is not available. - google.protobuf.BoolValue default_value = 1 [(validate.rules).message = {required: true}]; - - // Runtime key to get value for comparison. This value is used if defined. The boolean value must - // be represented via its - // `canonical JSON encoding `_. - string runtime_key = 2; -} - -// Please use :ref:`KeyValuePair ` instead. -// [#not-implemented-hide:] -message KeyValue { - // The key of the key/value pair. - string key = 1 [ - deprecated = true, - (validate.rules).string = {min_len: 1 max_bytes: 16384}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // The value of the key/value pair. - // - // The ``bytes`` type is used. This means if JSON or YAML is used to to represent the - // configuration, the value must be base64 encoded. This is unfriendly for users in most - // use scenarios of this message. - // - bytes value = 2 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; -} - -message KeyValuePair { - // The key of the key/value pair. - string key = 1 [(validate.rules).string = {min_len: 1 max_bytes: 16384}]; - - // The value of the key/value pair. - google.protobuf.Value value = 2; -} - -// Key/value pair plus option to control append behavior. This is used to specify -// key/value pairs that should be appended to a set of existing key/value pairs. -message KeyValueAppend { - // Describes the supported actions types for key/value pair append action. - enum KeyValueAppendAction { - // If the key already exists, this action will result in the following behavior: - // - // - Comma-concatenated value if multiple values are not allowed. - // - New value added to the list of values if multiple values are allowed. - // - // If the key doesn't exist then this will add pair with specified key and value. - APPEND_IF_EXISTS_OR_ADD = 0; - - // This action will add the key/value pair if it doesn't already exist. If the - // key already exists then this will be a no-op. - ADD_IF_ABSENT = 1; - - // This action will overwrite the specified value by discarding any existing - // values if the key already exists. If the key doesn't exist then this will add - // the pair with specified key and value. - OVERWRITE_IF_EXISTS_OR_ADD = 2; - - // This action will overwrite the specified value by discarding any existing - // values if the key already exists. If the key doesn't exist then this will - // be no-op. - OVERWRITE_IF_EXISTS = 3; - } - - // The single key/value pair record to be appended or overridden. This field must be set. - KeyValuePair record = 3; - - // Key/value pair entry that this option to append or overwrite. This field is deprecated - // and please use :ref:`record ` - // as replacement. - // [#not-implemented-hide:] - KeyValue entry = 1 [ - deprecated = true, - (validate.rules).message = {skip: true}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // Describes the action taken to append/overwrite the given value for an existing - // key or to only add this key if it's absent. - KeyValueAppendAction action = 2 [(validate.rules).enum = {defined_only: true}]; -} - -// Key/value pair to append or remove. -message KeyValueMutation { - // Key/value pair to append or overwrite. Only one of ``append`` or ``remove`` can be set or - // the configuration will be rejected. - KeyValueAppend append = 1; - - // Key to remove. Only one of ``append`` or ``remove`` can be set or the configuration will be - // rejected. - string remove = 2 [(validate.rules).string = {max_bytes: 16384}]; -} - -// Query parameter name/value pair. -message QueryParameter { - // The key of the query parameter. Case sensitive. - string key = 1 [(validate.rules).string = {min_len: 1}]; - - // The value of the query parameter. - string value = 2; -} - -// Header name/value pair. -message HeaderValue { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HeaderValue"; - - // Header name. - string key = 1 - [(validate.rules).string = - {min_len: 1 max_bytes: 16384 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Header value. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown header values are replaced with the empty string instead of ``-``. - // Header value is encoded as string. This does not work for non-utf8 characters. - // Only one of ``value`` or ``raw_value`` can be set. - string value = 2 [ - (validate.rules).string = {max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false}, - (udpa.annotations.field_migrate).oneof_promotion = "value_type" - ]; - - // Header value is encoded as bytes which can support non-utf8 characters. - // Only one of ``value`` or ``raw_value`` can be set. - bytes raw_value = 3 [ - (validate.rules).bytes = {min_len: 0 max_len: 16384}, - (udpa.annotations.field_migrate).oneof_promotion = "value_type" - ]; -} - -// Header name/value pair plus option to control append behavior. -message HeaderValueOption { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HeaderValueOption"; - - // Describes the supported actions types for header append action. - enum HeaderAppendAction { - // If the header already exists, this action will result in: - // - // - Comma-concatenated for predefined inline headers. - // - Duplicate header added in the ``HeaderMap`` for other headers. - // - // If the header doesn't exist then this will add new header with specified key and value. - APPEND_IF_EXISTS_OR_ADD = 0; - - // This action will add the header if it doesn't already exist. If the header - // already exists then this will be a no-op. - ADD_IF_ABSENT = 1; - - // This action will overwrite the specified value by discarding any existing values if - // the header already exists. If the header doesn't exist then this will add the header - // with specified key and value. - OVERWRITE_IF_EXISTS_OR_ADD = 2; - - // This action will overwrite the specified value by discarding any existing values if - // the header already exists. If the header doesn't exist then this will be no-op. - OVERWRITE_IF_EXISTS = 3; - } - - // Header name/value pair that this option applies to. - HeaderValue header = 1 [(validate.rules).message = {required: true}]; - - // Should the value be appended? If true (default), the value is appended to - // existing values. Otherwise it replaces any existing values. - // This field is deprecated and please use - // :ref:`append_action ` as replacement. - // - // .. note:: - // The :ref:`external authorization service ` and - // :ref:`external processor service ` have - // default value (``false``) for this field. - google.protobuf.BoolValue append = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Describes the action taken to append/overwrite the given value for an existing header - // or to only add this header if it's absent. - // Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD - // `. - HeaderAppendAction append_action = 3 [(validate.rules).enum = {defined_only: true}]; - - // Is the header value allowed to be empty? If false (default), custom headers with empty values are dropped, - // otherwise they are added. - bool keep_empty_value = 4; -} - -// Wrapper for a set of headers. -message HeaderMap { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HeaderMap"; - - // A list of header names and their values. - repeated HeaderValue headers = 1; -} - -// A directory that is watched for changes, e.g. by inotify on Linux. Move/rename -// events inside this directory trigger the watch. -message WatchedDirectory { - // Directory path to watch. - string path = 1 [(validate.rules).string = {min_len: 1}]; -} - -// Data source consisting of a file, an inline value, or an environment variable. -// [#next-free-field: 6] -message DataSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.DataSource"; - - oneof specifier { - option (validate.required) = true; - - // Local filesystem data source. - string filename = 1 [(validate.rules).string = {min_len: 1}]; - - // Bytes inlined in the configuration. - bytes inline_bytes = 2; - - // String inlined in the configuration. - string inline_string = 3; - - // Environment variable data source. - string environment_variable = 4 [(validate.rules).string = {min_len: 1}]; - } - - // Watched directory that is watched for file changes. If this is set explicitly, the file - // specified in the ``filename`` field will be reloaded when relevant file move events occur. - // - // .. note:: - // This field only makes sense when the ``filename`` field is set. - // - // .. note:: - // Envoy only updates when the file is replaced by a file move, and not when the file is - // edited in place. - // - // .. note:: - // Not all use cases of ``DataSource`` support watching directories. It depends on the - // specific usage of the ``DataSource``. See the documentation of the parent message for - // details. - WatchedDirectory watched_directory = 5; -} - -// The message specifies the retry policy of remote data source when fetching fails. -// [#next-free-field: 7] -message RetryPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.RetryPolicy"; - - // See :ref:`RetryPriority `. - message RetryPriority { - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - google.protobuf.Any typed_config = 2; - } - } - - // See :ref:`RetryHostPredicate `. - message RetryHostPredicate { - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - google.protobuf.Any typed_config = 2; - } - } - - // Specifies parameters that control :ref:`retry backoff strategy `. - // This parameter is optional, in which case the default base interval is 1000 milliseconds. The - // default maximum interval is 10 times the base interval. - BackoffStrategy retry_back_off = 1; - - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. - google.protobuf.UInt32Value num_retries = 2 - [(udpa.annotations.field_migrate).rename = "max_retries"]; - - // For details, see :ref:`retry_on `. - string retry_on = 3; - - // For details, see :ref:`retry_priority `. - RetryPriority retry_priority = 4; - - // For details, see :ref:`RetryHostPredicate `. - repeated RetryHostPredicate retry_host_predicate = 5; - - // For details, see :ref:`host_selection_retry_max_attempts `. - int64 host_selection_retry_max_attempts = 6; -} - -// The message specifies how to fetch data from remote and how to verify it. -message RemoteDataSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.RemoteDataSource"; - - // The HTTP URI to fetch the remote data. - HttpUri http_uri = 1 [(validate.rules).message = {required: true}]; - - // SHA256 string for verifying data. - string sha256 = 2 [(validate.rules).string = {min_len: 1}]; - - // Retry policy for fetching remote data. - RetryPolicy retry_policy = 3; -} - -// Async data source which support async data fetch. -message AsyncDataSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.AsyncDataSource"; - - oneof specifier { - option (validate.required) = true; - - // Local async data source. - DataSource local = 1; - - // Remote async data source. - RemoteDataSource remote = 2; - } -} - -// Configuration for transport socket in :ref:`listeners ` and -// :ref:`clusters `. If the configuration is -// empty, a default transport socket implementation and configuration will be -// chosen based on the platform and existence of tls_context. -message TransportSocket { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.TransportSocket"; - - reserved 2; - - reserved "config"; - - // The name of the transport socket to instantiate. The name must match a supported transport - // socket implementation. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Implementation specific configuration which depends on the implementation being instantiated. - // See the supported transport socket implementations for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// Runtime derived FractionalPercent with defaults for when the numerator or denominator is not -// specified via a runtime key. -// -// .. note:: -// -// Parsing of the runtime key's data is implemented such that it may be represented as a -// :ref:`FractionalPercent ` proto represented as JSON/YAML -// and may also be represented as an integer with the assumption that the value is an integral -// percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse -// as a ``FractionalPercent`` whose numerator is 42 and denominator is HUNDRED. -message RuntimeFractionalPercent { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.RuntimeFractionalPercent"; - - // Default value if the runtime value's for the numerator/denominator keys are not available. - type.v3.FractionalPercent default_value = 1 [(validate.rules).message = {required: true}]; - - // Runtime key for a YAML representation of a FractionalPercent. - string runtime_key = 2; -} - -// Identifies a specific ControlPlane instance that Envoy is connected to. -message ControlPlane { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ControlPlane"; - - // An opaque control plane identifier that uniquely identifies an instance - // of control plane. This can be used to identify which control plane instance, - // the Envoy is connected to. - string identifier = 1; -} diff --git a/src/main/proto/envoy/config/core/v3/cel.proto b/src/main/proto/envoy/config/core/v3/cel.proto deleted file mode 100644 index 940a66d..0000000 --- a/src/main/proto/envoy/config/core/v3/cel.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: CEL Expression Configuration] - -// CEL expression evaluation configuration. -// These options control the behavior of the Common Expression Language runtime for -// individual CEL expressions. -message CelExpressionConfig { - // Enable string conversion functions for CEL expressions. When enabled, CEL expressions - // can convert values to strings using the ``string()`` function. - // - // .. attention:: - // - // This option is disabled by default to avoid unbounded memory allocation. - // CEL evaluation cost is typically bounded by the expression size, but converting - // arbitrary values (e.g., large messages, lists, or maps) to strings may allocate - // memory proportional to input data size, which can be unbounded and lead to - // memory exhaustion. - bool enable_string_conversion = 1; - - // Enable string concatenation for CEL expressions. When enabled, CEL expressions - // can concatenate strings using the ``+`` operator. - // - // .. attention:: - // - // This option is disabled by default to avoid unbounded memory allocation. - // While CEL normally bounds evaluation by expression size, enabling string - // concatenation allows building outputs whose size depends on input data, - // potentially causing large intermediate allocations and memory exhaustion. - bool enable_string_concat = 2; - - // Enable string manipulation functions for CEL expressions. When enabled, CEL - // expressions can use additional string functions: - // - // * ``replace(old, new)`` - Replaces all occurrences of ``old`` with ``new``. - // * ``split(separator)`` - Splits a string into a list of substrings. - // * ``lowerAscii()`` - Converts ASCII characters to lowercase. - // * ``upperAscii()`` - Converts ASCII characters to uppercase. - // - // .. note:: - // - // Standard CEL string functions like ``contains()``, ``startsWith()``, and - // ``endsWith()`` are always available regardless of this setting. - // - // .. attention:: - // - // This option is disabled by default to avoid unbounded memory allocation. - // Although CEL generally bounds evaluation by expression size, functions such as - // ``replace``, ``split``, ``lowerAscii()``, and ``upperAscii()`` can allocate memory - // proportional to input data size. Under adversarial inputs this can lead to - // unbounded allocations and memory exhaustion. - bool enable_string_functions = 3; -} diff --git a/src/main/proto/envoy/config/core/v3/config_source.proto b/src/main/proto/envoy/config/core/v3/config_source.proto deleted file mode 100644 index 430562a..0000000 --- a/src/main/proto/envoy/config/core/v3/config_source.proto +++ /dev/null @@ -1,283 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/authority.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "ConfigSourceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Configuration sources] - -// xDS API and non-xDS services version. This is used to describe both resource and transport -// protocol versions (in distinct configuration fields). -enum ApiVersion { - // When not specified, we assume v3; it is the only supported version. - AUTO = 0; - - // Use xDS v2 API. This is no longer supported. - V2 = 1 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; - - // Use xDS v3 API. - V3 = 2; -} - -// API configuration source. This identifies the API type and cluster that Envoy -// will use to fetch an xDS API. -// [#next-free-field: 10] -message ApiConfigSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ApiConfigSource"; - - // APIs may be fetched via either REST or gRPC. - enum ApiType { - // Ideally this would be 'reserved 0' but one can't reserve the default - // value. Instead we throw an exception if this is ever used. - DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 - [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // REST-JSON v2 API. The `canonical JSON encoding - // `_ for - // the v2 protos is used. - REST = 1; - - // SotW gRPC service. - GRPC = 2; - - // Using the delta xDS gRPC service, i.e. DeltaDiscovery{Request,Response} - // rather than Discovery{Request,Response}. Rather than sending Envoy the entire state - // with every update, the xDS server only sends what has changed since the last update. - DELTA_GRPC = 3; - - // SotW xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - AGGREGATED_GRPC = 5; - - // Delta xDS gRPC with ADS. All resources which resolve to this configuration source will be - // multiplexed on a single connection to an ADS endpoint. - // [#not-implemented-hide:] - AGGREGATED_DELTA_GRPC = 6; - } - - // API type (gRPC, REST, delta gRPC) - ApiType api_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - ApiVersion transport_api_version = 8 [(validate.rules).enum = {defined_only: true}]; - - // Cluster names should be used only with REST. If > 1 - // cluster is defined, clusters will be cycled through if any kind of failure - // occurs. - // - // .. note:: - // - // The cluster with name ``cluster_name`` must be statically defined and its - // type must not be ``EDS``. - repeated string cluster_names = 2; - - // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, - // services will be cycled through if any kind of failure occurs. - repeated GrpcService grpc_services = 4; - - // For REST APIs, the delay between successive polls. - google.protobuf.Duration refresh_delay = 3; - - // For REST APIs, the request timeout. If not set, a default value of 1s will be used. - google.protobuf.Duration request_timeout = 5 [(validate.rules).duration = {gt {}}]; - - // For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be - // rate limited. - RateLimitSettings rate_limit_settings = 6; - - // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. - bool set_node_on_first_message_only = 7; - - // A list of config validators that will be executed when a new update is - // received from the ApiConfigSource. Note that each validator handles a - // specific xDS service type, and only the validators corresponding to the - // type url (in ``:ref: DiscoveryResponse`` or ``:ref: DeltaDiscoveryResponse``) - // will be invoked. - // If the validator returns false or throws an exception, the config will be rejected by - // the client, and a NACK will be sent. - // [#extension-category: envoy.config.validators] - repeated TypedExtensionConfig config_validators = 9; -} - -// Aggregated Discovery Service (ADS) options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that ADS is to be used. -message AggregatedConfigSource { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.AggregatedConfigSource"; -} - -// [#not-implemented-hide:] -// Self-referencing config source options. This is currently empty, but when -// set in :ref:`ConfigSource ` can be used to -// specify that other data can be obtained from the same server. -message SelfConfigSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SelfConfigSource"; - - // API version for xDS transport protocol. This describes the xDS gRPC/REST - // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. - ApiVersion transport_api_version = 1 [(validate.rules).enum = {defined_only: true}]; -} - -// Rate Limit settings to be applied for discovery requests made by Envoy. -message RateLimitSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.RateLimitSettings"; - - // Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a - // default value of 100 will be used. - google.protobuf.UInt32Value max_tokens = 1; - - // Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens - // per second will be used. The minimal fill rate is once per year. Lower - // fill rates will be set to once per year. - google.protobuf.DoubleValue fill_rate = 2 [(validate.rules).double = {gt: 0.0}]; -} - -// Local filesystem path configuration source. -message PathConfigSource { - // Path on the filesystem to source and watch for configuration updates. - // When sourcing configuration for a :ref:`secret `, - // the certificate and key files are also watched for updates. - // - // .. note:: - // - // The path to the source must exist at config load time. - // - // .. note:: - // - // If ``watched_directory`` is *not* configured, Envoy will watch the file path for *moves*. - // This is because in general only moves are atomic. The same method of swapping files as is - // demonstrated in the :ref:`runtime documentation ` can be - // used here also. If ``watched_directory`` is configured, no watch will be placed directly on - // this path. Instead, the configured ``watched_directory`` will be used to trigger reloads of - // this path. This is required in certain deployment scenarios. See below for more information. - string path = 1 [(validate.rules).string = {min_len: 1}]; - - // If configured, this directory will be watched for *moves*. When an entry in this directory is - // moved to, the ``path`` will be reloaded. This is required in certain deployment scenarios. - // - // Specifically, if trying to load an xDS resource using a - // `Kubernetes ConfigMap `_, the - // following configuration might be used: - // 1. Store xds.yaml inside a ConfigMap. - // 2. Mount the ConfigMap to ``/config_map/xds`` - // 3. Configure path ``/config_map/xds/xds.yaml`` - // 4. Configure watched directory ``/config_map/xds`` - // - // The above configuration will ensure that Envoy watches the owning directory for moves which is - // required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. - WatchedDirectory watched_directory = 2; -} - -// Configuration for :ref:`listeners `, :ref:`clusters -// `, :ref:`routes -// `, :ref:`endpoints -// ` etc. may either be sourced from the -// filesystem or from an xDS API source. Filesystem configs are watched with -// inotify for updates. -// [#next-free-field: 9] -message ConfigSource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ConfigSource"; - - // Authorities that this config source may be used for. An authority specified in a xdstp:// URL - // is resolved to a ``ConfigSource`` prior to configuration fetch. This field provides the - // association between authority name and configuration source. - // [#not-implemented-hide:] - repeated xds.core.v3.Authority authorities = 7; - - oneof config_source_specifier { - option (validate.required) = true; - - // Deprecated in favor of ``path_config_source``. Use that field instead. - string path = 1 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Local filesystem path configuration source. - PathConfigSource path_config_source = 8; - - // API configuration source. - ApiConfigSource api_config_source = 2; - - // When set, ADS will be used to fetch resources. The ADS API configuration - // source in the bootstrap configuration is used. - AggregatedConfigSource ads = 3; - - // [#not-implemented-hide:] - // When set, the client will access the resources from the same server it got the - // ConfigSource from, although not necessarily from the same stream. This is similar to the - // :ref:`ads` field, except that the client may use a - // different stream to the same server. As a result, this field can be used for things - // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) - // LDS to RDS on the same server without requiring the management server to know its name - // or required credentials. - // [#next-major-version: In xDS v3, consider replacing the ads field with this one, since - // this field can implicitly mean to use the same stream in the case where the ConfigSource - // is provided via ADS and the specified data can also be obtained via ADS.] - SelfConfigSource self = 5; - } - - // When this timeout is specified, Envoy will wait no longer than the specified time for first - // config response on this xDS subscription during the :ref:`initialization process - // `. After reaching the timeout, Envoy will move to the next - // initialization phase, even if the first config is not delivered yet. The timer is activated - // when the xDS API subscription starts, and is disarmed on first config update or on error. 0 - // means no timeout - Envoy will wait indefinitely for the first xDS config (unless another - // timeout applies). The default is 15s. - google.protobuf.Duration initial_fetch_timeout = 4; - - // API version for xDS resources. This implies the type URLs that the client - // will request for resources and the resource type that the client will in - // turn expect to be delivered. - ApiVersion resource_api_version = 6 [(validate.rules).enum = {defined_only: true}]; -} - -// Configuration source specifier for a late-bound extension configuration. The -// parent resource is warmed until all the initial extension configurations are -// received, unless the flag to apply the default configuration is set. -// Subsequent extension updates are atomic on a per-worker basis. Once an -// extension configuration is applied to a request or a connection, it remains -// constant for the duration of processing. If the initial delivery of the -// extension configuration fails, due to a timeout for example, the optional -// default configuration is applied. Without a default configuration, the -// extension is disabled, until an extension configuration is received. The -// behavior of a disabled extension depends on the context. For example, a -// filter chain with a disabled extension filter rejects all incoming streams. -message ExtensionConfigSource { - ConfigSource config_source = 1 [(validate.rules).any = {required: true}]; - - // Optional default configuration to use as the initial configuration if - // there is a failure to receive the initial extension configuration or if - // ``apply_default_config_without_warming`` flag is set. - google.protobuf.Any default_config = 2; - - // Use the default config as the initial configuration without warming and - // waiting for the first discovery response. Requires the default configuration - // to be supplied. - bool apply_default_config_without_warming = 3; - - // A set of permitted extension type URLs for the type encoded inside of the - // :ref:`TypedExtensionConfig `. Extension - // configuration updates are rejected if they do not match any type URL in the set. - repeated string type_urls = 4 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/config/core/v3/event_service_config.proto b/src/main/proto/envoy/config/core/v3/event_service_config.proto deleted file mode 100644 index 68c8df4..0000000 --- a/src/main/proto/envoy/config/core/v3/event_service_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "EventServiceConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#not-implemented-hide:] -// Configuration of the event reporting service endpoint. -message EventServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.EventServiceConfig"; - - oneof config_source_specifier { - option (validate.required) = true; - - // Specifies the gRPC service that hosts the event reporting service. - GrpcService grpc_service = 1; - } -} diff --git a/src/main/proto/envoy/config/core/v3/extension.proto b/src/main/proto/envoy/config/core/v3/extension.proto deleted file mode 100644 index cacc7b0..0000000 --- a/src/main/proto/envoy/config/core/v3/extension.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "ExtensionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Extension configuration] - -// Message type for extension configuration. -// [#next-major-version: revisit all existing typed_config that doesn't use this wrapper.]. -message TypedExtensionConfig { - // The name of an extension. This is not used to select the extension, instead - // it serves the role of an opaque identifier. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is ``xds.type.v3.TypedStruct`` - // (or, for historical reasons, ``udpa.type.v1.TypedStruct``), the inner type - // URL of ``TypedStruct`` will be utilized. See the - // :ref:`extension configuration overview - // ` for further details. - google.protobuf.Any typed_config = 2 [(validate.rules).any = {required: true}]; -} diff --git a/src/main/proto/envoy/config/core/v3/grpc_method_list.proto b/src/main/proto/envoy/config/core/v3/grpc_method_list.proto deleted file mode 100644 index 8242b42..0000000 --- a/src/main/proto/envoy/config/core/v3/grpc_method_list.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "GrpcMethodListProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC method list] - -// A list of gRPC methods which can be used as an allowlist, for example. -message GrpcMethodList { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.GrpcMethodList"; - - message Service { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcMethodList.Service"; - - // The name of the gRPC service. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The names of the gRPC methods in this service. - repeated string method_names = 2 [(validate.rules).repeated = {min_items: 1}]; - } - - repeated Service services = 1; -} diff --git a/src/main/proto/envoy/config/core/v3/grpc_service.proto b/src/main/proto/envoy/config/core/v3/grpc_service.proto deleted file mode 100644 index 9c44006..0000000 --- a/src/main/proto/envoy/config/core/v3/grpc_service.proto +++ /dev/null @@ -1,355 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "GrpcServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC services] - -// gRPC service configuration. This is used by :ref:`ApiConfigSource -// ` and filter configurations. -// [#next-free-field: 7] -message GrpcService { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.GrpcService"; - - // [#next-free-field: 6] - message EnvoyGrpc { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.EnvoyGrpc"; - - // The name of the upstream gRPC cluster. SSL credentials will be supplied - // in the :ref:`Cluster ` :ref:`transport_socket - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The ``:authority`` header in the grpc request. If this field is not set, the authority header value will be ``cluster_name``. - // Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. - string authority = 2 - [(validate.rules).string = - {min_len: 0 max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Specifies the retry backoff policy for re-establishing long‑lived xDS gRPC streams. - // - // This field is optional. If ``retry_back_off.max_interval`` is not provided, it will be set to - // ten times the configured ``retry_back_off.base_interval``. - // - // .. note:: - // - // This field is only honored for management‑plane xDS gRPC streams created from - // :ref:`ApiConfigSource ` that use - // ``envoy_grpc``. Data‑plane gRPC clients (for example external authorization or external - // processing filters) must use :ref:`GrpcService.retry_policy - // ` instead. - // - // If not set, xDS gRPC streams default to a base interval of 500ms and a maximum interval of 30s. - RetryPolicy retry_policy = 3; - - // Maximum gRPC message size that is allowed to be received. - // If a message over this limit is received, the gRPC stream is terminated with the RESOURCE_EXHAUSTED error. - // This limit is applied to individual messages in the streaming response and not the total size of streaming response. - // Defaults to 0, which means unlimited. - google.protobuf.UInt32Value max_receive_message_length = 4; - - // This provides gRPC client level control over envoy generated headers. - // If false, the header will be sent but it can be overridden by per stream option. - // If true, the header will be removed and can not be overridden by per stream option. - // Default to false. - bool skip_envoy_headers = 5; - } - - // [#next-free-field: 11] - message GoogleGrpc { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc"; - - // See https://grpc.io/grpc/cpp/structgrpc_1_1_ssl_credentials_options.html. - message SslCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.SslCredentials"; - - // PEM encoded server root certificates. - DataSource root_certs = 1; - - // PEM encoded client private key. - DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; - - // PEM encoded client certificate chain. - DataSource cert_chain = 3; - } - - // Local channel credentials. Only UDS is supported for now. - // See https://github.com/grpc/grpc/pull/15909. - message GoogleLocalCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.GoogleLocalCredentials"; - } - - // See https://grpc.io/docs/guides/auth.html#credential-types to understand Channel and Call - // credential types. - message ChannelCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.ChannelCredentials"; - - oneof credential_specifier { - option (validate.required) = true; - - SslCredentials ssl_credentials = 1; - - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - google.protobuf.Empty google_default = 2; - - GoogleLocalCredentials local_credentials = 3; - } - } - - // [#next-free-field: 8] - message CallCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials"; - - message ServiceAccountJWTAccessCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials." - "ServiceAccountJWTAccessCredentials"; - - string json_key = 1; - - uint64 token_lifetime_seconds = 2; - } - - message GoogleIAMCredentials { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials"; - - string authorization_token = 1; - - string authority_selector = 2; - } - - message MetadataCredentialsFromPlugin { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials." - "MetadataCredentialsFromPlugin"; - - reserved 2; - - reserved "config"; - - string name = 1; - - // [#extension-category: envoy.grpc_credentials] - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - // Security token service configuration that allows Google gRPC to - // fetch security token from an OAuth 2.0 authorization server. - // See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and - // https://github.com/grpc/grpc/pull/19587. - // [#next-free-field: 10] - message StsService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.StsService"; - - // URI of the token exchange service that handles token exchange requests. - // [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - // https://github.com/bufbuild/protoc-gen-validate/issues/303] - string token_exchange_service_uri = 1; - - // Location of the target service or resource where the client - // intends to use the requested security token. - string resource = 2; - - // Logical name of the target service where the client intends to - // use the requested security token. - string audience = 3; - - // The desired scope of the requested security token in the - // context of the service or resource where the token will be used. - string scope = 4; - - // Type of the requested security token. - string requested_token_type = 5; - - // The path of subject token, a security token that represents the - // identity of the party on behalf of whom the request is being made. - string subject_token_path = 6 [(validate.rules).string = {min_len: 1}]; - - // Type of the subject token. - string subject_token_type = 7 [(validate.rules).string = {min_len: 1}]; - - // The path of actor token, a security token that represents the identity - // of the acting party. The acting party is authorized to use the - // requested security token and act on behalf of the subject. - string actor_token_path = 8; - - // Type of the actor token. - string actor_token_type = 9; - } - - oneof credential_specifier { - option (validate.required) = true; - - // Access token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#ad3a80da696ffdaea943f0f858d7a360d. - string access_token = 1; - - // Google Compute Engine credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a6beb3ac70ff94bd2ebbd89b8f21d1f61 - google.protobuf.Empty google_compute_engine = 2; - - // Google refresh token credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a96901c997b91bc6513b08491e0dca37c. - string google_refresh_token = 3; - - // Service Account JWT Access credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a92a9f959d6102461f66ee973d8e9d3aa. - ServiceAccountJWTAccessCredentials service_account_jwt_access = 4; - - // Google IAM credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a9fc1fc101b41e680d47028166e76f9d0. - GoogleIAMCredentials google_iam = 5; - - // Custom authenticator credentials. - // https://grpc.io/grpc/cpp/namespacegrpc.html#a823c6a4b19ffc71fb33e90154ee2ad07. - // https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms. - MetadataCredentialsFromPlugin from_plugin = 6; - - // Custom security token service which implements OAuth 2.0 token exchange. - // https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 - // See https://github.com/grpc/grpc/pull/19587. - StsService sts_service = 7; - } - } - - // Channel arguments. - message ChannelArgs { - message Value { - // Pointer values are not supported, since they don't make any sense when - // delivered via the API. - oneof value_specifier { - option (validate.required) = true; - - string string_value = 1; - - int64 int_value = 2; - } - } - - // See grpc_types.h GRPC_ARG #defines for keys that work here. - map args = 1; - } - - // The target URI when using the `Google C++ gRPC client - // `_. - string target_uri = 1 [(validate.rules).string = {min_len: 1}]; - - // The channel credentials to use. See `channel credentials - // `_. - // Ignored if ``channel_credentials_plugin`` is set. - ChannelCredentials channel_credentials = 2; - - // A list of channel credentials plugins. - // The data plane will iterate over the list in order and stop at the first credential type - // that it supports. This provides a mechanism for starting to use new credential types that - // are not yet supported by all data planes. - // [#not-implemented-hide:] - repeated google.protobuf.Any channel_credentials_plugin = 9; - - // The call credentials to use. See `channel credentials - // `_. - // Ignored if ``call_credentials_plugin`` is set. - repeated CallCredentials call_credentials = 3; - - // A list of call credentials plugins. All supported plugins will be used. - // Unsupported plugin types will be ignored. - // [#not-implemented-hide:] - repeated google.protobuf.Any call_credentials_plugin = 10; - - // The human readable prefix to use when emitting statistics for the gRPC - // service. - // - // .. csv-table:: - // :header: Name, Type, Description - // :widths: 1, 1, 2 - // - // streams_total, Counter, Total number of streams opened - // streams_closed_, Counter, Total streams closed with - string stat_prefix = 4 [(validate.rules).string = {min_len: 1}]; - - // The name of the Google gRPC credentials factory to use. This must have been registered with - // Envoy. If this is empty, a default credentials factory will be used that sets up channel - // credentials based on other configuration parameters. - string credentials_factory_name = 5; - - // Additional configuration for site-specific customizations of the Google - // gRPC library. - google.protobuf.Struct config = 6; - - // How many bytes each stream can buffer internally. - // If not set an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_stream_buffer_limit_bytes = 7; - - // Custom channels args. - ChannelArgs channel_args = 8; - } - - reserved 4; - - oneof target_specifier { - option (validate.required) = true; - - // Envoy's in-built gRPC client. - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - EnvoyGrpc envoy_grpc = 1; - - // `Google C++ gRPC client `_ - // See the :ref:`gRPC services overview ` - // documentation for discussion on gRPC client selection. - GoogleGrpc google_grpc = 2; - } - - // The timeout for the gRPC request. This is the timeout for a specific - // request. - google.protobuf.Duration timeout = 3; - - // Additional metadata to include in streams initiated to the GrpcService. This can be used for - // scenarios in which additional ad hoc authorization headers (e.g. ``x-foo-bar: baz-key``) are to - // be injected. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers - // `. - repeated HeaderValue initial_metadata = 5; - - // Optional default retry policy for RPCs or streams initiated toward this gRPC service. - // - // If an async stream does not have a retry policy configured in its per‑stream options, this - // policy is used as the default. - // - // .. note:: - // - // This field is only applied by Envoy gRPC (``envoy_grpc``) clients. Google gRPC - // (``google_grpc``) clients currently ignore this field. - // - // If not specified, no default retry policy is applied at the client level and retries only occur - // when explicitly configured in per‑stream options. - RetryPolicy retry_policy = 6; -} diff --git a/src/main/proto/envoy/config/core/v3/health_check.proto b/src/main/proto/envoy/config/core/v3/health_check.proto deleted file mode 100644 index a4ed6e9..0000000 --- a/src/main/proto/envoy/config/core/v3/health_check.proto +++ /dev/null @@ -1,443 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/event_service_config.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/proxy_protocol.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/http.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "HealthCheckProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Health check] -// * Health checking :ref:`architecture overview `. -// * If health checking is configured for a cluster, additional statistics are emitted. They are -// documented :ref:`here `. - -// Endpoint health status. -enum HealthStatus { - // The health status is not known. This is interpreted by Envoy as ``HEALTHY``. - UNKNOWN = 0; - - // Healthy. - HEALTHY = 1; - - // Unhealthy. - UNHEALTHY = 2; - - // Connection draining in progress. E.g., - // ``_ - // or - // ``_. - // This is interpreted by Envoy as ``UNHEALTHY``. - DRAINING = 3; - - // Health check timed out. This is part of HDS and is interpreted by Envoy as - // ``UNHEALTHY``. - TIMEOUT = 4; - - // Degraded. - DEGRADED = 5; -} - -message HealthStatusSet { - // An order-independent set of health status. - repeated HealthStatus statuses = 1 - [(validate.rules).repeated = {items {enum {defined_only: true}}}]; -} - -// [#next-free-field: 27] -message HealthCheck { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HealthCheck"; - - // Describes the encoding of the payload bytes in the payload. - message Payload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.Payload"; - - oneof payload { - option (validate.required) = true; - - // Hex encoded payload. E.g., "000000FF". - string text = 1 [(validate.rules).string = {min_len: 1}]; - - // Binary payload. - bytes binary = 2; - } - } - - // [#next-free-field: 15] - message HttpHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.HttpHealthCheck"; - - reserved 5, 7; - - reserved "service_name", "use_http2"; - - // The value of the host header in the HTTP health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. - string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE}]; - - // Specifies the HTTP path that will be requested during health checking. For example - // ``/healthcheck``. - string path = 2 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE}]; - - // HTTP specific payload to be sent as the request body during health checking. - // If specified, the method should support a request body (POST, PUT, PATCH, etc.). - Payload send = 3; - - // Specifies a list of HTTP expected responses to match in the first ``response_buffer_size`` bytes of the response body. - // If it is set, both the expected response check and status code determine the health check. - // When checking the response, “fuzzy” matching is performed such that each payload block must be found, - // and in the order specified, but not necessarily contiguous. - // - // .. note:: - // - // It is recommended to set ``response_buffer_size`` based on the total Payload size for efficiency. - // The default buffer size is 1024 bytes when it is not set. - repeated Payload receive = 4; - - // Specifies the size of response buffer in bytes that is used to Payload match. - // The default value is 1024. Setting to 0 implies that the Payload will be matched against the entire response. - google.protobuf.UInt64Value response_buffer_size = 14 [(validate.rules).uint64 = {gte: 0}]; - - // Specifies a list of HTTP headers that should be added to each request that is sent to the - // health checked cluster. For more information, including details on header value syntax, see - // the documentation on :ref:`custom request headers - // `. - repeated HeaderValueOption request_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request that is sent to the - // health checked cluster. - repeated string request_headers_to_remove = 8 [(validate.rules).repeated = { - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Specifies a list of HTTP response statuses considered healthy. If provided, replaces default - // 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open - // semantics of :ref:`Int64Range `. The start and end of each - // range are required. Only statuses in the range [100, 600) are allowed. - repeated type.v3.Int64Range expected_statuses = 9; - - // Specifies a list of HTTP response statuses considered retriable. If provided, responses in this range - // will count towards the configured :ref:`unhealthy_threshold `, - // but will not result in the host being considered immediately unhealthy. Ranges follow half-open semantics of - // :ref:`Int64Range `. The start and end of each range are required. - // Only statuses in the range [100, 600) are allowed. The :ref:`expected_statuses ` - // field takes precedence for any range overlaps with this field i.e. if status code 200 is both retriable and expected, a 200 response will - // be considered a successful health check. By default all responses not in - // :ref:`expected_statuses ` will result in - // the host being considered immediately unhealthy i.e. if status code 200 is expected and there are no configured retriable statuses, any - // non-200 response will result in the host being marked unhealthy. - repeated type.v3.Int64Range retriable_statuses = 12; - - // Use specified application protocol for health checks. - type.v3.CodecClientType codec_client_type = 10 [(validate.rules).enum = {defined_only: true}]; - - // An optional service name parameter which is used to validate the identity of - // the health checked cluster using a :ref:`StringMatcher - // `. See the :ref:`architecture overview - // ` for more information. - type.matcher.v3.StringMatcher service_name_matcher = 11; - - // HTTP Method that will be used for health checking, default is "GET". - // GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, PATCH methods are supported. - // Request body payloads are supported for POST, PUT, PATCH, and OPTIONS methods only. - // CONNECT method is disallowed because it is not appropriate for health check request. - // If a non-200 response is expected by the method, it needs to be set in :ref:`expected_statuses `. - RequestMethod method = 13 [(validate.rules).enum = {defined_only: true not_in: 6}]; - } - - message TcpHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.TcpHealthCheck"; - - // Empty payloads imply a connect-only health check. - Payload send = 1; - - // When checking the response, “fuzzy” matching is performed such that each - // payload block must be found, and in the order specified, but not - // necessarily contiguous. - repeated Payload receive = 2; - - // When setting this value, it tries to attempt health check request with ProxyProtocol. - // When ``send`` is presented, they are sent after preceding ProxyProtocol header. - // Only ProxyProtocol header is sent when ``send`` is not presented. - // It allows to use both ProxyProtocol V1 and V2. In V1, it presents L3/L4. In V2, it includes - // LOCAL command and doesn't include L3/L4. - ProxyProtocolConfig proxy_protocol_config = 3; - } - - message RedisHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.RedisHealthCheck"; - - // If set, optionally perform ``EXISTS `` instead of ``PING``. A return value - // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other - // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance - // by setting the specified key to any value and waiting for traffic to drain. - string key = 1; - } - - // `grpc.health.v1.Health - // `_-based - // healthcheck. See `gRPC doc `_ - // for details. - message GrpcHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.GrpcHealthCheck"; - - // An optional service name parameter which will be sent to gRPC service in - // `grpc.health.v1.HealthCheckRequest - // `_. - // message. See `gRPC health-checking overview - // `_ for more information. - string service_name = 1; - - // The value of the :authority header in the gRPC health check request. If - // left empty (default value), the name of the cluster this health check is associated - // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. - string authority = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Specifies a list of key-value pairs that should be added to the metadata of each GRPC call - // that is sent to the health checked cluster. For more information, including details on header value syntax, - // see the documentation on :ref:`custom request headers - // `. - repeated HeaderValueOption initial_metadata = 3 [(validate.rules).repeated = {max_items: 1000}]; - } - - // Custom health check. - message CustomHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.CustomHealthCheck"; - - reserved 2; - - reserved "config"; - - // The registered name of the custom health checker. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A custom health checker specific configuration which depends on the custom health checker - // being instantiated. See :api:`envoy/config/health_checker` for reference. - // [#extension-category: envoy.health_checkers] - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - // Health checks occur over the transport socket specified for the cluster. This implies that if a - // cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. - // - // This allows overriding the cluster TLS settings, just for health check connections. - message TlsOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HealthCheck.TlsOptions"; - - // Specifies the ALPN protocols for health check connections. This is useful if the - // corresponding upstream is using ALPN-based :ref:`FilterChainMatch - // ` along with different protocols for health checks - // versus data connections. If empty, no ALPN protocols will be set on health check connections. - repeated string alpn_protocols = 1; - } - - reserved 10; - - // The time to wait for a health check response. If the timeout is reached the - // health check attempt will be considered a failure. - google.protobuf.Duration timeout = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // The interval between health checks. - google.protobuf.Duration interval = 2 [(validate.rules).duration = { - required: true - gt {} - }]; - - // An optional jitter amount in milliseconds. If specified, Envoy will start health - // checking after for a random time in ms between 0 and initial_jitter. This only - // applies to the first health check. - google.protobuf.Duration initial_jitter = 20; - - // An optional jitter amount in milliseconds. If specified, during every - // interval Envoy will add interval_jitter to the wait time. - google.protobuf.Duration interval_jitter = 3; - - // An optional jitter amount as a percentage of interval_ms. If specified, - // during every interval Envoy will add ``interval_ms`` * - // ``interval_jitter_percent`` / 100 to the wait time. - // - // If interval_jitter_ms and interval_jitter_percent are both set, both of - // them will be used to increase the wait time. - uint32 interval_jitter_percent = 18; - - // The number of unhealthy health checks required before a host is marked - // unhealthy. Note that for ``http`` health checking if a host responds with a code not in - // :ref:`expected_statuses ` - // or :ref:`retriable_statuses `, - // this threshold is ignored and the host is considered immediately unhealthy. - google.protobuf.UInt32Value unhealthy_threshold = 4 [(validate.rules).message = {required: true}]; - - // The number of healthy health checks required before a host is marked - // healthy. Note that during startup, only a single successful health check is - // required to mark a host healthy. - google.protobuf.UInt32Value healthy_threshold = 5 [(validate.rules).message = {required: true}]; - - // [#not-implemented-hide:] Non-serving port for health checking. - google.protobuf.UInt32Value alt_port = 6; - - // Reuse health check connection between health checks. Default is true. - google.protobuf.BoolValue reuse_connection = 7; - - oneof health_checker { - option (validate.required) = true; - - // HTTP health check. - HttpHealthCheck http_health_check = 8; - - // TCP health check. - TcpHealthCheck tcp_health_check = 9; - - // gRPC health check. - GrpcHealthCheck grpc_health_check = 11; - - // Custom health check. - CustomHealthCheck custom_health_check = 13; - } - - // The "no traffic interval" is a special health check interval that is used when a cluster has - // never had traffic routed to it. This lower interval allows cluster information to be kept up to - // date, without sending a potentially large amount of active health checking traffic for no - // reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. Note that this interval takes precedence over - // any other. - // - // The default value for "no traffic interval" is 60 seconds. - google.protobuf.Duration no_traffic_interval = 12 [(validate.rules).duration = {gt {}}]; - - // The "no traffic healthy interval" is a special health check interval that - // is used for hosts that are currently passing active health checking - // (including new hosts) when the cluster has received no traffic. - // - // This is useful for when we want to send frequent health checks with - // ``no_traffic_interval`` but then revert to lower frequency ``no_traffic_healthy_interval`` once - // a host in the cluster is marked as healthy. - // - // Once a cluster has been used for traffic routing, Envoy will shift back to using the - // standard health check interval that is defined. - // - // If no_traffic_healthy_interval is not set, it will default to the - // no traffic interval and send that interval regardless of health state. - google.protobuf.Duration no_traffic_healthy_interval = 24 [(validate.rules).duration = {gt {}}]; - - // The "unhealthy interval" is a health check interval that is used for hosts that are marked as - // unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the - // standard health check interval that is defined. - // - // The default value for "unhealthy interval" is the same as "interval". - google.protobuf.Duration unhealthy_interval = 14 [(validate.rules).duration = {gt {}}]; - - // The "unhealthy edge interval" is a special health check interval that is used for the first - // health check right after a host is marked as unhealthy. For subsequent health checks - // Envoy will shift back to using either "unhealthy interval" if present or the standard health - // check interval that is defined. - // - // The default value for "unhealthy edge interval" is the same as "unhealthy interval". - google.protobuf.Duration unhealthy_edge_interval = 15 [(validate.rules).duration = {gt {}}]; - - // The "healthy edge interval" is a special health check interval that is used for the first - // health check right after a host is marked as healthy. For subsequent health checks - // Envoy will shift back to using the standard health check interval that is defined. - // - // The default value for "healthy edge interval" is the same as the default interval. - google.protobuf.Duration healthy_edge_interval = 16 [(validate.rules).duration = {gt {}}]; - - // Specifies the path to the :ref:`health check event log `. - // - // .. attention:: - // This field is deprecated in favor of the extension - // :ref:`event_logger ` and - // :ref:`event_log_path ` - // in the file sink extension. - string event_log_path = 17 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // A list of event log sinks to process the health check event. - // [#extension-category: envoy.health_check.event_sinks] - repeated TypedExtensionConfig event_logger = 25; - - // [#not-implemented-hide:] - // The gRPC service for the health check event service. - // If empty, health check events won't be sent to a remote endpoint. - EventServiceConfig event_service = 22; - - // If set to true, health check failure events will always be logged. If set to false, only the - // initial health check failure event will be logged. - // The default value is false. - bool always_log_health_check_failures = 19; - - // If set to true, health check success events will always be logged. If set to false, only host addition event will be logged - // if it is the first successful health check, or if the healthy threshold is reached. - // The default value is false. - bool always_log_health_check_success = 26; - - // This allows overriding the cluster TLS settings, just for health check connections. - TlsOptions tls_options = 21; - - // Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's - // :ref:`tranport socket matches `. - // For example, the following match criteria - // - // .. code-block:: yaml - // - // transport_socket_match_criteria: - // useMTLS: true - // - // Will match the following :ref:`cluster socket match ` - // - // .. code-block:: yaml - // - // transport_socket_matches: - // - name: "useMTLS" - // match: - // useMTLS: true - // transport_socket: - // name: envoy.transport_sockets.tls - // config: { ... } # tls socket configuration - // - // If this field is set, then for health checks it will supersede an entry of ``envoy.transport_socket`` in the - // :ref:`LbEndpoint.Metadata `. - // This allows using different transport socket capabilities for health checking versus proxying to the - // endpoint. - // - // If the key/values pairs specified do not match any - // :ref:`transport socket matches `, - // the cluster's :ref:`transport socket ` - // will be used for health check socket configuration. - google.protobuf.Struct transport_socket_match_criteria = 23; -} diff --git a/src/main/proto/envoy/config/core/v3/http_service.proto b/src/main/proto/envoy/config/core/v3/http_service.proto deleted file mode 100644 index 426994c..0000000 --- a/src/main/proto/envoy/config/core/v3/http_service.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/http_uri.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "HttpServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP services] - -// HTTP service configuration. -message HttpService { - // The service's HTTP URI. For example: - // - // .. code-block:: yaml - // - // http_uri: - // uri: https://www.myserviceapi.com/v1/data - // cluster: www.myserviceapi.com|443 - // - HttpUri http_uri = 1; - - // Specifies a list of HTTP headers that should be added to each request - // handled by this virtual host. - repeated HeaderValueOption request_headers_to_add = 2 - [(validate.rules).repeated = {max_items: 1000}]; -} diff --git a/src/main/proto/envoy/config/core/v3/http_uri.proto b/src/main/proto/envoy/config/core/v3/http_uri.proto deleted file mode 100644 index bac37c0..0000000 --- a/src/main/proto/envoy/config/core/v3/http_uri.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "HttpUriProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP service URI ] - -// Envoy external URI descriptor -message HttpUri { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.HttpUri"; - - // The HTTP server URI. It should be a full FQDN with protocol, host and path. - // - // Example: - // - // .. code-block:: yaml - // - // uri: https://www.googleapis.com/oauth2/v1/certs - // - string uri = 1 [(validate.rules).string = {min_len: 1}]; - - // Specify how ``uri`` is to be fetched. Today, this requires an explicit - // cluster, but in the future we may support dynamic cluster creation or - // inline DNS resolution. See `issue - // `_. - oneof http_upstream_type { - option (validate.required) = true; - - // A cluster is created in the Envoy "cluster_manager" config - // section. This field specifies the cluster name. - // - // Example: - // - // .. code-block:: yaml - // - // cluster: jwks_cluster - // - string cluster = 2 [(validate.rules).string = {min_len: 1}]; - } - - // Sets the maximum duration in milliseconds that a response can take to arrive upon request. - google.protobuf.Duration timeout = 3 [(validate.rules).duration = { - required: true - lt {seconds: 4294967296} - gte {} - }]; -} diff --git a/src/main/proto/envoy/config/core/v3/protocol.proto b/src/main/proto/envoy/config/core/v3/protocol.proto deleted file mode 100644 index 63e189e..0000000 --- a/src/main/proto/envoy/config/core/v3/protocol.proto +++ /dev/null @@ -1,807 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "ProtocolProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Protocol options] - -// [#not-implemented-hide:] -message TcpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.TcpProtocolOptions"; -} - -// Config for keepalive probes in a QUIC connection. -// -// .. note:: -// -// QUIC keep-alive probing packets work differently from HTTP/2 keep-alive PINGs in a sense that the probing packet -// itself doesn't timeout waiting for a probing response. QUIC has a shorter idle timeout than TCP, so it doesn't rely on such probing to discover dead connections. If the peer fails to respond, the connection will idle timeout eventually. Thus, they are configured differently from :ref:`connection_keepalive `. -message QuicKeepAliveSettings { - // The max interval for a connection to send keep-alive probing packets (with ``PING`` or ``PATH_RESPONSE``). The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout while not less than ``1s`` to avoid throttling the connection or flooding the peer with probes. - // - // If :ref:`initial_interval ` is absent or zero, a client connection will use this value to start probing. - // - // If zero, disable keepalive probing. - // If absent, use the QUICHE default interval to probe. - google.protobuf.Duration max_interval = 1; - - // The interval to send the first few keep-alive probing packets to prevent connection from hitting the idle timeout. Subsequent probes will be sent, each one with an interval exponentially longer than previous one, till it reaches :ref:`max_interval `. And the probes afterwards will always use :ref:`max_interval `. - // - // The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout and smaller than max_interval to take effect. - // - // If absent, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval ` is zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. - google.protobuf.Duration initial_interval = 2 [(validate.rules).duration = { - lte {} - gte {nanos: 1000000} - }]; -} - -// QUIC protocol options which apply to both downstream and upstream connections. -// [#next-free-field: 12] -message QuicProtocolOptions { - // Config for QUIC connection migration across network interfaces, i.e. cellular to WIFI, upon - // network change events from the platform, i.e. the current network gets - // disconnected, or upon the QUIC detecting a bad connection. After migration, the - // connection may be on a different network other than the default network - // picked by the platform. Both iOS and Android will use a default network to interact with the internet, usually prefer unmetered network (WIFI) - // over metered ones (cellular). And users can specify which network to be used as the default. A connection on non-default network is only allowed to - // serve new requests for a certain period of time before being drained, and - // meanwhile, QUIC will try to migrate to the default network if possible. - message ConnectionMigrationSettings { - // Config for options to migrate idle connections which aren't serving any requests. - message MigrateIdleConnectionSettings { - // If idle connections are allowed to be migrated, only migrate the connection - // if it hasn't been idle for longer than this idle period. Otherwise, the - // connection will be closed instead. - // Default to 30s. - google.protobuf.Duration max_idle_time_before_migration = 1 - [(validate.rules).duration = {gte {seconds: 1}}]; - } - - // Config whether and how to migrate idle connections. - // If absent, idle connections will not be migrated but be closed upon - // migration signals. - MigrateIdleConnectionSettings migrate_idle_connections = 1; - - // After migrating to a non-default network interface, the connection will - // only be allowed to stay on that network for up to this period of time before - // being drained unless it migrates to the default network or that network - // gets picked as the default by the device by then. - // Default to 128s. - google.protobuf.Duration max_time_on_non_default_network = 2 - [(validate.rules).duration = {gte {seconds: 1}}]; - } - - // Maximum number of streams that the client can negotiate per connection. ``100`` - // if not specified. - google.protobuf.UInt32Value max_concurrent_streams = 1 [(validate.rules).uint32 = {gte: 1}]; - - // `Initial stream-level flow-control receive window - // `_ size. Valid values range from - // ``1`` to ``16777216`` (``2^24``, maximum supported by QUICHE) and defaults to ``16777216`` (``16 * 1024 * 1024``). - // - // .. note:: - // - // ``16384`` (``2^14``) is the minimum window size supported in Google QUIC. If configured smaller than it, we will use - // ``16384`` instead. QUICHE IETF QUIC implementation supports ``1`` byte window. We only support increasing the default - // window size now, so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // QUIC stream send and receive buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the stream buffers. - google.protobuf.UInt32Value initial_stream_window_size = 2 - [(validate.rules).uint32 = {lte: 16777216 gte: 1}]; - - // Similar to ``initial_stream_window_size``, but for connection-level - // flow-control. Valid values range from ``1`` to ``25165824`` (``24MB``, maximum supported by QUICHE) and defaults - // to ``25165824`` (``24 * 1024 * 1024``). - // - // .. note:: - // - // ``16384`` (``2^14``) is the minimum window size supported in Google QUIC. We only support increasing the default - // window size now, so it's also the minimum. - // - google.protobuf.UInt32Value initial_connection_window_size = 3 - [(validate.rules).uint32 = {lte: 25165824 gte: 1}]; - - // The number of timeouts that can occur before port migration is triggered for QUIC clients. - // This defaults to ``4``. If set to ``0``, port migration will not occur on path degrading. - // Timeout here refers to QUIC internal path degrading timeout mechanism, such as ``PTO``. - // This has no effect on server sessions. - google.protobuf.UInt32Value num_timeouts_to_trigger_port_migration = 4 - [(validate.rules).uint32 = {lte: 5 gte: 0}]; - - // Probes the peer at the configured interval to solicit traffic, i.e. ``ACK`` or ``PATH_RESPONSE``, from the peer to push back connection idle timeout. - // If absent, use the default keepalive behavior of which a client connection sends ``PING``s every ``15s``, and a server connection doesn't do anything. - QuicKeepAliveSettings connection_keepalive = 5; - - // A comma-separated list of strings representing QUIC connection options defined in - // `QUICHE `_ and to be sent by upstream connections. - string connection_options = 6; - - // A comma-separated list of strings representing QUIC client connection options defined in - // `QUICHE `_ and to be sent by upstream connections. - string client_connection_options = 7; - - // The duration that a QUIC connection stays idle before it closes itself. If this field is not present, QUICHE - // default ``600s`` will be applied. - // For internal corporate network, a long timeout is often fine. - // But for client facing network, ``30s`` is usually a good choice. - // Do not add an upper bound here. A long idle timeout is useful for maintaining warm connections at non-front-line proxy for low QPS services. - google.protobuf.Duration idle_network_timeout = 8 - [(validate.rules).duration = {gte {seconds: 1}}]; - - // Maximum packet length for QUIC connections. It refers to the largest size of a QUIC packet that can be transmitted over the connection. - // If not specified, one of the `default values in QUICHE `_ is used. - google.protobuf.UInt64Value max_packet_length = 9; - - // A customized UDP socket and a QUIC packet writer using the socket for - // client connections. i.e. Mobile uses its own implementation to interact - // with platform socket APIs. - // If not present, the default platform-independent socket and writer will be used. - // [#extension-category: envoy.quic.client_packet_writer] - TypedExtensionConfig client_packet_writer = 10; - - // Enable QUIC `connection migration - // ` - // to a different network interface when the current network is degrading or - // has become bad. - // In order to use a different network interface other than the platform's default one, - // a customized :ref:`client_packet_writer ` needs to be configured to - // create UDP sockets on non-default networks. - // Only takes effect when runtime key ``envoy.reloadable_features.use_migration_in_quiche`` is true. - // If absent, the feature will be disabled. - // [#not-implemented-hide:] - ConnectionMigrationSettings connection_migration = 11; -} - -message UpstreamHttpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.UpstreamHttpProtocolOptions"; - - // Set transport socket `SNI `_ for new - // upstream connections based on the downstream HTTP host/authority header or any other arbitrary - // header when :ref:`override_auto_sni_header ` - // is set, as seen by the :ref:`router filter `. - // Does nothing if a filter before the http router filter sets the corresponding metadata. - // - // See :ref:`SNI configuration ` for details on how this - // interacts with other validation options. - bool auto_sni = 1; - - // Automatic validate upstream presented certificate for new upstream connections based on the - // downstream HTTP host/authority header or any other arbitrary header when :ref:`override_auto_sni_header ` - // is set, as seen by the :ref:`router filter `. - // This field is intended to be set with ``auto_sni`` field. - // Does nothing if a filter before the http router filter sets the corresponding metadata. - // - // See :ref:`validation configuration ` for how this interacts with - // other validation options. - bool auto_san_validation = 2; - - // An optional alternative to the host/authority header to be used for setting the SNI value. - // It should be a valid downstream HTTP header, as seen by the - // :ref:`router filter `. - // If unset, host/authority header will be used for populating the SNI. If the specified header - // is not found or the value is empty, host/authority header will be used instead. - // This field is intended to be set with ``auto_sni`` and/or ``auto_san_validation`` fields. - // If none of these fields are set then setting this would be a no-op. - // Does nothing if a filter before the http router filter sets the corresponding metadata. - string override_auto_sni_header = 3 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; -} - -// Configures the alternate protocols cache which tracks alternate protocols that can be used to -// make an HTTP connection to an origin server. See https://tools.ietf.org/html/rfc7838 for -// HTTP Alternative Services and https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 -// for the "HTTPS" DNS resource record. -// [#next-free-field: 6] -message AlternateProtocolsCacheOptions { - // Allows pre-populating the cache with HTTP/3 alternate protocols entries with a 7 day lifetime. - // This will cause Envoy to attempt HTTP/3 to those upstreams, even if the upstreams have not - // advertised HTTP/3 support. These entries will be overwritten by alt-svc - // response headers or cached values. - // As with regular cached entries, if the origin response would result in clearing an existing - // alternate protocol cache entry, pre-populated entries will also be cleared. - // Adding a cache entry with hostname=foo.com port=123 is the equivalent of getting - // response headers - // alt-svc: h3=:"123"; ma=86400" in a response to a request to foo.com:123 - message AlternateProtocolsCacheEntry { - // The host name for the alternate protocol entry. - string hostname = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // The port for the alternate protocol entry. - uint32 port = 2 [(validate.rules).uint32 = {lt: 65535 gt: 0}]; - } - - // The name of the cache. Multiple named caches allow independent alternate protocols cache - // configurations to operate within a single Envoy process using different configurations. All - // alternate protocols cache options with the same name *must* be equal in all fields when - // referenced from different configuration components. Configuration will fail to load if this is - // not the case. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The maximum number of entries that the cache will hold. If not specified defaults to ``1024``. - // - // .. note:: - // - // The implementation is approximate and enforced independently on each worker thread, thus - // it is possible for the maximum entries in the cache to go slightly above the configured - // value depending on timing. This is similar to how other circuit breakers work. - google.protobuf.UInt32Value max_entries = 2 [(validate.rules).uint32 = {gt: 0}]; - - // Allows configuring a persistent - // :ref:`key value store ` to flush - // alternate protocols entries to disk. - // This function is currently only supported if concurrency is 1 - // Cached entries will take precedence over pre-populated entries below. - TypedExtensionConfig key_value_store_config = 3; - - // Allows pre-populating the cache with entries, as described above. - repeated AlternateProtocolsCacheEntry prepopulated_entries = 4; - - // Optional list of hostnames suffixes for which Alt-Svc entries can be shared. For example, if - // this list contained the value ``.c.example.com``, then an Alt-Svc entry for ``foo.c.example.com`` - // could be shared with ``bar.c.example.com`` but would not be shared with ``baz.example.com``. On - // the other hand, if the list contained the value ``.example.com`` then all three hosts could share - // Alt-Svc entries. Each entry must start with ``.``. If a hostname matches multiple suffixes, the - // first listed suffix will be used. - // - // Since lookup in this list is O(n), it is recommended that the number of suffixes be limited. - // [#not-implemented-hide:] - repeated string canonical_suffixes = 5; -} - -// [#next-free-field: 8] -message HttpProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.HttpProtocolOptions"; - - // Action to take when Envoy receives client request with header names containing underscore - // characters. - // Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented - // as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore - // characters. - enum HeadersWithUnderscoresAction { - // Allow headers with underscores. This is the default behavior. - ALLOW = 0; - - // Reject client request. HTTP/1 requests are rejected with ``HTTP 400`` status. HTTP/2 requests - // end with the stream reset. The ``httpN.requests_rejected_with_underscores_in_headers`` counter - // is incremented for each rejected request. - REJECT_REQUEST = 1; - - // Drop the client header with name containing underscores. The header is dropped before the filter chain is - // invoked and as such filters will not see dropped headers. The - // ``httpN.dropped_headers_with_underscores`` is incremented for each dropped header. - DROP_HEADER = 2; - } - - // The idle timeout for connections. The idle timeout is defined as the - // period in which there are no active requests. When the - // idle timeout is reached the connection will be closed. If the connection is an HTTP/2 - // downstream connection a drain sequence will occur prior to closing the connection, see - // :ref:`drain_timeout - // `. - // - // .. note:: - // - // Request based timeouts mean that HTTP/2 PINGs will not keep the connection alive. - // - // If not specified, this defaults to ``1 hour``. To disable idle timeouts explicitly set this to ``0``. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled for downstream connections according to the value for - // :ref:`HTTP_DOWNSTREAM_CONNECTION_IDLE `. - google.protobuf.Duration idle_timeout = 1; - - // The maximum duration of a connection. The duration is defined as a period since a connection - // was established. If not set, there is no max duration. When max_connection_duration is reached, - // the drain sequence will kick-in. The connection will be closed after the drain timeout period - // if there are no active streams. See :ref:`drain_timeout - // `. - google.protobuf.Duration max_connection_duration = 3; - - // The maximum number of headers (request headers if configured on HttpConnectionManager, - // response headers when configured on a cluster). - // If unconfigured, the default maximum number of headers allowed is ``100``. - // The default value for requests can be overridden by setting runtime key ``envoy.reloadable_features.max_request_headers_count``. - // The default value for responses can be overridden by setting runtime key ``envoy.reloadable_features.max_response_headers_count``. - // Downstream requests that exceed this limit will receive a ``HTTP 431`` response for HTTP/1.x and cause a stream - // reset for HTTP/2. - // Upstream responses that exceed this limit will result in a ``HTTP 502`` response. - google.protobuf.UInt32Value max_headers_count = 2 [(validate.rules).uint32 = {gte: 1}]; - - // The maximum size of response headers. - // If unconfigured, the default is ``60 KiB``, except for HTTP/1 response headers which have a default - // of ``80 KiB``. - // The default value can be overridden by setting runtime key ``envoy.reloadable_features.max_response_headers_size_kb``. - // Responses that exceed this limit will result in a ``HTTP 503`` response. - // In Envoy, this setting is only valid when configured on an upstream cluster, not on the - // :ref:`HTTP Connection Manager - // `. - // - // .. note:: - // - // Currently some protocol codecs impose limits on the maximum size of a single header. - // - // * HTTP/2 (when using ``nghttp2``) limits a single header to around ``100kb``. - // * HTTP/3 limits a single header to around ``1024kb``. - // - google.protobuf.UInt32Value max_response_headers_kb = 7 - [(validate.rules).uint32 = {lte: 8192 gt: 0}]; - - // Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be - // reset independent of any other timeouts. If not specified, this value is not set. - google.protobuf.Duration max_stream_duration = 4; - - // Action to take when a client request with a header name containing underscore characters is received. - // If this setting is not specified, the value defaults to ``ALLOW``. - // - // .. note:: - // - // Upstream responses are not affected by this setting. - // - // .. note:: - // - // This only affects client headers. It does not affect headers added by Envoy filters and does not have any - // impact if added to cluster config. - HeadersWithUnderscoresAction headers_with_underscores_action = 5; - - // Optional maximum requests for both upstream and downstream connections. - // If not specified, there is no limit. - // Setting this parameter to ``1`` will effectively disable keep alive. - // For HTTP/2 and HTTP/3, due to concurrent stream processing, the limit is approximate. - google.protobuf.UInt32Value max_requests_per_connection = 6; -} - -// [#next-free-field: 12] -message Http1ProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.Http1ProtocolOptions"; - - // [#next-free-field: 9] - message HeaderKeyFormat { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat"; - - message ProperCaseWords { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords"; - } - - oneof header_format { - option (validate.required) = true; - - // Formats the header by proper casing words: the first character and any character following - // a special character will be capitalized if it's an alpha character. For example, - // ``"content-type"`` becomes ``"Content-Type"``, and ``"foo$b#$are"`` becomes ``"Foo$B#$Are"``. - // - // .. note:: - // - // While this results in most headers following conventional casing, certain headers - // are not covered. For example, the ``"TE"`` header will be formatted as ``"Te"``. - ProperCaseWords proper_case_words = 1; - - // Configuration for stateful formatter extensions that allow using received headers to - // affect the output of encoding headers. E.g., preserving case during proxying. - // [#extension-category: envoy.http.stateful_header_formatters] - TypedExtensionConfig stateful_formatter = 8; - } - } - - // Handle HTTP requests with absolute URLs in the requests. These requests - // are generally sent by clients to forward/explicit proxies. This allows clients to configure - // envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the - // ``http_proxy`` environment variable. - google.protobuf.BoolValue allow_absolute_url = 1; - - // Handle incoming HTTP/1.0 and HTTP/0.9 requests. - // This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 - // style connect logic, dechunking, and handling lack of client host iff - // ``default_host_for_http_10`` is configured. - bool accept_http_10 = 2; - - // A default host for HTTP/1.0 requests. This is highly suggested if ``accept_http_10`` is true as - // Envoy does not otherwise support HTTP/1.0 without a Host header. - // This is a no-op if ``accept_http_10`` is not true. - string default_host_for_http_10 = 3; - - // Describes how the keys for response headers should be formatted. By default, all header keys - // are lower cased. - HeaderKeyFormat header_key_format = 4; - - // Enables trailers for HTTP/1. By default the HTTP/1 codec drops proxied trailers. - // - // .. attention:: - // - // This only happens when Envoy is chunk encoding which occurs when: - // - The request is HTTP/1.1. - // - Is neither a ``HEAD`` only request nor a HTTP Upgrade. - // - Not a response to a ``HEAD`` request. - // - The ``Content-Length`` header is not present. - bool enable_trailers = 5; - - // Allows Envoy to process requests/responses with both ``Content-Length`` and ``Transfer-Encoding`` - // headers set. By default such messages are rejected, but if option is enabled - Envoy will - // remove ``Content-Length`` header and process message. - // See `RFC7230, sec. 3.3.3 `_ for details. - // - // .. attention:: - // - // Enabling this option might lead to request smuggling vulnerability, especially if traffic - // is proxied via multiple layers of proxies. - // [#comment:TODO: This field is ignored when the - // :ref:`header validation configuration ` - // is present.] - bool allow_chunked_length = 6; - - // Allows invalid HTTP messaging. When this option is false, then Envoy will terminate - // HTTP/1.1 connections upon receiving an invalid HTTP message. However, - // when this option is true, then Envoy will leave the HTTP/1.1 connection - // open where possible. - // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // `. - google.protobuf.BoolValue override_stream_error_on_invalid_http_message = 7; - - // Allows sending fully qualified URLs when proxying the first line of the - // response. By default, Envoy will only send the path components in the first line. - // If this is true, Envoy will create a fully qualified URI composing scheme - // (inferred if not present), host (from the host/:authority header) and path - // (from first line or :path header). - bool send_fully_qualified_url = 8; - - // [#not-implemented-hide:] Hiding so that field can be removed after BalsaParser is rolled out. - // If set, force HTTP/1 parser: BalsaParser if true, http-parser if false. - // If unset, HTTP/1 parser is selected based on - // envoy.reloadable_features.http1_use_balsa_parser. - // See issue #21245. - google.protobuf.BoolValue use_balsa_parser = 9 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // [#not-implemented-hide:] Hiding so that field can be removed. - // If true, and BalsaParser is used (either `use_balsa_parser` above is true, - // or `envoy.reloadable_features.http1_use_balsa_parser` is true and - // `use_balsa_parser` is unset), then every non-empty method with only valid - // characters is accepted. Otherwise, methods not on the hard-coded list are - // rejected. - // Once UHV is enabled, this field should be removed, and BalsaParser should - // allow any method. UHV validates the method, rejecting empty string or - // invalid characters, and provides :ref:`restrict_http_methods - // ` - // to reject custom methods. - bool allow_custom_methods = 10 [(xds.annotations.v3.field_status).work_in_progress = true]; - - // Ignore HTTP/1.1 upgrade values matching any of the supplied matchers. - // - // .. note:: - // - // ``h2c`` upgrades are always removed for backwards compatibility, regardless of the - // value in this setting. - repeated type.matcher.v3.StringMatcher ignore_http_11_upgrade = 11; -} - -message KeepaliveSettings { - // Send HTTP/2 PING frames at this period, in order to test that the connection is still alive. - // If this is zero, interval PINGs will not be sent. - google.protobuf.Duration interval = 1 [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // How long to wait for a response to a keepalive PING. If a response is not received within this - // time period, the connection will be aborted. - // - // .. note:: - // - // In order to prevent the influence of Head-of-line (HOL) blocking the timeout period is extended when *any* frame is received on - // the connection, under the assumption that if a frame is received the connection is healthy. - google.protobuf.Duration timeout = 2 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; - - // A random jitter amount as a percentage of interval that will be added to each interval. - // A value of zero means there will be no jitter. - // The default value is ``15%``. - type.v3.Percent interval_jitter = 3; - - // If the connection has been idle for this duration, send a HTTP/2 ping ahead - // of new stream creation, to quickly detect dead connections. - // If this is zero, this type of PING will not be sent. - // If an interval ping is outstanding, a second ping will not be sent as the - // interval ping will determine if the connection is dead. - // - // The same feature for HTTP/3 is given by inheritance from QUICHE which uses :ref:`connection idle_timeout ` and the current PTO of the connection to decide whether to probe before sending a new request. - google.protobuf.Duration connection_idle_interval = 4 - [(validate.rules).duration = {gte {nanos: 1000000}}]; -} - -// [#next-free-field: 19] -message Http2ProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.Http2ProtocolOptions"; - - // Defines a parameter to be sent in the SETTINGS frame. - // See `RFC7540, sec. 6.5.1 `_ for details. - message SettingsParameter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.Http2ProtocolOptions.SettingsParameter"; - - // The 16 bit parameter identifier. - google.protobuf.UInt32Value identifier = 1 [ - (validate.rules).uint32 = {lte: 65535 gte: 0}, - (validate.rules).message = {required: true} - ]; - - // The 32 bit parameter value. - google.protobuf.UInt32Value value = 2 [(validate.rules).message = {required: true}]; - } - - // `Maximum table size `_ - // (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values - // range from ``0`` to ``4294967295`` (``2^32 - 1``) and defaults to ``4096``. ``0`` effectively disables header - // compression. - google.protobuf.UInt32Value hpack_table_size = 1; - - // `Maximum concurrent streams `_ - // allowed for peer on one HTTP/2 connection. Valid values range from ``1`` to ``2147483647`` (``2^31 - 1``) - // and defaults to ``1024`` for safety and should be sufficient for most use cases. - // - // For upstream connections, this also limits how many streams Envoy will initiate concurrently - // on a single connection. If the limit is reached, Envoy may queue requests or establish - // additional connections (as allowed per circuit breaker limits). - // - // This acts as an upper bound: Envoy will lower the max concurrent streams allowed on a given - // connection based on upstream settings. Config dumps will reflect the configured upper bound, - // not the per-connection negotiated limits. - google.protobuf.UInt32Value max_concurrent_streams = 2 - [(validate.rules).uint32 = {lte: 2147483647 gte: 1}]; - - // `Initial stream-level flow-control window - // `_ size. Valid values range from ``65535`` - // (``2^16 - 1``, HTTP/2 default) to ``2147483647`` (``2^31 - 1``, HTTP/2 maximum) and defaults to - // ``16MiB`` (``16 * 1024 * 1024``). - // - // .. note:: - // - // ``65535`` is the initial window size from HTTP/2 spec. We only support increasing the default window size now, - // so it's also the minimum. - // - // This field also acts as a soft limit on the number of bytes Envoy will buffer per-stream in the - // HTTP/2 codec buffers. Once the buffer reaches this pointer, watermark callbacks will fire to - // stop the flow of data to the codec buffers. - google.protobuf.UInt32Value initial_stream_window_size = 3 - [(validate.rules).uint32 = {lte: 2147483647 gte: 65535}]; - - // Similar to ``initial_stream_window_size``, but for connection-level flow-control - // window. The default is ``24MiB`` (``24 * 1024 * 1024``). - google.protobuf.UInt32Value initial_connection_window_size = 4 - [(validate.rules).uint32 = {lte: 2147483647 gte: 65535}]; - - // Allows proxying Websocket and other upgrades over H2 connect. - bool allow_connect = 5; - - // [#not-implemented-hide:] Hiding until Envoy has full metadata support. - // Still under implementation. DO NOT USE. - // - // Allows sending and receiving HTTP/2 METADATA frames. See [metadata - // docs](https://github.com/envoyproxy/envoy/blob/main/source/docs/h2_metadata.md) for more - // information. - bool allow_metadata = 6; - - // Limit the number of pending outbound downstream frames of all types (frames that are waiting to - // be written into the socket). Exceeding this limit triggers flood mitigation and connection is - // terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due - // to flood mitigation. The default limit is ``10000``. - google.protobuf.UInt32Value max_outbound_frames = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Limit the number of pending outbound downstream frames of types ``PING``, ``SETTINGS`` and ``RST_STREAM``, - // preventing high memory utilization when receiving continuous stream of these frames. Exceeding - // this limit triggers flood mitigation and connection is terminated. The - // ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood - // mitigation. The default limit is ``1000``. - google.protobuf.UInt32Value max_outbound_control_frames = 8 [(validate.rules).uint32 = {gte: 1}]; - - // Limit the number of consecutive inbound frames of types ``HEADERS``, ``CONTINUATION`` and ``DATA`` with an - // empty payload and no end stream flag. Those frames have no legitimate use and are abusive, but - // might be a result of a broken HTTP/2 implementation. The ``http2.inbound_empty_frames_flood`` - // stat tracks the number of connections terminated due to flood mitigation. - // Setting this to ``0`` will terminate connection upon receiving first frame with an empty payload - // and no end stream flag. The default limit is ``1``. - google.protobuf.UInt32Value max_consecutive_inbound_frames_with_empty_payload = 9; - - // Limit the number of inbound ``PRIORITY`` frames allowed per each opened stream. If the number - // of ``PRIORITY`` frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // ``max_inbound_priority_frames_per_stream`` * (1 + ``opened_streams``) - // - // the connection is terminated. For downstream connections the ``opened_streams`` is incremented when - // Envoy receives complete response headers from the upstream server. For upstream connection the - // ``opened_streams`` is incremented when Envoy sends the ``HEADERS`` frame for a new stream. The - // ``http2.inbound_priority_frames_flood`` stat tracks - // the number of connections terminated due to flood mitigation. The default limit is ``100``. - google.protobuf.UInt32Value max_inbound_priority_frames_per_stream = 10; - - // Limit the number of inbound ``WINDOW_UPDATE`` frames allowed per ``DATA`` frame sent. If the number - // of ``WINDOW_UPDATE`` frames received over the lifetime of connection exceeds the value calculated - // using this formula:: - // - // ``5 + 2 * (opened_streams + - // max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames)`` - // - // the connection is terminated. For downstream connections the ``opened_streams`` is incremented when - // Envoy receives complete response headers from the upstream server. For upstream connections the - // ``opened_streams`` is incremented when Envoy sends the ``HEADERS`` frame for a new stream. The - // ``http2.inbound_priority_frames_flood`` stat tracks the number of connections terminated due to - // flood mitigation. The default ``max_inbound_window_update_frames_per_data_frame_sent`` value is ``10``. - // Setting this to ``1`` should be enough to support HTTP/2 implementations with basic flow control, - // but more complex implementations that try to estimate available bandwidth require at least ``2``. - google.protobuf.UInt32Value max_inbound_window_update_frames_per_data_frame_sent = 11 - [(validate.rules).uint32 = {gte: 1}]; - - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This is overridden by HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // iff present. - // - // This is deprecated in favor of :ref:`override_stream_error_on_invalid_http_message - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - bool stream_error_on_invalid_http_messaging = 12 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/2 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // This overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // ` - // - // See `RFC7540, sec. 8.1 `_ for details. - google.protobuf.BoolValue override_stream_error_on_invalid_http_message = 14; - - // [#not-implemented-hide:] - // Specifies SETTINGS frame parameters to be sent to the peer, with two exceptions: - // - // 1. SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by - // Envoy. - // - // 2. SETTINGS_ENABLE_CONNECT_PROTOCOL (0x8) is only configurable through the named field - // 'allow_connect'. - // - // .. note:: - // - // Custom parameters specified through this field can not also be set in the - // corresponding named parameters: - // - // .. code-block:: text - // - // ID Field Name - // ---------------- - // 0x1 hpack_table_size - // 0x3 max_concurrent_streams - // 0x4 initial_stream_window_size - // - // Collisions will trigger config validation failure on load/update. Likewise, inconsistencies - // between custom parameters with the same identifier will trigger a failure. - // - // See `IANA HTTP/2 Settings - // `_ for - // standardized identifiers. - repeated SettingsParameter custom_settings_parameters = 13; - - // Send HTTP/2 PING frames to verify that the connection is still healthy. If the remote peer - // does not respond within the configured timeout, the connection will be aborted. - KeepaliveSettings connection_keepalive = 15; - - // [#not-implemented-hide:] Hiding so that the field can be removed after oghttp2 is rolled out. - // If set, force use of a particular HTTP/2 codec: oghttp2 if true, nghttp2 if false. - // If unset, HTTP/2 codec is selected based on envoy.reloadable_features.http2_use_oghttp2. - google.protobuf.BoolValue use_oghttp2_codec = 16 - [(xds.annotations.v3.field_status).work_in_progress = true]; - - // Configure the maximum amount of metadata than can be handled per stream. Defaults to ``1 MB``. - google.protobuf.UInt64Value max_metadata_size = 17; - - // Controls whether to encode headers using huffman encoding. - // This can be useful in cases where the cpu spent encoding the headers isn't - // worth the network bandwidth saved e.g. for localhost. - // If unset, uses the data plane's default value. - google.protobuf.BoolValue enable_huffman_encoding = 18; -} - -// [#not-implemented-hide:] -message GrpcProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.core.GrpcProtocolOptions"; - - Http2ProtocolOptions http2_protocol_options = 1; -} - -// A message which allows using HTTP/3. -// [#next-free-field: 9] -message Http3ProtocolOptions { - QuicProtocolOptions quic_protocol_options = 1; - - // Allows invalid HTTP messaging and headers. When this option is disabled (default), then - // the whole HTTP/3 connection is terminated upon receiving invalid HEADERS frame. However, - // when this option is enabled, only the offending stream is terminated. - // - // If set, this overrides any HCM :ref:`stream_error_on_invalid_http_messaging - // `. - google.protobuf.BoolValue override_stream_error_on_invalid_http_message = 2; - - // Allows proxying Websocket and other upgrades over HTTP/3 CONNECT using - // the header mechanisms from the `HTTP/2 extended connect RFC - // `_ - // and settings `proposed for HTTP/3 - // `_ - // - // .. note:: - // - // HTTP/3 CONNECT is not yet an RFC. - bool allow_extended_connect = 5 [(xds.annotations.v3.field_status).work_in_progress = true]; - - // [#not-implemented-hide:] Hiding until Envoy has full metadata support. - // Still under implementation. DO NOT USE. - // - // Allows sending and receiving HTTP/3 METADATA frames. See [metadata - // docs](https://github.com/envoyproxy/envoy/blob/main/source/docs/h2_metadata.md) for more - // information. - bool allow_metadata = 6; - - // [#not-implemented-hide:] Hiding until Envoy has full HTTP/3 upstream support. - // Still under implementation. DO NOT USE. - // - // Disables QPACK compression related features for HTTP/3 including: - // No huffman encoding, zero dynamic table capacity and no cookie crumbling. - // This can be useful for trading off CPU vs bandwidth when an upstream HTTP/3 connection multiplexes multiple downstream connections. - bool disable_qpack = 7; - - // Disables connection level flow control for HTTP/3 streams. This is useful in situations where the streams share the same connection - // but originate from different end-clients, so that each stream can make progress independently at non-front-line proxies. - bool disable_connection_flow_control_for_streams = 8; -} - -// A message to control transformations to the :scheme header -message SchemeHeaderTransformation { - oneof transformation { - // Overwrite any Scheme header with the contents of this string. - // If set, takes precedence over ``match_upstream``. - string scheme_to_overwrite = 1 [(validate.rules).string = {in: "http" in: "https"}]; - } - - // Set the Scheme header to match the upstream transport protocol. For example, should a - // request be sent to the upstream over TLS, the scheme header will be set to ``"https"``. Should the - // request be sent over plaintext, the scheme header will be set to ``"http"``. - // If ``scheme_to_overwrite`` is set, this field is not used. - bool match_upstream = 2; -} diff --git a/src/main/proto/envoy/config/core/v3/proxy_protocol.proto b/src/main/proto/envoy/config/core/v3/proxy_protocol.proto deleted file mode 100644 index 2da5fe5..0000000 --- a/src/main/proto/envoy/config/core/v3/proxy_protocol.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/substitution_format_string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "ProxyProtocolProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Proxy protocol] - -message ProxyProtocolPassThroughTLVs { - enum PassTLVsMatchType { - // Pass all TLVs. - INCLUDE_ALL = 0; - - // Pass specific TLVs defined in tlv_type. - INCLUDE = 1; - } - - // The strategy to pass through TLVs. Default is INCLUDE_ALL. - // If INCLUDE_ALL is set, all TLVs will be passed through no matter the tlv_type field. - PassTLVsMatchType match_type = 1; - - // The TLV types that are applied based on match_type. - // TLV type is defined as uint8_t in proxy protocol. See `the spec - // `_ for details. - repeated uint32 tlv_type = 2 [(validate.rules).repeated = {items {uint32 {lt: 256}}}]; -} - -// Represents a single Type-Length-Value (TLV) entry. -message TlvEntry { - // The type of the TLV. Must be a uint8 (0-255) as per the Proxy Protocol v2 specification. - uint32 type = 1 [(validate.rules).uint32 = {lt: 256}]; - - // The static value of the TLV. - // Only one of ``value`` or ``format_string`` may be set. - bytes value = 2; - - // Uses the :ref:`format string ` to dynamically - // populate the TLV value from stream information. This allows dynamic values - // such as metadata, filter state, or other stream properties to be included in - // the TLV. - // - // For example: - // - // .. code-block:: yaml - // - // type: 0xF0 - // format_string: - // text_format_source: - // inline_string: "%DYNAMIC_METADATA(envoy.filters.network:key)%" - // - // The formatted string will be used directly as the TLV value. - // Only one of ``value`` or ``format_string`` may be set. - SubstitutionFormatString format_string = 3; -} - -message ProxyProtocolConfig { - enum Version { - // PROXY protocol version 1. Human readable format. - V1 = 0; - - // PROXY protocol version 2. Binary format. - V2 = 1; - } - - // The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details - Version version = 1; - - // This config controls which TLVs can be passed to upstream if it is Proxy Protocol - // V2 header. If there is no setting for this field, no TLVs will be passed through. - ProxyProtocolPassThroughTLVs pass_through_tlvs = 2; - - // This config allows additional TLVs to be included in the upstream PROXY protocol - // V2 header. Unlike ``pass_through_tlvs``, which passes TLVs from the downstream request, - // ``added_tlvs`` provides an extension mechanism for defining new TLVs that are included - // with the upstream request. These TLVs may not be present in the downstream request and - // can be defined at either the transport socket level or the host level to provide more - // granular control over the TLVs that are included in the upstream request. - // - // Host-level TLVs are specified in the ``metadata.typed_filter_metadata`` field under the - // ``envoy.transport_sockets.proxy_protocol`` namespace. - // - // .. literalinclude:: /_configs/repo/proxy_protocol.yaml - // :language: yaml - // :lines: 49-57 - // :linenos: - // :lineno-start: 49 - // :caption: :download:`proxy_protocol.yaml ` - // - // **Precedence behavior**: - // - // - When a TLV is defined at both the host level and the transport socket level, the value - // from the host level configuration takes precedence. This allows users to define default TLVs - // at the transport socket level and override them at the host level. - // - Any TLV defined in the ``pass_through_tlvs`` field will be overridden by either the host-level - // or transport socket-level TLV. - // - // If there are multiple TLVs with the same type, only the TLVs from the highest precedence level - // will be used. - repeated TlvEntry added_tlvs = 3; -} - -message PerHostConfig { - // Enables per-host configuration for Proxy Protocol. - repeated TlvEntry added_tlvs = 1; -} diff --git a/src/main/proto/envoy/config/core/v3/resolver.proto b/src/main/proto/envoy/config/core/v3/resolver.proto deleted file mode 100644 index f4d103a..0000000 --- a/src/main/proto/envoy/config/core/v3/resolver.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "ResolverProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Resolver] - -// Configuration of DNS resolver option flags which control the behavior of the DNS resolver. -message DnsResolverOptions { - // Use TCP for all DNS queries instead of the default protocol UDP. - bool use_tcp_for_dns_lookups = 1; - - // Do not use the default search domains; only query hostnames as-is or as aliases. - bool no_default_search_domain = 2; -} - -// DNS resolution configuration which includes the underlying dns resolver addresses and options. -message DnsResolutionConfig { - // A list of dns resolver addresses. If specified, the DNS client library will perform resolution - // via the underlying DNS resolvers. Otherwise, the default system resolvers - // (e.g., /etc/resolv.conf) will be used. - repeated Address resolvers = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. - DnsResolverOptions dns_resolver_options = 2; -} diff --git a/src/main/proto/envoy/config/core/v3/socket_cmsg_headers.proto b/src/main/proto/envoy/config/core/v3/socket_cmsg_headers.proto deleted file mode 100644 index cc3e58e..0000000 --- a/src/main/proto/envoy/config/core/v3/socket_cmsg_headers.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "SocketCmsgHeadersProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Socket CMSG headers] - -// Configuration for socket cmsg headers. -// See `:ref:CMSG `_ for further information. -message SocketCmsgHeaders { - // cmsg level. Default is unset. - google.protobuf.UInt32Value level = 1; - - // cmsg type. Default is unset. - google.protobuf.UInt32Value type = 2; - - // Expected size of cmsg value. Default is zero. - uint32 expected_size = 3; -} diff --git a/src/main/proto/envoy/config/core/v3/socket_option.proto b/src/main/proto/envoy/config/core/v3/socket_option.proto deleted file mode 100644 index ad73d72..0000000 --- a/src/main/proto/envoy/config/core/v3/socket_option.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "SocketOptionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Socket option] - -// Generic socket option message. This would be used to set socket options that -// might not exist in upstream kernels or precompiled Envoy binaries. -// -// For example: -// -// .. code-block:: json -// -// { -// "description": "support tcp keep alive", -// "state": 0, -// "level": 1, -// "name": 9, -// "int_value": 1, -// } -// -// 1 means SOL_SOCKET and 9 means SO_KEEPALIVE on Linux. -// With the above configuration, `TCP Keep-Alives `_ -// can be enabled in socket with Linux, which can be used in -// :ref:`listener's` or -// :ref:`admin's ` socket_options etc. -// -// It should be noted that the name or level may have different values on different platforms. -// [#next-free-field: 8] -message SocketOption { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SocketOption"; - - enum SocketState { - // Socket options are applied after socket creation but before binding the socket to a port - STATE_PREBIND = 0; - - // Socket options are applied after binding the socket to a port but before calling listen() - STATE_BOUND = 1; - - // Socket options are applied after calling listen() - STATE_LISTENING = 2; - } - - // The `socket type `_ to apply the socket option to. - // Only one field should be set. If multiple fields are set, the precedence order will determine - // the selected one. If none of the fields is set, the socket option will be applied to all socket types. - // - // For example: - // If :ref:`stream ` is set, - // it takes precedence over :ref:`datagram `. - message SocketType { - // The stream socket type. - message Stream { - } - - // The datagram socket type. - message Datagram { - } - - // Apply the socket option to the stream socket type. - Stream stream = 1; - - // Apply the socket option to the datagram socket type. - Datagram datagram = 2; - } - - // An optional name to give this socket option for debugging, etc. - // Uniqueness is not required and no special meaning is assumed. - string description = 1; - - // Corresponding to the level value passed to setsockopt, such as IPPROTO_TCP - int64 level = 2; - - // The numeric name as passed to setsockopt - int64 name = 3; - - oneof value { - option (validate.required) = true; - - // Because many sockopts take an int value. - int64 int_value = 4; - - // Otherwise it's a byte buffer. - bytes buf_value = 5; - } - - // The state in which the option will be applied. When used in BindConfig - // STATE_PREBIND is currently the only valid value. - SocketState state = 6 [(validate.rules).enum = {defined_only: true}]; - - // Apply the socket option to the specified `socket type `_. - // If not specified, the socket option will be applied to all socket types. - SocketType type = 7; -} - -message SocketOptionsOverride { - repeated SocketOption socket_options = 1; -} diff --git a/src/main/proto/envoy/config/core/v3/substitution_format_string.proto b/src/main/proto/envoy/config/core/v3/substitution_format_string.proto deleted file mode 100644 index 3edbf5f..0000000 --- a/src/main/proto/envoy/config/core/v3/substitution_format_string.proto +++ /dev/null @@ -1,136 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "google/protobuf/struct.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "SubstitutionFormatStringProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Substitution format string] - -// Optional configuration options to be used with json_format. -message JsonFormatOptions { - // The output JSON string properties will be sorted. - // - // .. note:: - // As the properties are always sorted, this option has no effect and is deprecated. - // - bool sort_properties = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; -} - -// Configuration to use multiple :ref:`command operators ` -// to generate a new string in either plain text or JSON format. -// [#next-free-field: 8] -message SubstitutionFormatString { - oneof format { - option (validate.required) = true; - - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting ``text_format`` like below, - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - // Deprecated in favor of :ref:`text_format_source `. To migrate text format strings, use the :ref:`inline_string ` field. - string text_format = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Specify a format with command operators to form a JSON string. - // Its details is described in :ref:`format dictionary`. - // Values are rendered as strings, numbers, or boolean values as appropriate. - // Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA). - // See the documentation for a specific command operator for details. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // - // The following JSON object would be created: - // - // .. code-block:: json - // - // { - // "status": 500, - // "message": "My error message" - // } - // - google.protobuf.Struct json_format = 2 [(validate.rules).message = {required: true}]; - - // Specify a format with command operators to form a text string. - // Its details is described in :ref:`format string`. - // - // For example, setting ``text_format`` like below, - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format_source: - // inline_string: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // generates plain text similar to: - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - DataSource text_format_source = 5; - } - - // If set to true, when command operators are evaluated to null, - // - // * for ``text_format``, the output of the empty operator is changed from ``-`` to an - // empty string, so that empty values are omitted entirely. - // * for ``json_format`` the keys with null values are omitted in the output structure. - // - // .. note:: - // This option does not work perfectly with ``json_format`` as keys with ``null`` values - // will still be included in the output. See https://github.com/envoyproxy/envoy/issues/37941 - // for more details. - // - bool omit_empty_values = 3; - - // Specify a ``content_type`` field. - // If this field is not set then ``text/plain`` is used for ``text_format`` and - // ``application/json`` is used for ``json_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // content_type: "text/html; charset=UTF-8" - // - string content_type = 4 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Specifies a collection of Formatter plugins that can be called from the access log configuration. - // See the formatters extensions documentation for details. - // [#extension-category: envoy.formatter] - repeated TypedExtensionConfig formatters = 6; - - // If json_format is used, the options will be applied to the output JSON string. - JsonFormatOptions json_format_options = 7; -} diff --git a/src/main/proto/envoy/config/core/v3/udp_socket_config.proto b/src/main/proto/envoy/config/core/v3/udp_socket_config.proto deleted file mode 100644 index ec9f77f..0000000 --- a/src/main/proto/envoy/config/core/v3/udp_socket_config.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.config.core.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.core.v3"; -option java_outer_classname = "UdpSocketConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP socket config] - -// Generic UDP socket configuration. -message UdpSocketConfig { - // The maximum size of received UDP datagrams. Using a larger size will cause Envoy to allocate - // more memory per socket. Received datagrams above this size will be dropped. If not set - // defaults to 1500 bytes. - google.protobuf.UInt64Value max_rx_datagram_size = 1 - [(validate.rules).uint64 = {lt: 65536 gt: 0}]; - - // Configures whether Generic Receive Offload (GRO) - // _ is preferred when reading from the - // UDP socket. The default is context dependent and is documented where UdpSocketConfig is used. - // This option affects performance but not functionality. If GRO is not supported by the operating - // system, non-GRO receive will be used. - google.protobuf.BoolValue prefer_gro = 2; -} diff --git a/src/main/proto/envoy/config/endpoint/v3/endpoint.proto b/src/main/proto/envoy/config/endpoint/v3/endpoint.proto deleted file mode 100644 index a149f60..0000000 --- a/src/main/proto/envoy/config/endpoint/v3/endpoint.proto +++ /dev/null @@ -1,137 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v3; - -import "envoy/config/endpoint/v3/endpoint_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Endpoint configuration] -// Endpoint discovery :ref:`architecture overview ` - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -message ClusterLoadAssignment { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.ClusterLoadAssignment"; - - // Load balancing policy settings. - // [#next-free-field: 7] - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ClusterLoadAssignment.Policy"; - - message DropOverload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Percentage of traffic that should be dropped for the category. - type.v3.FractionalPercent drop_percentage = 2; - } - - reserved 1, 5; - - reserved "disable_overprovisioning"; - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // - // Envoy supports only one element and will NACK if more than one element is present. - // Other xDS-capable data planes will not necessarily have this limitation. - // - // In Envoy, this ``drop_overloads`` config can be overridden by a runtime key - // "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to - // any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%. - // When both ``drop_overloads`` config and "load_balancing_policy.drop_overload_limit" - // setting are in place, the min of these two wins. - repeated DropOverload drop_overloads = 2; - - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the fraction of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; - - // If true, use the :ref:`load balancing weight - // ` of healthy and unhealthy - // hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts - // to determine the health of the priority level, or in other words assume each host has a weight of 1 for - // this calculation. - // - // .. note:: - // This is not currently implemented for - // :ref:`locality weighted load balancing `. - bool weighted_priority_health = 6; - } - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // List of endpoints to load balance to. - repeated LocalityLbEndpoints endpoints = 2; - - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - map named_endpoints = 5; - - // Load balancing policy settings. - Policy policy = 4; -} diff --git a/src/main/proto/envoy/config/endpoint/v3/endpoint_components.proto b/src/main/proto/envoy/config/endpoint/v3/endpoint_components.proto deleted file mode 100644 index eacc555..0000000 --- a/src/main/proto/envoy/config/endpoint/v3/endpoint_components.proto +++ /dev/null @@ -1,229 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/health_check.proto"; - -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/collection_entry.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; -option java_outer_classname = "EndpointComponentsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Endpoints] - -// Upstream host identifier. -message Endpoint { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.Endpoint"; - - // The optional health check configuration. - message HealthCheckConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.endpoint.Endpoint.HealthCheckConfig"; - - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; - - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - string hostname = 2; - - // Optional alternative health check host address. - // - // .. attention:: - // - // The form of the health check host address is expected to be a direct IP address. - core.v3.Address address = 3; - - // Optional flag to control if perform active health check for this endpoint. - // Active health check is enabled by default if there is a health checker. - bool disable_active_health_check = 4; - } - - message AdditionalAddress { - // Additional address that is associated with the endpoint. - core.v3.Address address = 1; - } - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - core.v3.Address address = 1; - - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig health_check_config = 2; - - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - string hostname = 3; - - // An ordered list of addresses that together with ``address`` comprise the - // list of addresses for an endpoint. The address given in the ``address`` is - // prepended to this list. It is assumed that the list must already be - // sorted by preference order of the addresses. This will only be supported - // for STATIC and EDS clusters. - repeated AdditionalAddress additional_addresses = 4; -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -message LbEndpoint { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.LbEndpoint"; - - // Upstream host identifier or a named reference. - oneof host_identifier { - Endpoint endpoint = 1; - - // [#not-implemented-hide:] - string endpoint_name = 5; - } - - // Optional health status when known and supplied by EDS server. - core.v3.HealthStatus health_status = 2; - - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as ``envoy.lb``. An example boolean key-value pair - // is ``canary``, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - core.v3.Metadata metadata = 3; - - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, will be treated as 1. The sum - // of the weights of all endpoints in the endpoint's locality must not - // exceed uint32_t maximal value (4294967295). - google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; -} - -// LbEndpoint list collection. Entries are `LbEndpoint` resources or references. -// [#not-implemented-hide:] -message LbEndpointCollection { - xds.core.v3.CollectionEntry entries = 1; -} - -// A configuration for an LEDS collection. -message LedsClusterLocalityConfig { - // Configuration for the source of LEDS updates for a Locality. - core.v3.ConfigSource leds_config = 1; - - // The name of the LbEndpoint collection resource. - // - // If the name ends in ``/*``, it indicates an LbEndpoint glob collection, - // which is supported only in the xDS incremental protocol variants. - // Otherwise, it indicates an LbEndpointCollection list collection. - // - // Envoy currently supports only glob collections. - string leds_collection_name = 2; -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but only if -// they have different priorities. -// [#next-free-field: 10] -message LocalityLbEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.endpoint.LocalityLbEndpoints"; - - // [#not-implemented-hide:] - // A list of endpoints of a specific locality. - message LbEndpointList { - repeated LbEndpoint lb_endpoints = 1; - } - - // Identifies location of where the upstream hosts run. - core.v3.Locality locality = 1; - - // Metadata to provide additional information about the locality endpoints in aggregate. - core.v3.Metadata metadata = 9; - - // The group of endpoints belonging to the locality specified. - // This is ignored if :ref:`leds_cluster_locality_config - // ` is set. - repeated LbEndpoint lb_endpoints = 2; - - oneof lb_config { - // [#not-implemented-hide:] - // Not implemented and deprecated. - LbEndpointList load_balancer_endpoints = 7 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // LEDS Configuration for the current locality. - // If this is set, the :ref:`lb_endpoints - // ` - // field is ignored. - LedsClusterLocalityConfig leds_cluster_locality_config = 8; - } - - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event that enough endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. Read more at :ref:`priority levels `. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; - - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - google.protobuf.UInt32Value proximity = 6; -} diff --git a/src/main/proto/envoy/config/endpoint/v3/load_report.proto b/src/main/proto/envoy/config/endpoint/v3/load_report.proto deleted file mode 100644 index 6d12765..0000000 --- a/src/main/proto/envoy/config/endpoint/v3/load_report.proto +++ /dev/null @@ -1,220 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v3"; -option java_outer_classname = "LoadReportProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Load Report] - -// These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#next-free-field: 15] -message UpstreamLocalityStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.endpoint.UpstreamLocalityStats"; - - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - core.v3.Locality locality = 1; - - // The total number of requests successfully completed by the endpoints in the - // locality. - uint64 total_successful_requests = 2; - - // The total number of unfinished requests. A request can be an HTTP request - // or a TCP connection for a TCP connection pool. - uint64 total_requests_in_progress = 3; - - // The total number of requests that failed due to errors at the endpoint, - // aggregated over all endpoints in the locality. - uint64 total_error_requests = 4; - - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. A request can be an HTTP request - // or a TCP connection for a TCP connection pool. - uint64 total_issued_requests = 8; - - // The total number of connections in an established state at the time of the - // report. This field is aggregated over all the upstream endpoints in the - // locality. - // In Envoy, this information may be based on ``upstream_cx_active metric``. - // [#not-implemented-hide:] - uint64 total_active_connections = 9 [(xds.annotations.v3.field_status).work_in_progress = true]; - - // The total number of connections opened since the last report. - // This field is aggregated over all the upstream endpoints in the locality. - // In Envoy, this information may be based on ``upstream_cx_total`` metric - // compared to itself between start and end of an interval, i.e. - // ``upstream_cx_total``(now) - ``upstream_cx_total``(now - - // load_report_interval). - // [#not-implemented-hide:] - uint64 total_new_connections = 10 [(xds.annotations.v3.field_status).work_in_progress = true]; - - // The total number of connection failures since the last report. - // This field is aggregated over all the upstream endpoints in the locality. - // In Envoy, this information may be based on ``upstream_cx_connect_fail`` - // metric compared to itself between start and end of an interval, i.e. - // ``upstream_cx_connect_fail``(now) - ``upstream_cx_connect_fail``(now - - // load_report_interval). - // [#not-implemented-hide:] - uint64 total_fail_connections = 11 [(xds.annotations.v3.field_status).work_in_progress = true]; - - // CPU utilization stats for multi-dimensional load balancing. - // This typically comes from endpoint metrics reported via ORCA. - UnnamedEndpointLoadMetricStats cpu_utilization = 12; - - // Memory utilization for multi-dimensional load balancing. - // This typically comes from endpoint metrics reported via ORCA. - UnnamedEndpointLoadMetricStats mem_utilization = 13; - - // Blended application-defined utilization for multi-dimensional load balancing. - // This typically comes from endpoint metrics reported via ORCA. - UnnamedEndpointLoadMetricStats application_utilization = 14; - - // Named stats for multi-dimensional load balancing. - // These typically come from endpoint metrics reported via ORCA. - repeated EndpointLoadMetricStats load_metric_stats = 5; - - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - repeated UpstreamEndpointStats upstream_endpoint_stats = 7; - - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - uint32 priority = 6; -} - -// [#next-free-field: 8] -message UpstreamEndpointStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.endpoint.UpstreamEndpointStats"; - - // Upstream host address. - core.v3.Address address = 1; - - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - google.protobuf.Struct metadata = 6; - - // The total number of requests successfully completed by the endpoints in the - // locality. These include non-5xx responses for HTTP, where errors - // originate at the client and the endpoint responded successfully. For gRPC, - // the grpc-status values are those not covered by total_error_requests below. - uint64 total_successful_requests = 2; - - // The total number of unfinished requests for this endpoint. - uint64 total_requests_in_progress = 3; - - // The total number of requests that failed due to errors at the endpoint. - // For HTTP these are responses with 5xx status codes and for gRPC the - // grpc-status values: - // - // - DeadlineExceeded - // - Unimplemented - // - Internal - // - Unavailable - // - Unknown - // - DataLoss - uint64 total_error_requests = 4; - - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - uint64 total_issued_requests = 7; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; -} - -message EndpointLoadMetricStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.endpoint.EndpointLoadMetricStats"; - - // Name of the metric; may be empty. - string metric_name = 1; - - // Number of calls that finished and included this metric. - uint64 num_requests_finished_with_metric = 2; - - // Sum of metric values across all calls that finished with this metric for - // load_reporting_interval. - double total_metric_value = 3; -} - -// Same as EndpointLoadMetricStats, except without the metric_name field. -message UnnamedEndpointLoadMetricStats { - // Number of calls that finished and included this metric. - uint64 num_requests_finished_with_metric = 1; - - // Sum of metric values across all calls that finished with this metric for - // load_reporting_interval. - double total_metric_value = 2; -} - -// Per cluster load stats. Envoy reports these stats a management server in a -// :ref:`LoadStatsRequest` -// Next ID: 7 -// [#next-free-field: 7] -message ClusterStats { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.ClusterStats"; - - message DroppedRequests { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.endpoint.ClusterStats.DroppedRequests"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } - - // The name of the cluster. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - string cluster_service_name = 6; - - // Need at least one. - repeated UpstreamLocalityStats upstream_locality_stats = 2 - [(validate.rules).repeated = {min_items: 1}]; - - // Cluster-level stats such as total_successful_requests may be computed by - // summing upstream_locality_stats. In addition, below there are additional - // cluster-wide stats. - // - // The total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - uint64 total_dropped_requests = 3; - - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - repeated DroppedRequests dropped_requests = 5; - - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy - // and the ``LoadStatsResponse`` message sent from the management server, this may be longer than - // the requested load reporting interval in the ``LoadStatsResponse``. - google.protobuf.Duration load_report_interval = 4; -} diff --git a/src/main/proto/envoy/config/filter/accesslog/v2/accesslog.proto b/src/main/proto/envoy/config/filter/accesslog/v2/accesslog.proto deleted file mode 100644 index 7f38515..0000000 --- a/src/main/proto/envoy/config/filter/accesslog/v2/accesslog.proto +++ /dev/null @@ -1,257 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.accesslog.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/route/route_components.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.accesslog.v2"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2;accesslogv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.accesslog.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common access log types] - -message AccessLog { - // The name of the access log implementation to instantiate. The name must - // match a statically registered access log. Current built-in loggers include: - // - // #. "envoy.access_loggers.file" - // #. "envoy.access_loggers.http_grpc" - // #. "envoy.access_loggers.tcp_grpc" - string name = 1; - - // Filter which is used to determine if the access log needs to be written. - AccessLogFilter filter = 2; - - // Custom configuration that depends on the access log being instantiated. Built-in - // configurations include: - // - // #. "envoy.access_loggers.file": :ref:`FileAccessLog - // ` - // #. "envoy.access_loggers.http_grpc": :ref:`HttpGrpcAccessLogConfig - // ` - // #. "envoy.access_loggers.tcp_grpc": :ref:`TcpGrpcAccessLogConfig - // ` - oneof config_type { - google.protobuf.Struct config = 3 [deprecated = true]; - - google.protobuf.Any typed_config = 4; - } -} - -// [#next-free-field: 12] -message AccessLogFilter { - oneof filter_specifier { - option (validate.required) = true; - - // Status code filter. - StatusCodeFilter status_code_filter = 1; - - // Duration filter. - DurationFilter duration_filter = 2; - - // Not health check filter. - NotHealthCheckFilter not_health_check_filter = 3; - - // Traceable filter. - TraceableFilter traceable_filter = 4; - - // Runtime filter. - RuntimeFilter runtime_filter = 5; - - // And filter. - AndFilter and_filter = 6; - - // Or filter. - OrFilter or_filter = 7; - - // Header filter. - HeaderFilter header_filter = 8; - - // Response flag filter. - ResponseFlagFilter response_flag_filter = 9; - - // gRPC status filter. - GrpcStatusFilter grpc_status_filter = 10; - - // Extension filter. - ExtensionFilter extension_filter = 11; - } -} - -// Filter on an integer comparison. -message ComparisonFilter { - enum Op { - // = - EQ = 0; - - // >= - GE = 1; - - // <= - LE = 2; - } - - // Comparison operator. - Op op = 1 [(validate.rules).enum = {defined_only: true}]; - - // Value to compare against. - api.v2.core.RuntimeUInt32 value = 2; -} - -// Filters on HTTP response/status code. -message StatusCodeFilter { - // Comparison. - ComparisonFilter comparison = 1 [(validate.rules).message = {required: true}]; -} - -// Filters on total request duration in milliseconds. -message DurationFilter { - // Comparison. - ComparisonFilter comparison = 1 [(validate.rules).message = {required: true}]; -} - -// Filters for requests that are not health check requests. A health check -// request is marked by the health check filter. -message NotHealthCheckFilter { -} - -// Filters for requests that are traceable. See the tracing overview for more -// information on how a request becomes traceable. -message TraceableFilter { -} - -// Filters for random sampling of requests. -message RuntimeFilter { - // Runtime key to get an optional overridden numerator for use in the *percent_sampled* field. - // If found in runtime, this value will replace the default numerator. - string runtime_key = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The default sampling percentage. If not specified, defaults to 0% with denominator of 100. - type.FractionalPercent percent_sampled = 2; - - // By default, sampling pivots on the header - // :ref:`x-request-id` being present. If - // :ref:`x-request-id` is present, the filter will - // consistently sample across multiple hosts based on the runtime key value and the value - // extracted from :ref:`x-request-id`. If it is - // missing, or *use_independent_randomness* is set to true, the filter will randomly sample based - // on the runtime key value alone. *use_independent_randomness* can be used for logging kill - // switches within complex nested :ref:`AndFilter - // ` and :ref:`OrFilter - // ` blocks that are easier to reason about - // from a probability perspective (i.e., setting to true will cause the filter to behave like - // an independent random variable when composed within logical operator filters). - bool use_independent_randomness = 3; -} - -// Performs a logical “and” operation on the result of each filter in filters. -// Filters are evaluated sequentially and if one of them returns false, the -// filter returns false immediately. -message AndFilter { - repeated AccessLogFilter filters = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// Performs a logical “or” operation on the result of each individual filter. -// Filters are evaluated sequentially and if one of them returns true, the -// filter returns true immediately. -message OrFilter { - repeated AccessLogFilter filters = 2 [(validate.rules).repeated = {min_items: 2}]; -} - -// Filters requests based on the presence or value of a request header. -message HeaderFilter { - // Only requests with a header which matches the specified HeaderMatcher will pass the filter - // check. - api.v2.route.HeaderMatcher header = 1 [(validate.rules).message = {required: true}]; -} - -// Filters requests that received responses with an Envoy response flag set. -// A list of the response flags can be found -// in the access log formatter :ref:`documentation`. -message ResponseFlagFilter { - // Only responses with the any of the flags listed in this field will be logged. - // This field is optional. If it is not specified, then any response flag will pass - // the filter check. - repeated string flags = 1 [(validate.rules).repeated = { - items { - string { - in: "LH" - in: "UH" - in: "UT" - in: "LR" - in: "UR" - in: "UF" - in: "UC" - in: "UO" - in: "NR" - in: "DI" - in: "FI" - in: "RL" - in: "UAEX" - in: "RLSE" - in: "DC" - in: "URX" - in: "SI" - in: "IH" - in: "DPE" - } - } - }]; -} - -// Filters gRPC requests based on their response status. If a gRPC status is not provided, the -// filter will infer the status from the HTTP status code. -message GrpcStatusFilter { - enum Status { - OK = 0; - CANCELED = 1; - UNKNOWN = 2; - INVALID_ARGUMENT = 3; - DEADLINE_EXCEEDED = 4; - NOT_FOUND = 5; - ALREADY_EXISTS = 6; - PERMISSION_DENIED = 7; - RESOURCE_EXHAUSTED = 8; - FAILED_PRECONDITION = 9; - ABORTED = 10; - OUT_OF_RANGE = 11; - UNIMPLEMENTED = 12; - INTERNAL = 13; - UNAVAILABLE = 14; - DATA_LOSS = 15; - UNAUTHENTICATED = 16; - } - - // Logs only responses that have any one of the gRPC statuses in this field. - repeated Status statuses = 1 [(validate.rules).repeated = {items {enum {defined_only: true}}}]; - - // If included and set to true, the filter will instead block all responses with a gRPC status or - // inferred gRPC status enumerated in statuses, and allow all other responses. - bool exclude = 2; -} - -// Extension filter is statically registered at runtime. -message ExtensionFilter { - // The name of the filter implementation to instantiate. The name must - // match a statically registered filter. - string name = 1; - - // Custom configuration that depends on the filter being instantiated. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } -} diff --git a/src/main/proto/envoy/config/filter/dubbo/router/v2alpha1/router.proto b/src/main/proto/envoy/config/filter/dubbo/router/v2alpha1/router.proto deleted file mode 100644 index 0c92db6..0000000 --- a/src/main/proto/envoy/config/filter/dubbo/router/v2alpha1/router.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.dubbo.router.v2alpha1; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.dubbo.router.v2alpha1"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/dubbo/router/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.dubbo_proxy.router.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Router] -// Dubbo router :ref:`configuration overview `. - -message Router { -} diff --git a/src/main/proto/envoy/config/filter/fault/v2/fault.proto b/src/main/proto/envoy/config/filter/fault/v2/fault.proto deleted file mode 100644 index d23e50b..0000000 --- a/src/main/proto/envoy/config/filter/fault/v2/fault.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.fault.v2; - -import "envoy/type/percent.proto"; - -import "google/protobuf/duration.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.fault.v2"; -option java_outer_classname = "FaultProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/fault/v2;faultv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.common.fault.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common fault injection types] - -// Delay specification is used to inject latency into the -// HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections. -// [#next-free-field: 6] -message FaultDelay { - enum FaultDelayType { - // Unused and deprecated. - FIXED = 0; - } - - // Fault delays are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderDelay { - } - - reserved 2; - - // Unused and deprecated. Will be removed in the next release. - FaultDelayType type = 1 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - oneof fault_delay_secifier { - option (validate.required) = true; - - // Add a fixed delay before forwarding the operation upstream. See - // https://developers.google.com/protocol-buffers/docs/proto3#json for - // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified - // delay will be injected before a new request/operation. For TCP - // connections, the proxying of the connection upstream will be delayed - // for the specified period. This is required if type is FIXED. - google.protobuf.Duration fixed_delay = 3 [(validate.rules).duration = {gt {}}]; - - // Fault delays are controlled via an HTTP header (if applicable). - HeaderDelay header_delay = 5; - } - - // The percentage of operations/connections/requests on which the delay will be injected. - type.FractionalPercent percentage = 4; -} - -// Describes a rate limit to be applied. -message FaultRateLimit { - // Describes a fixed/constant rate limit. - message FixedLimit { - // The limit supplied in KiB/s. - uint64 limit_kbps = 1 [(validate.rules).uint64 = {gte: 1}]; - } - - // Rate limits are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderLimit { - } - - oneof limit_type { - option (validate.required) = true; - - // A fixed rate limit. - FixedLimit fixed_limit = 1; - - // Rate limits are controlled via an HTTP header (if applicable). - HeaderLimit header_limit = 3; - } - - // The percentage of operations/connections/requests on which the rate limit will be injected. - type.FractionalPercent percentage = 2; -} diff --git a/src/main/proto/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto b/src/main/proto/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto deleted file mode 100644 index 26d5dbf..0000000 --- a/src/main/proto/envoy/config/filter/http/adaptive_concurrency/v2alpha/adaptive_concurrency.proto +++ /dev/null @@ -1,95 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.adaptive_concurrency.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.adaptive_concurrency.v2alpha"; -option java_outer_classname = "AdaptiveConcurrencyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/adaptive_concurrency/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.adaptive_concurrency.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Adaptive Concurrency] -// Adaptive Concurrency Control :ref:`configuration overview -// `. -// [#extension: envoy.filters.http.adaptive_concurrency] - -// Configuration parameters for the gradient controller. -message GradientControllerConfig { - // Parameters controlling the periodic recalculation of the concurrency limit from sampled request - // latencies. - message ConcurrencyLimitCalculationParams { - // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. - google.protobuf.UInt32Value max_concurrency_limit = 2 [(validate.rules).uint32 = {gt: 0}]; - - // The period of time samples are taken to recalculate the concurrency limit. - google.protobuf.Duration concurrency_update_interval = 3 [(validate.rules).duration = { - required: true - gt {} - }]; - } - - // Parameters controlling the periodic minRTT recalculation. - // [#next-free-field: 6] - message MinimumRTTCalculationParams { - // The time interval between recalculating the minimum request round-trip time. - google.protobuf.Duration interval = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // The number of requests to aggregate/sample during the minRTT recalculation window before - // updating. Defaults to 50. - google.protobuf.UInt32Value request_count = 2 [(validate.rules).uint32 = {gt: 0}]; - - // Randomized time delta that will be introduced to the start of the minRTT calculation window. - // This is represented as a percentage of the interval duration. Defaults to 15%. - // - // Example: If the interval is 10s and the jitter is 15%, the next window will begin - // somewhere in the range (10s - 11.5s). - type.Percent jitter = 3; - - // The concurrency limit set while measuring the minRTT. Defaults to 3. - google.protobuf.UInt32Value min_concurrency = 4 [(validate.rules).uint32 = {gt: 0}]; - - // Amount added to the measured minRTT to add stability to the concurrency limit during natural - // variability in latency. This is expressed as a percentage of the measured value and can be - // adjusted to allow more or less tolerance to the sampled latency values. - // - // Defaults to 25%. - type.Percent buffer = 5; - } - - // The percentile to use when summarizing aggregated samples. Defaults to p50. - type.Percent sample_aggregate_percentile = 1; - - ConcurrencyLimitCalculationParams concurrency_limit_params = 2 - [(validate.rules).message = {required: true}]; - - MinimumRTTCalculationParams min_rtt_calc_params = 3 [(validate.rules).message = {required: true}]; -} - -message AdaptiveConcurrency { - oneof concurrency_controller_config { - option (validate.required) = true; - - // Gradient concurrency control will be used. - GradientControllerConfig gradient_controller_config = 1 - [(validate.rules).message = {required: true}]; - } - - // If set to false, the adaptive concurrency filter will operate as a pass-through filter. If the - // message is unspecified, the filter will be enabled. - api.v2.core.RuntimeFeatureFlag enabled = 2; -} diff --git a/src/main/proto/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto b/src/main/proto/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto deleted file mode 100644 index 4131578..0000000 --- a/src/main/proto/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.aws_lambda.v2alpha; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.aws_lambda.v2alpha"; -option java_outer_classname = "AwsLambdaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/aws_lambda/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.aws_lambda.v3"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: AWS Lambda] -// AWS Lambda :ref:`configuration overview `. -// [#extension: envoy.filters.http.aws_lambda] - -// AWS Lambda filter config -message Config { - enum InvocationMode { - // This is the more common mode of invocation, in which Lambda responds after it has completed the function. In - // this mode the output of the Lambda function becomes the response of the HTTP request. - SYNCHRONOUS = 0; - - // In this mode Lambda responds immediately but continues to process the function asynchronously. This mode can be - // used to signal events for example. In this mode, Lambda responds with an acknowledgment that it received the - // call which is translated to an HTTP 200 OK by the filter. - ASYNCHRONOUS = 1; - } - - // The ARN of the AWS Lambda to invoke when the filter is engaged - // Must be in the following format: - // arn::lambda:::function: - string arn = 1 [(validate.rules).string = {min_len: 1}]; - - // Whether to transform the request (headers and body) to a JSON payload or pass it as is. - bool payload_passthrough = 2; - - // Determines the way to invoke the Lambda function. - InvocationMode invocation_mode = 3 [(validate.rules).enum = {defined_only: true}]; -} - -// Per-route configuration for AWS Lambda. This can be useful when invoking a different Lambda function or a different -// version of the same Lambda depending on the route. -message PerRouteConfig { - Config invoke_config = 1; -} diff --git a/src/main/proto/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto b/src/main/proto/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto deleted file mode 100644 index d76ea9d..0000000 --- a/src/main/proto/envoy/config/filter/http/aws_request_signing/v2alpha/aws_request_signing.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.aws_request_signing.v2alpha; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.aws_request_signing.v2alpha"; -option java_outer_classname = "AwsRequestSigningProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/aws_request_signing/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.aws_request_signing.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: AwsRequestSigning] -// AwsRequestSigning :ref:`configuration overview `. -// [#extension: envoy.filters.http.aws_request_signing] - -// Top level configuration for the AWS request signing filter. -message AwsRequestSigning { - // The `service namespace - // `_ - // of the HTTP endpoint. - // - // Example: s3 - string service_name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The `region `_ hosting the HTTP - // endpoint. - // - // Example: us-west-2 - string region = 2 [(validate.rules).string = {min_bytes: 1}]; - - // Indicates that before signing headers, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - // - // Note: this rewrite affects both signing and host header forwarding. However, this - // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the - // value set here would be used for signing whereas the value set in the HCM would be used - // for host header forwarding which is not the desired outcome. - string host_rewrite = 3; -} diff --git a/src/main/proto/envoy/config/filter/http/buffer/v2/buffer.proto b/src/main/proto/envoy/config/filter/http/buffer/v2/buffer.proto deleted file mode 100644 index 3be47da..0000000 --- a/src/main/proto/envoy/config/filter/http/buffer/v2/buffer.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.buffer.v2; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.buffer.v2"; -option java_outer_classname = "BufferProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/buffer/v2;bufferv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.buffer.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Buffer] -// Buffer :ref:`configuration overview `. -// [#extension: envoy.filters.http.buffer] - -message Buffer { - reserved 2; - - // The maximum request size that the filter will buffer before the connection - // manager will stop buffering and return a 413 response. - google.protobuf.UInt32Value max_request_bytes = 1 - [(validate.rules).uint32 = {gt: 0}, (validate.rules).message = {required: true}]; -} - -message BufferPerRoute { - oneof override { - option (validate.required) = true; - - // Disable the buffer filter for this particular vhost or route. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Override the global configuration of the filter with this new config. - Buffer buffer = 2 [(validate.rules).message = {required: true}]; - } -} diff --git a/src/main/proto/envoy/config/filter/http/cache/v2alpha/cache.proto b/src/main/proto/envoy/config/filter/http/cache/v2alpha/cache.proto deleted file mode 100644 index 3d74335..0000000 --- a/src/main/proto/envoy/config/filter/http/cache/v2alpha/cache.proto +++ /dev/null @@ -1,78 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.cache.v2alpha; - -import "envoy/api/v2/route/route_components.proto"; -import "envoy/type/matcher/string.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.cache.v2alpha"; -option java_outer_classname = "CacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/cache/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.cache.v3alpha"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP Cache Filter] -// [#extension: envoy.filters.http.cache] - -message CacheConfig { - // [#not-implemented-hide:] - // Modifies cache key creation by restricting which parts of the URL are included. - message KeyCreatorParams { - // If true, exclude the URL scheme from the cache key. Set to true if your origins always - // produce the same response for http and https requests. - bool exclude_scheme = 1; - - // If true, exclude the host from the cache key. Set to true if your origins' responses don't - // ever depend on host. - bool exclude_host = 2; - - // If *query_parameters_included* is nonempty, only query parameters matched - // by one or more of its matchers are included in the cache key. Any other - // query params will not affect cache lookup. - repeated api.v2.route.QueryParameterMatcher query_parameters_included = 3; - - // If *query_parameters_excluded* is nonempty, query parameters matched by one - // or more of its matchers are excluded from the cache key (even if also - // matched by *query_parameters_included*), and will not affect cache lookup. - repeated api.v2.route.QueryParameterMatcher query_parameters_excluded = 4; - } - - // Config specific to the cache storage implementation. - google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}]; - - // List of matching rules that defines allowed *Vary* headers. - // - // The *vary* response header holds a list of header names that affect the - // contents of a response, as described by - // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. - // - // During insertion, *allowed_vary_headers* acts as a allowlist: if a - // response's *vary* header mentions any header names that aren't matched by any rules in - // *allowed_vary_headers*, that response will not be cached. - // - // During lookup, *allowed_vary_headers* controls what request headers will be - // sent to the cache storage implementation. - repeated type.matcher.StringMatcher allowed_vary_headers = 2; - - // [#not-implemented-hide:] - // - // - // Modifies cache key creation by restricting which parts of the URL are included. - KeyCreatorParams key_creator_params = 3; - - // [#not-implemented-hide:] - // - // - // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache - // storage implementation may have its own limit beyond which it will reject insertions). - uint32 max_body_bytes = 4; -} diff --git a/src/main/proto/envoy/config/filter/http/compressor/v2/compressor.proto b/src/main/proto/envoy/config/filter/http/compressor/v2/compressor.proto deleted file mode 100644 index 441edff..0000000 --- a/src/main/proto/envoy/config/filter/http/compressor/v2/compressor.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.compressor.v2; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.compressor.v2"; -option java_outer_classname = "CompressorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/compressor/v2;compressorv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.compressor.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Compressor] - -// [#next-free-field: 6] -message Compressor { - // Minimum response length, in bytes, which will trigger compression. The default value is 30. - google.protobuf.UInt32Value content_length = 1; - - // Set of strings that allows specifying which mime-types yield compression; e.g., - // application/json, text/html, etc. When this field is not defined, compression will be applied - // to the following mime-types: "application/javascript", "application/json", - // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" - // and their synonyms. - repeated string content_type = 2; - - // If true, disables compression when the response contains an etag header. When it is false, the - // filter will preserve weak etags and remove the ones that require strong validation. - bool disable_on_etag_header = 3; - - // If true, removes accept-encoding from the request headers before dispatching it to the upstream - // so that responses do not get compressed before reaching the filter. - // .. attention: - // - // To avoid interfering with other compression filters in the same chain use this option in - // the filter closest to the upstream. - bool remove_accept_encoding_header = 4; - - // Runtime flag that controls whether the filter is enabled or not. If set to false, the - // filter will operate as a pass-through filter. If not specified, defaults to enabled. - api.v2.core.RuntimeFeatureFlag runtime_enabled = 5; -} diff --git a/src/main/proto/envoy/config/filter/http/cors/v2/cors.proto b/src/main/proto/envoy/config/filter/http/cors/v2/cors.proto deleted file mode 100644 index 80c91de..0000000 --- a/src/main/proto/envoy/config/filter/http/cors/v2/cors.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.cors.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.cors.v2"; -option java_outer_classname = "CorsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/cors/v2;corsv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.cors.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Cors] -// CORS Filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.cors] - -// Cors filter config. -message Cors { -} diff --git a/src/main/proto/envoy/config/filter/http/csrf/v2/csrf.proto b/src/main/proto/envoy/config/filter/http/csrf/v2/csrf.proto deleted file mode 100644 index d2e02dc..0000000 --- a/src/main/proto/envoy/config/filter/http/csrf/v2/csrf.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.csrf.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/type/matcher/string.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.csrf.v2"; -option java_outer_classname = "CsrfProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/csrf/v2;csrfv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.csrf.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: CSRF] -// Cross-Site Request Forgery :ref:`configuration overview `. -// [#extension: envoy.filters.http.csrf] - -// CSRF filter config. -message CsrfPolicy { - // Specifies the % of requests for which the CSRF filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - api.v2.core.RuntimeFractionalPercent filter_enabled = 1 - [(validate.rules).message = {required: true}]; - - // Specifies that CSRF policies will be evaluated and tracked, but not enforced. - // - // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's *Origin* and *Destination* to determine if it's valid, but will not - // enforce any policies. - api.v2.core.RuntimeFractionalPercent shadow_enabled = 2; - - // Specifies additional source origins that will be allowed in addition to - // the destination origin. - // - // More information on how this can be configured via runtime can be found - // :ref:`here `. - repeated type.matcher.StringMatcher additional_origins = 3; -} diff --git a/src/main/proto/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto b/src/main/proto/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto deleted file mode 100644 index 4e28b9b..0000000 --- a/src/main/proto/envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.dynamic_forward_proxy.v2alpha; - -import "envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.dynamic_forward_proxy.v2alpha"; -option java_outer_classname = "DynamicForwardProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/dynamic_forward_proxy/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.dynamic_forward_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dynamic forward proxy] - -// Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview -// ` for more information. -// [#extension: envoy.filters.http.dynamic_forward_proxy] -message FilterConfig { - // The DNS cache configuration that the filter will attach to. Note this configuration must - // match that of associated :ref:`dynamic forward proxy cluster configuration - // `. - common.dynamic_forward_proxy.v2alpha.DnsCacheConfig dns_cache_config = 1 - [(validate.rules).message = {required: true}]; -} - -// Per route Configuration for the dynamic forward proxy HTTP filter. -message PerRouteConfig { - oneof host_rewrite_specifier { - // Indicates that before DNS lookup, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - // - // Note: this rewrite affects both DNS lookup and host header forwarding. However, this - // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the - // value set here would be used for DNS lookups whereas the value set in the HCM would be used - // for host header forwarding which is not the desired outcome. - string host_rewrite = 1 [(udpa.annotations.field_migrate).rename = "host_rewrite_literal"]; - - // Indicates that before DNS lookup, the host header will be swapped with - // the value of this header. If not set or empty, the original host header - // value will be used and no rewrite will happen. - // - // Note: this rewrite affects both DNS lookup and host header forwarding. However, this - // option shouldn't be used with - // :ref:`HCM host rewrite header ` - // given that the value set here would be used for DNS lookups whereas the value set in the HCM - // would be used for host header forwarding which is not the desired outcome. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string auto_host_rewrite_header = 2 - [(udpa.annotations.field_migrate).rename = "host_rewrite_header"]; - } -} diff --git a/src/main/proto/envoy/config/filter/http/dynamo/v2/dynamo.proto b/src/main/proto/envoy/config/filter/http/dynamo/v2/dynamo.proto deleted file mode 100644 index 5aa885c..0000000 --- a/src/main/proto/envoy/config/filter/http/dynamo/v2/dynamo.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.dynamo.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.dynamo.v2"; -option java_outer_classname = "DynamoProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/dynamo/v2;dynamov2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.dynamo.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dynamo] -// Dynamo :ref:`configuration overview `. -// [#extension: envoy.filters.http.dynamo] - -// Dynamo filter config. -message Dynamo { -} diff --git a/src/main/proto/envoy/config/filter/http/ext_authz/v2/ext_authz.proto b/src/main/proto/envoy/config/filter/http/ext_authz/v2/ext_authz.proto deleted file mode 100644 index c79dd4a..0000000 --- a/src/main/proto/envoy/config/filter/http/ext_authz/v2/ext_authz.proto +++ /dev/null @@ -1,235 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.ext_authz.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/grpc_service.proto"; -import "envoy/api/v2/core/http_uri.proto"; -import "envoy/type/http_status.proto"; -import "envoy/type/matcher/string.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.ext_authz.v2"; -option java_outer_classname = "ExtAuthzProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/ext_authz/v2;ext_authzv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.ext_authz.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: External Authorization] -// External Authorization :ref:`configuration overview `. -// [#extension: envoy.filters.http.ext_authz] - -// [#next-free-field: 12] -message ExtAuthz { - // External authorization service configuration. - oneof services { - // gRPC service configuration (default timeout: 200ms). - api.v2.core.GrpcService grpc_service = 1; - - // HTTP service configuration (default timeout: 200ms). - HttpService http_service = 3; - } - - // Changes filter's behaviour on errors: - // - // 1. When set to true, the filter will *accept* client request even if the communication with - // the authorization service has failed, or if the authorization service has returned a HTTP 5xx - // error. - // - // 2. When set to false, ext-authz will *reject* client requests and return a *Forbidden* - // response if the communication with the authorization service has failed, or if the - // authorization service has returned a HTTP 5xx error. - // - // Note that errors can be *always* tracked in the :ref:`stats - // `. - bool failure_mode_allow = 2; - - // [#not-implemented-hide: Support for this field has been removed.] - bool use_alpha = 4 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Enables filter to buffer the client request body and send it within the authorization request. - // A ``x-envoy-auth-partial-body: false|true`` metadata header will be added to the authorization - // request message indicating if the body data is partial. - BufferSettings with_request_body = 5; - - // Clears route cache in order to allow the external authorization service to correctly affect - // routing decisions. Filter clears all cached routes when: - // - // 1. The field is set to *true*. - // - // 2. The status returned from the authorization service is a HTTP 200 or gRPC 0. - // - // 3. At least one *authorization response header* is added to the client request, or is used for - // altering another client request header. - // - bool clear_route_cache = 6; - - // Sets the HTTP status that is returned to the client when there is a network error between the - // filter and the authorization server. The default status is HTTP 403 Forbidden. - type.HttpStatus status_on_error = 7; - - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service as an opaque *protobuf::Struct*. - // - // For example, if the *jwt_authn* filter is used and :ref:`payload_in_metadata - // ` is set, - // then the following will pass the jwt payload to the authorization server. - // - // .. code-block:: yaml - // - // metadata_context_namespaces: - // - envoy.filters.http.jwt_authn - // - repeated string metadata_context_namespaces = 8; - - // Specifies if the filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // If this field is not specified, the filter will be enabled for all requests. - api.v2.core.RuntimeFractionalPercent filter_enabled = 9; - - // Specifies whether to deny the requests, when the filter is disabled. - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to determine whether to deny request for - // filter protected path at filter disabling. If filter is disabled in - // typed_per_filter_config for the path, requests will not be denied. - // - // If this field is not specified, all requests will be allowed when disabled. - api.v2.core.RuntimeFeatureFlag deny_at_disable = 11; - - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - bool include_peer_certificate = 10; -} - -// Configuration for buffering the request data. -message BufferSettings { - // Sets the maximum size of a message body that the filter will hold in memory. Envoy will return - // *HTTP 413* and will *not* initiate the authorization process when buffer reaches the number - // set in this field. Note that this setting will have precedence over :ref:`failure_mode_allow - // `. - uint32 max_request_bytes = 1 [(validate.rules).uint32 = {gt: 0}]; - - // When this field is true, Envoy will buffer the message until *max_request_bytes* is reached. - // The authorization request will be dispatched and no 413 HTTP error will be returned by the - // filter. - bool allow_partial_message = 2; -} - -// HttpService is used for raw HTTP communication between the filter and the authorization service. -// When configured, the filter will parse the client request and use these attributes to call the -// authorization server. Depending on the response, the filter may reject or accept the client -// request. Note that in any of these events, metadata can be added, removed or overridden by the -// filter: -// -// *On authorization request*, a list of allowed request headers may be supplied. See -// :ref:`allowed_headers -// ` -// for details. Additional headers metadata may be added to the authorization request. See -// :ref:`headers_to_add -// ` for -// details. -// -// On authorization response status HTTP 200 OK, the filter will allow traffic to the upstream and -// additional headers metadata may be added to the original client request. See -// :ref:`allowed_upstream_headers -// ` -// for details. -// -// On other authorization response statuses, the filter will not allow traffic. Additional headers -// metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers -// ` -// for details. -// [#next-free-field: 9] -message HttpService { - reserved 3, 4, 5, 6; - - // Sets the HTTP server URI which the authorization requests must be sent to. - api.v2.core.HttpUri server_uri = 1; - - // Sets a prefix to the value of authorization request header *Path*. - string path_prefix = 2; - - // Settings used for controlling authorization request metadata. - AuthorizationRequest authorization_request = 7; - - // Settings used for controlling authorization response metadata. - AuthorizationResponse authorization_response = 8; -} - -message AuthorizationRequest { - // Authorization request will include the client request headers that have a correspondent match - // in the :ref:`list `. Note that in addition to the - // user's supplied matchers: - // - // 1. *Host*, *Method*, *Path* and *Content-Length* are automatically included to the list. - // - // 2. *Content-Length* will be set to 0 and the request to the authorization service will not have - // a message body. However, the authorization request can include the buffered client request body - // (controlled by :ref:`with_request_body - // ` setting), - // consequently the value of *Content-Length* of the authorization request reflects the size of - // its payload size. - // - type.matcher.ListStringMatcher allowed_headers = 1; - - // Sets a list of headers that will be included to the request to authorization service. Note that - // client request of the same key will be overridden. - repeated api.v2.core.HeaderValue headers_to_add = 2; -} - -message AuthorizationResponse { - // When this :ref:`list ` is set, authorization - // response headers that have a correspondent match will be added to the original client request. - // Note that coexistent headers will be overridden. - type.matcher.ListStringMatcher allowed_upstream_headers = 1; - - // When this :ref:`list ` is set, authorization - // response headers that have a correspondent match will be added to the client's response. Note - // that when this list is *not* set, all the authorization response headers, except *Authority - // (Host)* will be in the response to the client. When a header is included in this list, *Path*, - // *Status*, *Content-Length*, *WWWAuthenticate* and *Location* are automatically added. - type.matcher.ListStringMatcher allowed_client_headers = 2; -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -message ExtAuthzPerRoute { - oneof override { - option (validate.required) = true; - - // Disable the ext auth filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Check request settings for this route. - CheckSettings check_settings = 2 [(validate.rules).message = {required: true}]; - } -} - -// Extra settings for the check request. You can use this to provide extra context for the -// external authorization server on specific virtual hosts \ routes. For example, adding a context -// extension on the virtual host level can give the ext-authz server information on what virtual -// host is used without needing to parse the host header. If CheckSettings is specified in multiple -// per-filter-configs, they will be merged in order, and the result will be used. -message CheckSettings { - // Context extensions to set on the CheckRequest's - // :ref:`AttributeContext.context_extensions` - // - // Merge semantics for this field are such that keys from more specific configs override. - // - // .. note:: - // - // These settings are only applied to a filter configured with a - // :ref:`grpc_service`. - map context_extensions = 1; -} diff --git a/src/main/proto/envoy/config/filter/http/fault/v2/fault.proto b/src/main/proto/envoy/config/filter/http/fault/v2/fault.proto deleted file mode 100644 index 109dfb4..0000000 --- a/src/main/proto/envoy/config/filter/http/fault/v2/fault.proto +++ /dev/null @@ -1,130 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.fault.v2; - -import "envoy/api/v2/route/route_components.proto"; -import "envoy/config/filter/fault/v2/fault.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.fault.v2"; -option java_outer_classname = "FaultProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/fault/v2;faultv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.fault.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Fault Injection] -// Fault Injection :ref:`configuration overview `. -// [#extension: envoy.filters.http.fault] - -message FaultAbort { - // Fault aborts are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderAbort { - } - - reserved 1; - - oneof error_type { - option (validate.required) = true; - - // HTTP status code to use to abort the HTTP request. - uint32 http_status = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // Fault aborts are controlled via an HTTP header (if applicable). - HeaderAbort header_abort = 4; - } - - // The percentage of requests/operations/connections that will be aborted with the error code - // provided. - type.FractionalPercent percentage = 3; -} - -// [#next-free-field: 14] -message HTTPFault { - // If specified, the filter will inject delays based on the values in the - // object. - filter.fault.v2.FaultDelay delay = 1; - - // If specified, the filter will abort requests based on the values in - // the object. At least *abort* or *delay* must be specified. - FaultAbort abort = 2; - - // Specifies the name of the (destination) upstream cluster that the - // filter should match on. Fault injection will be restricted to requests - // bound to the specific upstream cluster. - string upstream_cluster = 3; - - // Specifies a set of headers that the filter should match on. The fault - // injection filter can be applied selectively to requests that match a set of - // headers specified in the fault filter config. The chances of actual fault - // injection further depend on the value of the :ref:`percentage - // ` field. - // The filter will check the request's headers against all the specified - // headers in the filter config. A match will happen if all the headers in the - // config are present in the request with the same values (or based on - // presence if the *value* field is not in the config). - repeated api.v2.route.HeaderMatcher headers = 4; - - // Faults are injected for the specified list of downstream hosts. If this - // setting is not set, faults are injected for all downstream nodes. - // Downstream node name is taken from :ref:`the HTTP - // x-envoy-downstream-service-node - // ` header and compared - // against downstream_nodes list. - repeated string downstream_nodes = 5; - - // The maximum number of faults that can be active at a single time via the configured fault - // filter. Note that because this setting can be overridden at the route level, it's possible - // for the number of active faults to be greater than this value (if injected via a different - // route). If not specified, defaults to unlimited. This setting can be overridden via - // `runtime ` and any faults that are not injected - // due to overflow will be indicated via the `faults_overflow - // ` stat. - // - // .. attention:: - // Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy - // limit. It's possible for the number of active faults to rise slightly above the configured - // amount due to the implementation details. - google.protobuf.UInt32Value max_active_faults = 6; - - // The response rate limit to be applied to the response body of the stream. When configured, - // the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent - // ` runtime key. - // - // .. attention:: - // This is a per-stream limit versus a connection level limit. This means that concurrent streams - // will each get an independent limit. - filter.fault.v2.FaultRateLimit response_rate_limit = 7; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_delay_percent - string delay_percent_runtime = 8; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.abort_percent - string abort_percent_runtime = 9; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_duration_ms - string delay_duration_runtime = 10; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.http_status - string abort_http_status_runtime = 11; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.max_active_faults - string max_active_faults_runtime = 12; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.rate_limit.response_percent - string response_rate_limit_percent_runtime = 13; -} diff --git a/src/main/proto/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto b/src/main/proto/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto deleted file mode 100644 index 18c057e..0000000 --- a/src/main/proto/envoy/config/filter/http/grpc_http1_bridge/v2/config.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.grpc_http1_bridge.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_http1_bridge.v2"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_http1_bridge/v2;grpc_http1_bridgev2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.grpc_http1_bridge.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC HTTP/1.1 Bridge] -// gRPC HTTP/1.1 Bridge Filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_http1_bridge] - -// gRPC HTTP/1.1 Bridge filter config. -message Config { -} diff --git a/src/main/proto/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto b/src/main/proto/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto deleted file mode 100644 index 0200ec8..0000000 --- a/src/main/proto/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1/config.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_http1_reverse_bridge/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC HTTP/1.1 Reverse Bridge] -// gRPC HTTP/1.1 Reverse Bridge :ref:`configuration overview -// `. -// [#extension: envoy.filters.http.grpc_http1_reverse_bridge] - -// gRPC reverse bridge filter configuration -message FilterConfig { - // The content-type to pass to the upstream when the gRPC bridge filter is applied. - // The filter will also validate that the upstream responds with the same content type. - string content_type = 1 [(validate.rules).string = {min_bytes: 1}]; - - // If true, Envoy will assume that the upstream doesn't understand gRPC frames and - // strip the gRPC frame from the request, and add it back in to the response. This will - // hide the gRPC semantics from the upstream, allowing it to receive and respond with a - // simple binary encoded protobuf. - bool withhold_grpc_frames = 2; -} - -// gRPC reverse bridge filter configuration per virtualhost/route/weighted-cluster level. -message FilterConfigPerRoute { - // If true, disables gRPC reverse bridge filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1; -} diff --git a/src/main/proto/envoy/config/filter/http/grpc_stats/v2alpha/config.proto b/src/main/proto/envoy/config/filter/http/grpc_stats/v2alpha/config.proto deleted file mode 100644 index 9d1452a..0000000 --- a/src/main/proto/envoy/config/filter/http/grpc_stats/v2alpha/config.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.grpc_stats.v2alpha; - -import "envoy/api/v2/core/grpc_method_list.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_stats.v2alpha"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_stats/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.grpc_stats.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC statistics] gRPC statistics filter -// :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_stats] - -// gRPC statistics filter configuration -message FilterConfig { - // If true, the filter maintains a filter state object with the request and response message - // counts. - bool emit_filter_state = 1; - - oneof per_method_stat_specifier { - // If set, specifies an allowlist of service/methods that will have individual stats - // emitted for them. Any call that does not match the allowlist will be counted - // in a stat with no method specifier: `cluster..grpc.*`. - api.v2.core.GrpcMethodList individual_method_stats_allowlist = 2; - - // If set to true, emit stats for all service/method names. - // - // If set to false, emit stats for all service/message types to the same stats without including - // the service/method in the name, with prefix `cluster..grpc`. This can be useful if - // service/method granularity is not needed, or if each cluster only receives a single method. - // - // .. attention:: - // This option is only safe if all clients are trusted. If this option is enabled - // with untrusted clients, the clients could cause unbounded growth in the number of stats in - // Envoy, using unbounded memory and potentially slowing down stats pipelines. - // - // .. attention:: - // If neither `individual_method_stats_allowlist` nor `stats_for_all_methods` is set, the - // behavior will default to `stats_for_all_methods=false`. - google.protobuf.BoolValue stats_for_all_methods = 3; - } -} - -// gRPC statistics filter state object in protobuf form. -message FilterObject { - // Count of request messages in the request stream. - uint64 request_message_count = 1; - - // Count of response messages in the response stream. - uint64 response_message_count = 2; -} diff --git a/src/main/proto/envoy/config/filter/http/grpc_web/v2/grpc_web.proto b/src/main/proto/envoy/config/filter/http/grpc_web/v2/grpc_web.proto deleted file mode 100644 index 0be39a1..0000000 --- a/src/main/proto/envoy/config/filter/http/grpc_web/v2/grpc_web.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.grpc_web.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_web.v2"; -option java_outer_classname = "GrpcWebProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/grpc_web/v2;grpc_webv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.grpc_web.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC Web] -// gRPC Web :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_web] - -// gRPC Web filter config. -message GrpcWeb { -} diff --git a/src/main/proto/envoy/config/filter/http/gzip/v2/gzip.proto b/src/main/proto/envoy/config/filter/http/gzip/v2/gzip.proto deleted file mode 100644 index 0ff02f0..0000000 --- a/src/main/proto/envoy/config/filter/http/gzip/v2/gzip.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.gzip.v2; - -import "envoy/config/filter/http/compressor/v2/compressor.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.gzip.v2"; -option java_outer_classname = "GzipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/gzip/v2;gzipv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.gzip.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Gzip] - -// [#next-free-field: 11] -message Gzip { - enum CompressionStrategy { - DEFAULT = 0; - FILTERED = 1; - HUFFMAN = 2; - RLE = 3; - } - - message CompressionLevel { - enum Enum { - DEFAULT = 0; - BEST = 1; - SPEED = 2; - } - } - - // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values - // use more memory, but are faster and produce better compression results. The default value is 5. - google.protobuf.UInt32Value memory_level = 1 [(validate.rules).uint32 = {lte: 9 gte: 1}]; - - // Minimum response length, in bytes, which will trigger compression. The default value is 30. - // .. attention: - // - // **This field is deprecated**. Set the `compressor` field instead. - google.protobuf.UInt32Value content_length = 2 [deprecated = true]; - - // A value used for selecting the zlib compression level. This setting will affect speed and - // amount of compression applied to the content. "BEST" provides higher compression at the cost of - // higher latency, "SPEED" provides lower compression with minimum impact on response time. - // "DEFAULT" provides an optimal result between speed and compression. This field will be set to - // "DEFAULT" if not specified. - CompressionLevel.Enum compression_level = 3 [(validate.rules).enum = {defined_only: true}]; - - // A value used for selecting the zlib compression strategy which is directly related to the - // characteristics of the content. Most of the time "DEFAULT" will be the best choice, though - // there are situations which changing this parameter might produce better results. For example, - // run-length encoding (RLE) is typically used when the content is known for having sequences - // which same data occurs many consecutive times. For more information about each strategy, please - // refer to zlib manual. - CompressionStrategy compression_strategy = 4 [(validate.rules).enum = {defined_only: true}]; - - // Set of strings that allows specifying which mime-types yield compression; e.g., - // application/json, text/html, etc. When this field is not defined, compression will be applied - // to the following mime-types: "application/javascript", "application/json", - // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml". - // .. attention: - // - // **This field is deprecated**. Set the `compressor` field instead. - repeated string content_type = 6 [deprecated = true]; - - // If true, disables compression when the response contains an etag header. When it is false, the - // filter will preserve weak etags and remove the ones that require strong validation. - // .. attention: - // - // **This field is deprecated**. Set the `compressor` field instead. - bool disable_on_etag_header = 7 [deprecated = true]; - - // If true, removes accept-encoding from the request headers before dispatching it to the upstream - // so that responses do not get compressed before reaching the filter. - // .. attention: - // - // **This field is deprecated**. Set the `compressor` field instead. - bool remove_accept_encoding_header = 8 [deprecated = true]; - - // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. - // Larger window results in better compression at the expense of memory usage. The default is 12 - // which will produce a 4096 bytes window. For more details about this parameter, please refer to - // zlib manual > deflateInit2. - google.protobuf.UInt32Value window_bits = 9 [(validate.rules).uint32 = {lte: 15 gte: 9}]; - - // Set of configuration parameters common for all compression filters. If this field is set then - // the fields `content_length`, `content_type`, `disable_on_etag_header` and - // `remove_accept_encoding_header` are ignored. - compressor.v2.Compressor compressor = 10; -} diff --git a/src/main/proto/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto b/src/main/proto/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto deleted file mode 100644 index c9ff092..0000000 --- a/src/main/proto/envoy/config/filter/http/header_to_metadata/v2/header_to_metadata.proto +++ /dev/null @@ -1,101 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.header_to_metadata.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.header_to_metadata.v2"; -option java_outer_classname = "HeaderToMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/header_to_metadata/v2;header_to_metadatav2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.header_to_metadata.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Header-To-Metadata Filter] -// -// The configuration for transforming headers into metadata. This is useful -// for matching load balancer subsets, logging, etc. -// -// Header to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.http.header_to_metadata] - -message Config { - enum ValueType { - STRING = 0; - - NUMBER = 1; - - // The value is a serialized `protobuf.Value - // `_. - PROTOBUF_VALUE = 2; - } - - // ValueEncode defines the encoding algorithm. - enum ValueEncode { - // The value is not encoded. - NONE = 0; - - // The value is encoded in `Base64 `_. - // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the - // non-ASCII characters in the header. - BASE64 = 1; - } - - // [#next-free-field: 6] - message KeyValuePair { - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_bytes: 1}]; - - // The value to pair with the given key. - // - // When used for a `on_header_present` case, if value is non-empty it'll be used - // instead of the header value. If both are empty, no metadata is added. - // - // When used for a `on_header_missing` case, a non-empty value must be provided - // otherwise no metadata is added. - string value = 3; - - // The value's type — defaults to string. - ValueType type = 4; - - // How is the value encoded, default is NONE (not encoded). - // The value will be decoded accordingly before storing to metadata. - ValueEncode encode = 5; - } - - // A Rule defines what metadata to apply when a header is present or missing. - message Rule { - // The header that triggers this rule — required. - string header = 1 - [(validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // If the header is present, apply this metadata KeyValuePair. - // - // If the value in the KeyValuePair is non-empty, it'll be used instead - // of the header value. - KeyValuePair on_header_present = 2; - - // If the header is not present, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set, since it'll be used in lieu - // of the missing header value. - KeyValuePair on_header_missing = 3; - - // Whether or not to remove the header after a rule is applied. - // - // This prevents headers from leaking. - bool remove = 4; - } - - // The list of rules to apply to requests. - repeated Rule request_rules = 1; - - // The list of rules to apply to responses. - repeated Rule response_rules = 2; -} diff --git a/src/main/proto/envoy/config/filter/http/health_check/v2/health_check.proto b/src/main/proto/envoy/config/filter/http/health_check/v2/health_check.proto deleted file mode 100644 index 8e42ff7..0000000 --- a/src/main/proto/envoy/config/filter/http/health_check/v2/health_check.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.health_check.v2; - -import "envoy/api/v2/route/route_components.proto"; -import "envoy/type/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.health_check.v2"; -option java_outer_classname = "HealthCheckProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/health_check/v2;health_checkv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.health_check.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Health check] -// Health check :ref:`configuration overview `. -// [#extension: envoy.filters.http.health_check] - -// [#next-free-field: 6] -message HealthCheck { - reserved 2; - - // Specifies whether the filter operates in pass through mode or not. - google.protobuf.BoolValue pass_through_mode = 1 [(validate.rules).message = {required: true}]; - - // If operating in pass through mode, the amount of time in milliseconds - // that the filter should cache the upstream response. - google.protobuf.Duration cache_time = 3; - - // If operating in non-pass-through mode, specifies a set of upstream cluster - // names and the minimum percentage of servers in each of those clusters that - // must be healthy or degraded in order for the filter to return a 200. - // - // .. note:: - // - // This value is interpreted as an integer by truncating, so 12.50% will be calculated - // as if it were 12%. - map cluster_min_healthy_percentages = 4; - - // Specifies a set of health check request headers to match on. The health check filter will - // check a request’s headers against all the specified headers. To specify the health check - // endpoint, set the ``:path`` header to match on. - repeated api.v2.route.HeaderMatcher headers = 5; -} diff --git a/src/main/proto/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto b/src/main/proto/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto deleted file mode 100644 index 79ca502..0000000 --- a/src/main/proto/envoy/config/filter/http/ip_tagging/v2/ip_tagging.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.ip_tagging.v2; - -import "envoy/api/v2/core/address.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.ip_tagging.v2"; -option java_outer_classname = "IpTaggingProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/ip_tagging/v2;ip_taggingv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.ip_tagging.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: IP tagging] -// IP tagging :ref:`configuration overview `. -// [#extension: envoy.filters.http.ip_tagging] - -message IPTagging { - // The type of requests the filter should apply to. The supported types - // are internal, external or both. The - // :ref:`x-forwarded-for` header is - // used to determine if a request is internal and will result in - // :ref:`x-envoy-internal` - // being set. The filter defaults to both, and it will apply to all request types. - enum RequestType { - // Both external and internal requests will be tagged. This is the default value. - BOTH = 0; - - // Only internal requests will be tagged. - INTERNAL = 1; - - // Only external requests will be tagged. - EXTERNAL = 2; - } - - // Supplies the IP tag name and the IP address subnets. - message IPTag { - // Specifies the IP tag name to apply. - string ip_tag_name = 1; - - // A list of IP address subnets that will be tagged with - // ip_tag_name. Both IPv4 and IPv6 are supported. - repeated api.v2.core.CidrRange ip_list = 2; - } - - // The type of request the filter should apply to. - RequestType request_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // [#comment:TODO(ccaraman): Extend functionality to load IP tags from file system. - // Tracked by issue https://github.com/envoyproxy/envoy/issues/2695] - // The set of IP tags for the filter. - repeated IPTag ip_tags = 4 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/config/filter/http/jwt_authn/v2alpha/config.proto b/src/main/proto/envoy/config/filter/http/jwt_authn/v2alpha/config.proto deleted file mode 100644 index 87ed741..0000000 --- a/src/main/proto/envoy/config/filter/http/jwt_authn/v2alpha/config.proto +++ /dev/null @@ -1,501 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.jwt_authn.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/http_uri.proto"; -import "envoy/api/v2/route/route_components.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.jwt_authn.v2alpha"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/jwt_authn/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.jwt_authn.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: JWT Authentication] -// JWT Authentication :ref:`configuration overview `. -// [#extension: envoy.filters.http.jwt_authn] - -// Please see following for JWT authentication flow: -// -// * `JSON Web Token (JWT) `_ -// * `The OAuth 2.0 Authorization Framework `_ -// * `OpenID Connect `_ -// -// A JwtProvider message specifies how a JSON Web Token (JWT) can be verified. It specifies: -// -// * issuer: the principal that issues the JWT. It has to match the one from the token. -// * allowed audiences: the ones in the token have to be listed here. -// * how to fetch public key JWKS to verify the token signature. -// * how to extract the JWT in the request. -// * how to pass successfully verified token payload. -// -// Example: -// -// .. code-block:: yaml -// -// issuer: https://example.com -// audiences: -// - bookstore_android.apps.googleusercontent.com -// - bookstore_web.apps.googleusercontent.com -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// cache_duration: -// seconds: 300 -// -// [#next-free-field: 10] -message JwtProvider { - // Specify the `principal `_ that issued - // the JWT, usually a URL or an email address. - // - // Example: https://securetoken.google.com - // Example: 1234567-compute@developer.gserviceaccount.com - // - string issuer = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The list of JWT `audiences `_ are - // allowed to access. A JWT containing any of these audiences will be accepted. If not specified, - // will not check audiences in the token. - // - // Example: - // - // .. code-block:: yaml - // - // audiences: - // - bookstore_android.apps.googleusercontent.com - // - bookstore_web.apps.googleusercontent.com - // - repeated string audiences = 2; - - // `JSON Web Key Set (JWKS) `_ is needed to - // validate signature of a JWT. This field specifies where to fetch JWKS. - oneof jwks_source_specifier { - option (validate.required) = true; - - // JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP - // URI and how the fetched JWKS should be cached. - // - // Example: - // - // .. code-block:: yaml - // - // remote_jwks: - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // cache_duration: - // seconds: 300 - // - RemoteJwks remote_jwks = 3; - - // JWKS is in local data source. It could be either in a local file or embedded in the - // inline_string. - // - // Example: local file - // - // .. code-block:: yaml - // - // local_jwks: - // filename: /etc/envoy/jwks/jwks1.txt - // - // Example: inline_string - // - // .. code-block:: yaml - // - // local_jwks: - // inline_string: ACADADADADA - // - api.v2.core.DataSource local_jwks = 4; - } - - // If false, the JWT is removed in the request after a success verification. If true, the JWT is - // not removed in the request. Default value is false. - bool forward = 5; - - // Two fields below define where to extract the JWT from an HTTP request. - // - // If no explicit location is specified, the following default locations are tried in order: - // - // 1. The Authorization header using the `Bearer schema - // `_. Example:: - // - // Authorization: Bearer . - // - // 2. `access_token `_ query parameter. - // - // Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations - // its provider specified or from the default locations. - // - // Specify the HTTP headers to extract the JWT. For examples, following config: - // - // .. code-block:: yaml - // - // from_headers: - // - name: x-goog-iap-jwt-assertion - // - // can be used to extract token from header:: - // - // ``x-goog-iap-jwt-assertion: ``. - // - repeated JwtHeader from_headers = 6; - - // JWT is sent in a query parameter. `jwt_params` represents the query parameter names. - // - // For example, if config is: - // - // .. code-block:: yaml - // - // from_params: - // - jwt_token - // - // The JWT format in query parameter is:: - // - // /path?jwt_token= - // - repeated string from_params = 7; - - // This field specifies the header name to forward a successfully verified JWT payload to the - // backend. The forwarded data is:: - // - // base64url_encoded(jwt_payload_in_JSON) - // - // If it is not specified, the payload will not be forwarded. - string forward_payload_header = 8; - - // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata - // in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn** - // The value is the *protobuf::Struct*. The value of this field will be the key for its *fields* - // and the value is the *protobuf::Struct* converted from JWT JSON payload. - // - // For example, if payload_in_metadata is *my_payload*: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_payload: - // iss: https://example.com - // sub: test@example.com - // aud: https://example.com - // exp: 1501281058 - // - string payload_in_metadata = 9; -} - -// This message specifies how to fetch JWKS from remote and how to cache it. -message RemoteJwks { - // The HTTP URI to fetch the JWKS. For example: - // - // .. code-block:: yaml - // - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // - api.v2.core.HttpUri http_uri = 1; - - // Duration after which the cached JWKS should be expired. If not specified, default cache - // duration is 5 minutes. - google.protobuf.Duration cache_duration = 2; -} - -// This message specifies a header location to extract JWT. -message JwtHeader { - // The HTTP header name. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The value prefix. The value format is "value_prefix" - // For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the - // end. - string value_prefix = 2; -} - -// Specify a required provider with audiences. -message ProviderWithAudiences { - // Specify a required provider name. - string provider_name = 1; - - // This field overrides the one specified in the JwtProvider. - repeated string audiences = 2; -} - -// This message specifies a Jwt requirement. An empty message means JWT verification is not -// required. Here are some config examples: -// -// .. code-block:: yaml -// -// # Example 1: not required with an empty message -// -// # Example 2: require A -// provider_name: provider-A -// -// # Example 3: require A or B -// requires_any: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 4: require A and B -// requires_all: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 5: require A and (B or C) -// requires_all: -// requirements: -// - provider_name: provider-A -// - requires_any: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 6: require A or (B and C) -// requires_any: -// requirements: -// - provider_name: provider-A -// - requires_all: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 7: A is optional (if token from A is provided, it must be valid, but also allows -// missing token.) -// requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// -// # Example 8: A is optional and B is required. -// requires_all: -// requirements: -// - requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// - provider_name: provider-B -// -// [#next-free-field: 7] -message JwtRequirement { - oneof requires_type { - // Specify a required provider name. - string provider_name = 1; - - // Specify a required provider with audiences. - ProviderWithAudiences provider_and_audiences = 2; - - // Specify list of JwtRequirement. Their results are OR-ed. - // If any one of them passes, the result is passed. - JwtRequirementOrList requires_any = 3; - - // Specify list of JwtRequirement. Their results are AND-ed. - // All of them must pass, if one of them fails or missing, it fails. - JwtRequirementAndList requires_all = 4; - - // The requirement is always satisfied even if JWT is missing or the JWT - // verification fails. A typical usage is: this filter is used to only verify - // JWTs and pass the verified JWT payloads to another filter, the other filter - // will make decision. In this mode, all JWTs will be verified. - google.protobuf.Empty allow_missing_or_failed = 5; - - // The requirement is satisfied if JWT is missing, but failed if JWT is - // presented but invalid. Similar to allow_missing_or_failed, this is used - // to only verify JWTs and pass the verified payload to another filter. The - // different is this mode will reject requests with invalid tokens. - google.protobuf.Empty allow_missing = 6; - } -} - -// This message specifies a list of RequiredProvider. -// Their results are OR-ed; if any one of them passes, the result is passed -message JwtRequirementOrList { - // Specify a list of JwtRequirement. - repeated JwtRequirement requirements = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// This message specifies a list of RequiredProvider. -// Their results are AND-ed; all of them must pass, if one of them fails or missing, it fails. -message JwtRequirementAndList { - // Specify a list of JwtRequirement. - repeated JwtRequirement requirements = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// This message specifies a Jwt requirement for a specific Route condition. -// Example 1: -// -// .. code-block:: yaml -// -// - match: -// prefix: /healthz -// -// In above example, "requires" field is empty for /healthz prefix match, -// it means that requests matching the path prefix don't require JWT authentication. -// -// Example 2: -// -// .. code-block:: yaml -// -// - match: -// prefix: / -// requires: { provider_name: provider-A } -// -// In above example, all requests matched the path prefix require jwt authentication -// from "provider-A". -message RequirementRule { - // The route matching parameter. Only when the match is satisfied, the "requires" field will - // apply. - // - // For example: following match will match all requests. - // - // .. code-block:: yaml - // - // match: - // prefix: / - // - api.v2.route.RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Specify a Jwt Requirement. Please detail comment in message JwtRequirement. - JwtRequirement requires = 2; -} - -// This message specifies Jwt requirements based on stream_info.filterState. -// This FilterState should use `Router::StringAccessor` object to set a string value. -// Other HTTP filters can use it to specify Jwt requirements dynamically. -// -// Example: -// -// .. code-block:: yaml -// -// name: jwt_selector -// requires: -// issuer_1: -// provider_name: issuer1 -// issuer_2: -// provider_name: issuer2 -// -// If a filter set "jwt_selector" with "issuer_1" to FilterState for a request, -// jwt_authn filter will use JwtRequirement{"provider_name": "issuer1"} to verify. -message FilterStateRule { - // The filter state name to retrieve the `Router::StringAccessor` object. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // A map of string keys to requirements. The string key is the string value - // in the FilterState with the name specified in the *name* field above. - map requires = 3; -} - -// This is the Envoy HTTP filter config for JWT authentication. -// -// For example: -// -// .. code-block:: yaml -// -// providers: -// provider1: -// issuer: issuer1 -// audiences: -// - audience1 -// - audience2 -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// provider2: -// issuer: issuer2 -// local_jwks: -// inline_string: jwks_string -// -// rules: -// # Not jwt verification is required for /health path -// - match: -// prefix: /health -// -// # Jwt verification for provider1 is required for path prefixed with "prefix" -// - match: -// prefix: /prefix -// requires: -// provider_name: provider1 -// -// # Jwt verification for either provider1 or provider2 is required for all other requests. -// - match: -// prefix: / -// requires: -// requires_any: -// requirements: -// - provider_name: provider1 -// - provider_name: provider2 -// -message JwtAuthentication { - // Map of provider names to JwtProviders. - // - // .. code-block:: yaml - // - // providers: - // provider1: - // issuer: issuer1 - // audiences: - // - audience1 - // - audience2 - // remote_jwks: - // http_uri: - // uri: https://example.com/.well-known/jwks.json - // cluster: example_jwks_cluster - // provider2: - // issuer: provider2 - // local_jwks: - // inline_string: jwks_string - // - map providers = 1; - - // Specifies requirements based on the route matches. The first matched requirement will be - // applied. If there are overlapped match conditions, please put the most specific match first. - // - // Examples - // - // .. code-block:: yaml - // - // rules: - // - match: - // prefix: /healthz - // - match: - // prefix: /baz - // requires: - // provider_name: provider1 - // - match: - // prefix: /foo - // requires: - // requires_any: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - match: - // prefix: /bar - // requires: - // requires_all: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - repeated RequirementRule rules = 2; - - // This message specifies Jwt requirements based on stream_info.filterState. - // Other HTTP filters can use it to specify Jwt requirements dynamically. - // The *rules* field above is checked first, if it could not find any matches, - // check this one. - FilterStateRule filter_state_rules = 3; - - // When set to true, bypass the `CORS preflight request - // `_ regardless of JWT - // requirements specified in the rules. - bool bypass_cors_preflight = 4; -} diff --git a/src/main/proto/envoy/config/filter/http/lua/v2/lua.proto b/src/main/proto/envoy/config/filter/http/lua/v2/lua.proto deleted file mode 100644 index 820011e..0000000 --- a/src/main/proto/envoy/config/filter/http/lua/v2/lua.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.lua.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.lua.v2"; -option java_outer_classname = "LuaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/lua/v2;luav2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.lua.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Lua] -// Lua :ref:`configuration overview `. -// [#extension: envoy.filters.http.lua] - -message Lua { - // The Lua code that Envoy will execute. This can be a very small script that - // further loads code from disk if desired. Note that if JSON configuration is used, the code must - // be properly escaped. YAML configuration may be easier to read since YAML supports multi-line - // strings so complex scripts can be easily expressed inline in the configuration. - string inline_code = 1 [(validate.rules).string = {min_bytes: 1}]; -} diff --git a/src/main/proto/envoy/config/filter/http/on_demand/v2/on_demand.proto b/src/main/proto/envoy/config/filter/http/on_demand/v2/on_demand.proto deleted file mode 100644 index 1dc02a9..0000000 --- a/src/main/proto/envoy/config/filter/http/on_demand/v2/on_demand.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.on_demand.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.on_demand.v2"; -option java_outer_classname = "OnDemandProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/on_demand/v2;on_demandv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.on_demand.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: OnDemand] -// IP tagging :ref:`configuration overview `. -// [#extension: envoy.filters.http.on_demand] - -message OnDemand { -} diff --git a/src/main/proto/envoy/config/filter/http/original_src/v2alpha1/original_src.proto b/src/main/proto/envoy/config/filter/http/original_src/v2alpha1/original_src.proto deleted file mode 100644 index d713438..0000000 --- a/src/main/proto/envoy/config/filter/http/original_src/v2alpha1/original_src.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.original_src.v2alpha1; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.original_src.v2alpha1"; -option java_outer_classname = "OriginalSrcProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/original_src/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.original_src.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Original Src Filter] -// Use the Original source address on upstream connections. - -// The Original Src filter binds upstream connections to the original source address determined -// for the request. This address could come from something like the Proxy Protocol filter, or it -// could come from trusted http headers. -// [#extension: envoy.filters.http.original_src] -message OriginalSrc { - // Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to - // ensure that non-local addresses may be routed back through envoy when binding to the original - // source address. The option will not be applied if the mark is 0. - uint32 mark = 1; -} diff --git a/src/main/proto/envoy/config/filter/http/rate_limit/v2/rate_limit.proto b/src/main/proto/envoy/config/filter/http/rate_limit/v2/rate_limit.proto deleted file mode 100644 index 029fe76..0000000 --- a/src/main/proto/envoy/config/filter/http/rate_limit/v2/rate_limit.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.rate_limit.v2; - -import "envoy/config/ratelimit/v2/rls.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.rate_limit.v2"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/rate_limit/v2;rate_limitv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.ratelimit.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.http.ratelimit] - -// [#next-free-field: 8] -message RateLimit { - // The rate limit domain to use when calling the rate limit service. - string domain = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Specifies the rate limit configurations to be applied with the same - // stage number. If not set, the default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 2 [(validate.rules).uint32 = {lte: 10}]; - - // The type of requests the filter should apply to. The supported - // types are *internal*, *external* or *both*. A request is considered internal if - // :ref:`x-envoy-internal` is set to true. If - // :ref:`x-envoy-internal` is not set or false, a - // request is considered external. The filter defaults to *both*, and it will apply to all request - // types. - string request_type = 3 - [(validate.rules).string = {in: "internal" in: "external" in: "both" in: ""}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 4; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 5; - - // Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead - // of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The - // HTTP code will be 200 for a gRPC response. - bool rate_limited_as_resource_exhausted = 6; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - ratelimit.v2.RateLimitServiceConfig rate_limit_service = 7 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/filter/http/rbac/v2/rbac.proto b/src/main/proto/envoy/config/filter/http/rbac/v2/rbac.proto deleted file mode 100644 index 8266c02..0000000 --- a/src/main/proto/envoy/config/filter/http/rbac/v2/rbac.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.rbac.v2; - -import "envoy/config/rbac/v2/rbac.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.rbac.v2"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/rbac/v2;rbacv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.rbac.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: RBAC] -// Role-Based Access Control :ref:`configuration overview `. -// [#extension: envoy.filters.http.rbac] - -// RBAC filter config. -message RBAC { - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - config.rbac.v2.RBAC rules = 1; - - // Shadow rules are not enforced by the filter (i.e., returning a 403) - // but will emit stats and logs and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - config.rbac.v2.RBAC shadow_rules = 2; -} - -message RBACPerRoute { - reserved 1; - - // Override the global configuration of the filter with this new config. - // If absent, the global RBAC policy will be disabled for this route. - RBAC rbac = 2; -} diff --git a/src/main/proto/envoy/config/filter/http/router/v2/router.proto b/src/main/proto/envoy/config/filter/http/router/v2/router.proto deleted file mode 100644 index e47e73f..0000000 --- a/src/main/proto/envoy/config/filter/http/router/v2/router.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.router.v2; - -import "envoy/config/filter/accesslog/v2/accesslog.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.router.v2"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/router/v2;routerv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.router.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Router] -// Router :ref:`configuration overview `. -// [#extension: envoy.filters.http.router] - -// [#next-free-field: 7] -message Router { - // Whether the router generates dynamic cluster statistics. Defaults to - // true. Can be disabled in high performance scenarios. - google.protobuf.BoolValue dynamic_stats = 1; - - // Whether to start a child span for egress routed calls. This can be - // useful in scenarios where other filters (auth, ratelimit, etc.) make - // outbound calls and have child spans rooted at the same ingress - // parent. Defaults to false. - bool start_child_span = 2; - - // Configuration for HTTP upstream logs emitted by the router. Upstream logs - // are configured in the same way as access logs, but each log entry represents - // an upstream request. Presuming retries are configured, multiple upstream - // requests may be made for each downstream (inbound) request. - repeated accesslog.v2.AccessLog upstream_log = 3; - - // Do not add any additional *x-envoy-* headers to requests or responses. This - // only affects the :ref:`router filter generated *x-envoy-* headers - // `, other Envoy filters and the HTTP - // connection manager may continue to set *x-envoy-* headers. - bool suppress_envoy_headers = 4; - - // Specifies a list of HTTP headers to strictly validate. Envoy will reject a - // request and respond with HTTP status 400 if the request contains an invalid - // value for any of the headers listed in this field. Strict header checking - // is only supported for the following headers: - // - // Value must be a ','-delimited list (i.e. no spaces) of supported retry - // policy values: - // - // * :ref:`config_http_filters_router_x-envoy-retry-grpc-on` - // * :ref:`config_http_filters_router_x-envoy-retry-on` - // - // Value must be an integer: - // - // * :ref:`config_http_filters_router_x-envoy-max-retries` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` - repeated string strict_check_headers = 5 [(validate.rules).repeated = { - items { - string { - in: "x-envoy-upstream-rq-timeout-ms" - in: "x-envoy-upstream-rq-per-try-timeout-ms" - in: "x-envoy-max-retries" - in: "x-envoy-retry-grpc-on" - in: "x-envoy-retry-on" - } - } - }]; - - // If not set, ingress Envoy will ignore - // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress - // Envoy, when deriving timeout for upstream cluster. - bool respect_expected_rq_timeout = 6; -} diff --git a/src/main/proto/envoy/config/filter/http/squash/v2/squash.proto b/src/main/proto/envoy/config/filter/http/squash/v2/squash.proto deleted file mode 100644 index 1099414..0000000 --- a/src/main/proto/envoy/config/filter/http/squash/v2/squash.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.squash.v2; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.squash.v2"; -option java_outer_classname = "SquashProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/squash/v2;squashv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.squash.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Squash] -// Squash :ref:`configuration overview `. -// [#extension: envoy.filters.http.squash] - -// [#next-free-field: 6] -message Squash { - // The name of the cluster that hosts the Squash server. - string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // When the filter requests the Squash server to create a DebugAttachment, it will use this - // structure as template for the body of the request. It can contain reference to environment - // variables in the form of '{{ ENV_VAR_NAME }}'. These can be used to provide the Squash server - // with more information to find the process to attach the debugger to. For example, in a - // Istio/k8s environment, this will contain information on the pod: - // - // .. code-block:: json - // - // { - // "spec": { - // "attachment": { - // "pod": "{{ POD_NAME }}", - // "namespace": "{{ POD_NAMESPACE }}" - // }, - // "match_request": true - // } - // } - // - // (where POD_NAME, POD_NAMESPACE are configured in the pod via the Downward API) - google.protobuf.Struct attachment_template = 2; - - // The timeout for individual requests sent to the Squash cluster. Defaults to 1 second. - google.protobuf.Duration request_timeout = 3; - - // The total timeout Squash will delay a request and wait for it to be attached. Defaults to 60 - // seconds. - google.protobuf.Duration attachment_timeout = 4; - - // Amount of time to poll for the status of the attachment object in the Squash server - // (to check if has been attached). Defaults to 1 second. - google.protobuf.Duration attachment_poll_period = 5; -} diff --git a/src/main/proto/envoy/config/filter/http/tap/v2alpha/tap.proto b/src/main/proto/envoy/config/filter/http/tap/v2alpha/tap.proto deleted file mode 100644 index b8381c5..0000000 --- a/src/main/proto/envoy/config/filter/http/tap/v2alpha/tap.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.tap.v2alpha; - -import "envoy/config/common/tap/v2alpha/common.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.tap.v2alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/tap/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.http.tap.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tap] -// Tap :ref:`configuration overview `. -// [#extension: envoy.filters.http.tap] - -// Top level configuration for the tap filter. -message Tap { - // Common configuration for the HTTP tap filter. - common.tap.v2alpha.CommonExtensionConfig common_config = 1 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/filter/http/transcoder/v2/transcoder.proto b/src/main/proto/envoy/config/filter/http/transcoder/v2/transcoder.proto deleted file mode 100644 index 9421b0e..0000000 --- a/src/main/proto/envoy/config/filter/http/transcoder/v2/transcoder.proto +++ /dev/null @@ -1,160 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.http.transcoder.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.http.transcoder.v2"; -option java_outer_classname = "TranscoderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/transcoder/v2;transcoderv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.http.grpc_json_transcoder.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC-JSON transcoder] -// gRPC-JSON transcoder :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_json_transcoder] - -// [#next-free-field: 10] -message GrpcJsonTranscoder { - message PrintOptions { - // Whether to add spaces, line breaks and indentation to make the JSON - // output easy to read. Defaults to false. - bool add_whitespace = 1; - - // Whether to always print primitive fields. By default primitive - // fields with default values will be omitted in JSON output. For - // example, an int32 field set to 0 will be omitted. Setting this flag to - // true will override the default behavior and print primitive fields - // regardless of their values. Defaults to false. - bool always_print_primitive_fields = 2; - - // Whether to always print enums as ints. By default they are rendered - // as strings. Defaults to false. - bool always_print_enums_as_ints = 3; - - // Whether to preserve proto field names. By default protobuf will - // generate JSON field names using the ``json_name`` option, or lower camel case, - // in that order. Setting this flag will preserve the original field names. Defaults to false. - bool preserve_proto_field_names = 4; - } - - oneof descriptor_set { - option (validate.required) = true; - - // Supplies the filename of - // :ref:`the proto descriptor set ` for the gRPC - // services. - string proto_descriptor = 1; - - // Supplies the binary content of - // :ref:`the proto descriptor set ` for the gRPC - // services. - bytes proto_descriptor_bin = 4; - } - - // A list of strings that - // supplies the fully qualified service names (i.e. "package_name.service_name") that - // the transcoder will translate. If the service name doesn't exist in ``proto_descriptor``, - // Envoy will fail at startup. The ``proto_descriptor`` may contain more services than - // the service names specified here, but they won't be translated. - repeated string services = 2 [(validate.rules).repeated = {min_items: 1}]; - - // Control options for response JSON. These options are passed directly to - // `JsonPrintOptions `_. - PrintOptions print_options = 3; - - // Whether to keep the incoming request route after the outgoing headers have been transformed to - // the match the upstream gRPC service. Note: This means that routes for gRPC services that are - // not transcoded cannot be used in combination with *match_incoming_request_route*. - bool match_incoming_request_route = 5; - - // A list of query parameters to be ignored for transcoding method mapping. - // By default, the transcoder filter will not transcode a request if there are any - // unknown/invalid query parameters. - // - // Example : - // - // .. code-block:: proto - // - // service Bookstore { - // rpc GetShelf(GetShelfRequest) returns (Shelf) { - // option (google.api.http) = { - // get: "/shelves/{shelf}" - // }; - // } - // } - // - // message GetShelfRequest { - // int64 shelf = 1; - // } - // - // message Shelf {} - // - // The request ``/shelves/100?foo=bar`` will not be mapped to ``GetShelf``` because variable - // binding for ``foo`` is not defined. Adding ``foo`` to ``ignored_query_parameters`` will allow - // the same request to be mapped to ``GetShelf``. - repeated string ignored_query_parameters = 6; - - // Whether to route methods without the ``google.api.http`` option. - // - // Example : - // - // .. code-block:: proto - // - // package bookstore; - // - // service Bookstore { - // rpc GetShelf(GetShelfRequest) returns (Shelf) {} - // } - // - // message GetShelfRequest { - // int64 shelf = 1; - // } - // - // message Shelf {} - // - // The client could ``post`` a json body ``{"shelf": 1234}`` with the path of - // ``/bookstore.Bookstore/GetShelfRequest`` to call ``GetShelfRequest``. - bool auto_mapping = 7; - - // Whether to ignore query parameters that cannot be mapped to a corresponding - // protobuf field. Use this if you cannot control the query parameters and do - // not know them beforehand. Otherwise use ``ignored_query_parameters``. - // Defaults to false. - bool ignore_unknown_query_parameters = 8; - - // Whether to convert gRPC status headers to JSON. - // When trailer indicates a gRPC error and there was no HTTP body, take ``google.rpc.Status`` - // from the ``grpc-status-details-bin`` header and use it as JSON body. - // If there was no such header, make ``google.rpc.Status`` out of the ``grpc-status`` and - // ``grpc-message`` headers. - // The error details types must be present in the ``proto_descriptor``. - // - // For example, if an upstream server replies with headers: - // - // .. code-block:: none - // - // grpc-status: 5 - // grpc-status-details-bin: - // CAUaMwoqdHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUucnBjLlJlcXVlc3RJbmZvEgUKA3ItMQ - // - // The ``grpc-status-details-bin`` header contains a base64-encoded protobuf message - // ``google.rpc.Status``. It will be transcoded into: - // - // .. code-block:: none - // - // HTTP/1.1 404 Not Found - // content-type: application/json - // - // {"code":5,"details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"r-1"}]} - // - // In order to transcode the message, the ``google.rpc.RequestInfo`` type from - // the ``google/rpc/error_details.proto`` should be included in the configured - // :ref:`proto descriptor set `. - bool convert_grpc_status = 9; -} diff --git a/src/main/proto/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto b/src/main/proto/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto deleted file mode 100644 index 1b492ca..0000000 --- a/src/main/proto/envoy/config/filter/listener/http_inspector/v2/http_inspector.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.listener.http_inspector.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.listener.http_inspector.v2"; -option java_outer_classname = "HttpInspectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/http_inspector/v2;http_inspectorv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.listener.http_inspector.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP Inspector Filter] -// Detect whether the application protocol is HTTP. -// [#extension: envoy.filters.listener.http_inspector] - -message HttpInspector { -} diff --git a/src/main/proto/envoy/config/filter/listener/original_dst/v2/original_dst.proto b/src/main/proto/envoy/config/filter/listener/original_dst/v2/original_dst.proto deleted file mode 100644 index 67f0fa5..0000000 --- a/src/main/proto/envoy/config/filter/listener/original_dst/v2/original_dst.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.listener.original_dst.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.listener.original_dst.v2"; -option java_outer_classname = "OriginalDstProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/original_dst/v2;original_dstv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.listener.original_dst.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Original Dst Filter] -// Use the Original destination address on downstream connections. -// [#extension: envoy.filters.listener.original_dst] - -message OriginalDst { -} diff --git a/src/main/proto/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto b/src/main/proto/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto deleted file mode 100644 index 9b52199..0000000 --- a/src/main/proto/envoy/config/filter/listener/original_src/v2alpha1/original_src.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.listener.original_src.v2alpha1; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.listener.original_src.v2alpha1"; -option java_outer_classname = "OriginalSrcProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/original_src/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.listener.original_src.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Original Src Filter] -// Use the Original source address on upstream connections. -// [#extension: envoy.filters.listener.original_src] - -// The Original Src filter binds upstream connections to the original source address determined -// for the connection. This address could come from something like the Proxy Protocol filter, or it -// could come from trusted http headers. -message OriginalSrc { - // Whether to bind the port to the one used in the original downstream connection. - // [#not-implemented-hide:] - bool bind_port = 1; - - // Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to - // ensure that non-local addresses may be routed back through envoy when binding to the original - // source address. The option will not be applied if the mark is 0. - uint32 mark = 2; -} diff --git a/src/main/proto/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto b/src/main/proto/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto deleted file mode 100644 index 9fbcd64..0000000 --- a/src/main/proto/envoy/config/filter/listener/proxy_protocol/v2/proxy_protocol.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.listener.proxy_protocol.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.listener.proxy_protocol.v2"; -option java_outer_classname = "ProxyProtocolProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/proxy_protocol/v2;proxy_protocolv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.listener.proxy_protocol.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Proxy Protocol Filter] -// PROXY protocol listener filter. -// [#extension: envoy.filters.listener.proxy_protocol] - -message ProxyProtocol { -} diff --git a/src/main/proto/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto b/src/main/proto/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto deleted file mode 100644 index 764627f..0000000 --- a/src/main/proto/envoy/config/filter/listener/tls_inspector/v2/tls_inspector.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.listener.tls_inspector.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.listener.tls_inspector.v2"; -option java_outer_classname = "TlsInspectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/listener/tls_inspector/v2;tls_inspectorv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.listener.tls_inspector.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: TLS Inspector Filter] -// Allows detecting whether the transport appears to be TLS or plaintext. -// [#extension: envoy.filters.listener.tls_inspector] - -message TlsInspector { -} diff --git a/src/main/proto/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto b/src/main/proto/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto deleted file mode 100644 index 5f4c056..0000000 --- a/src/main/proto/envoy/config/filter/network/client_ssl_auth/v2/client_ssl_auth.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.client_ssl_auth.v2; - -import "envoy/api/v2/core/address.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.client_ssl_auth.v2"; -option java_outer_classname = "ClientSslAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/client_ssl_auth/v2;client_ssl_authv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.client_ssl_auth.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Client TLS authentication] -// Client TLS authentication -// :ref:`configuration overview `. -// [#extension: envoy.filters.network.client_ssl_auth] - -message ClientSSLAuth { - // The :ref:`cluster manager ` cluster that runs - // the authentication service. The filter will connect to the service every 60s to fetch the list - // of principals. The service must support the expected :ref:`REST API - // `. - string auth_api_cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 2 [(validate.rules).string = {min_bytes: 1}]; - - // Time in milliseconds between principal refreshes from the - // authentication service. Default is 60000 (60s). The actual fetch time - // will be this value plus a random jittered value between - // 0-refresh_delay_ms milliseconds. - google.protobuf.Duration refresh_delay = 3; - - // An optional list of IP address and subnet masks that should be white - // listed for access by the filter. If no list is provided, there is no - // IP allowlist. - repeated api.v2.core.CidrRange ip_white_list = 4; -} diff --git a/src/main/proto/envoy/config/filter/network/direct_response/v2/config.proto b/src/main/proto/envoy/config/filter/network/direct_response/v2/config.proto deleted file mode 100644 index e0c018e..0000000 --- a/src/main/proto/envoy/config/filter/network/direct_response/v2/config.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.direct_response.v2; - -import "envoy/api/v2/core/base.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.direct_response.v2"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/direct_response/v2;direct_responsev2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.direct_response.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Direct response] -// Direct response :ref:`configuration overview `. -// [#extension: envoy.filters.network.direct_response] - -message Config { - // Response data as a data source. - api.v2.core.DataSource response = 1; -} diff --git a/src/main/proto/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto b/src/main/proto/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto deleted file mode 100644 index 0a6c835..0000000 --- a/src/main/proto/envoy/config/filter/network/dubbo_proxy/v2alpha1/dubbo_proxy.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.dubbo_proxy.v2alpha1; - -import "envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.dubbo_proxy.v2alpha1"; -option java_outer_classname = "DubboProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/dubbo_proxy/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.dubbo_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dubbo Proxy] -// Dubbo Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.dubbo_proxy] - -// Dubbo Protocol types supported by Envoy. -enum ProtocolType { - // the default protocol. - Dubbo = 0; -} - -// Dubbo Serialization types supported by Envoy. -enum SerializationType { - // the default serialization protocol. - Hessian2 = 0; -} - -// [#next-free-field: 6] -message DubboProxy { - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Configure the protocol used. - ProtocolType protocol_type = 2 [(validate.rules).enum = {defined_only: true}]; - - // Configure the serialization protocol used. - SerializationType serialization_type = 3 [(validate.rules).enum = {defined_only: true}]; - - // The route table for the connection manager is static and is specified in this property. - repeated RouteConfiguration route_config = 4; - - // A list of individual Dubbo filters that make up the filter chain for requests made to the - // Dubbo proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no dubbo_filters are specified, a default Dubbo router filter - // (`envoy.filters.dubbo.router`) is used. - repeated DubboFilter dubbo_filters = 5; -} - -// DubboFilter configures a Dubbo filter. -message DubboFilter { - // The name of the filter to instantiate. The name must match a supported - // filter. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - google.protobuf.Any config = 2; -} diff --git a/src/main/proto/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto b/src/main/proto/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto deleted file mode 100644 index cd287d0..0000000 --- a/src/main/proto/envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.dubbo_proxy.v2alpha1; - -import "envoy/api/v2/route/route_components.proto"; -import "envoy/type/matcher/string.proto"; -import "envoy/type/range.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.dubbo_proxy.v2alpha1"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/dubbo_proxy/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.dubbo_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dubbo Proxy Route Configuration] -// Dubbo Proxy :ref:`configuration overview `. - -// [#next-free-field: 6] -message RouteConfiguration { - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - string name = 1; - - // The interface name of the service. - string interface = 2; - - // Which group does the interface belong to. - string group = 3; - - // The version number of the interface. - string version = 4; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 5; -} - -message Route { - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - // Method level routing matching. - MethodMatch method = 1; - - // Specifies a set of headers that the route should match on. The router will check the request’s - // headers against all the specified headers in the route config. A match will happen if all the - // headers in the route are present in the request with the same values (or based on presence if - // the value field is not in the config). - repeated api.v2.route.HeaderMatcher headers = 2; -} - -message RouteAction { - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - // Currently ClusterWeight only supports the name and weight fields. - api.v2.route.WeightedCluster weighted_clusters = 2; - } -} - -message MethodMatch { - // The parameter matching type. - message ParameterMatchSpecifier { - oneof parameter_match_specifier { - // If specified, header match will be performed based on the value of the header. - string exact_match = 3; - - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting - // of an optional plus or minus sign followed by a sequence of digits. The rule will not match - // if the header value does not represent an integer. Match will fail for empty values, - // floating point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, - // "somestring", 10.9, "-1somestring" - type.Int64Range range_match = 4; - } - } - - // The name of the method. - type.matcher.StringMatcher name = 1; - - // Method parameter definition. - // The key is the parameter index, starting from 0. - // The value is the parameter matching type. - map params_match = 2; -} diff --git a/src/main/proto/envoy/config/filter/network/echo/v2/echo.proto b/src/main/proto/envoy/config/filter/network/echo/v2/echo.proto deleted file mode 100644 index 5c8b31d..0000000 --- a/src/main/proto/envoy/config/filter/network/echo/v2/echo.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.echo.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.echo.v2"; -option java_outer_classname = "EchoProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/echo/v2;echov2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.echo.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Echo] -// Echo :ref:`configuration overview `. -// [#extension: envoy.filters.network.echo] - -message Echo { -} diff --git a/src/main/proto/envoy/config/filter/network/ext_authz/v2/ext_authz.proto b/src/main/proto/envoy/config/filter/network/ext_authz/v2/ext_authz.proto deleted file mode 100644 index 2cda6d9..0000000 --- a/src/main/proto/envoy/config/filter/network/ext_authz/v2/ext_authz.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.ext_authz.v2; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.ext_authz.v2"; -option java_outer_classname = "ExtAuthzProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/ext_authz/v2;ext_authzv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.ext_authz.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Network External Authorization ] -// The network layer external authorization service configuration -// :ref:`configuration overview `. -// [#extension: envoy.filters.network.ext_authz] - -// External Authorization filter calls out to an external service over the -// gRPC Authorization API defined by -// :ref:`CheckRequest `. -// A failed check will cause this filter to close the TCP connection. -message ExtAuthz { - // The prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The external authorization gRPC service configuration. - // The default timeout is set to 200ms by this filter. - api.v2.core.GrpcService grpc_service = 2; - - // The filter's behaviour in case the external authorization service does - // not respond back. When it is set to true, Envoy will also allow traffic in case of - // communication failure between authorization service and the proxy. - // Defaults to false. - bool failure_mode_allow = 3; - - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - bool include_peer_certificate = 4; -} diff --git a/src/main/proto/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto b/src/main/proto/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto deleted file mode 100644 index 33a3316..0000000 --- a/src/main/proto/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto +++ /dev/null @@ -1,672 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.http_connection_manager.v2; - -import "envoy/api/v2/core/config_source.proto"; -import "envoy/api/v2/core/protocol.proto"; -import "envoy/api/v2/route.proto"; -import "envoy/api/v2/scoped_route.proto"; -import "envoy/config/filter/accesslog/v2/accesslog.proto"; -import "envoy/config/trace/v2/http_tracer.proto"; -import "envoy/type/percent.proto"; -import "envoy/type/tracing/v2/custom_tag.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2"; -option java_outer_classname = "HttpConnectionManagerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2;http_connection_managerv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.http_connection_manager.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP connection manager] -// HTTP connection manager :ref:`configuration overview `. -// [#extension: envoy.filters.network.http_connection_manager] - -// [#next-free-field: 37] -message HttpConnectionManager { - enum CodecType { - // For every new connection, the connection manager will determine which - // codec to use. This mode supports both ALPN for TLS listeners as well as - // protocol inference for plaintext listeners. If ALPN data is available, it - // is preferred, otherwise protocol inference is used. In almost all cases, - // this is the right option to choose for this setting. - AUTO = 0; - - // The connection manager will assume that the client is speaking HTTP/1.1. - HTTP1 = 1; - - // The connection manager will assume that the client is speaking HTTP/2 - // (Envoy does not require HTTP/2 to take place over TLS or to use ALPN. - // Prior knowledge is allowed). - HTTP2 = 2; - - // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with - // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient - // to distinguish HTTP1 and HTTP2 traffic. - HTTP3 = 3; - } - - enum ServerHeaderTransformation { - // Overwrite any Server header with the contents of server_name. - OVERWRITE = 0; - - // If no Server header is present, append Server server_name - // If a Server header is present, pass it through. - APPEND_IF_ABSENT = 1; - - // Pass through the value of the server header, and do not append a header - // if none is present. - PASS_THROUGH = 2; - } - - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - enum ForwardClientCertDetails { - // Do not send the XFCC header to the next hop. This is the default value. - SANITIZE = 0; - - // When the client connection is mTLS (Mutual TLS), forward the XFCC header - // in the request. - FORWARD_ONLY = 1; - - // When the client connection is mTLS, append the client certificate - // information to the request’s XFCC header and forward it. - APPEND_FORWARD = 2; - - // When the client connection is mTLS, reset the XFCC header with the client - // certificate information and send it to the next hop. - SANITIZE_SET = 3; - - // Always forward the XFCC header in the request, regardless of whether the - // client connection is mTLS. - ALWAYS_FORWARD_ONLY = 4; - } - - // [#next-free-field: 10] - message Tracing { - enum OperationName { - // The HTTP listener is used for ingress/incoming requests. - INGRESS = 0; - - // The HTTP listener is used for egress/outgoing requests. - EGRESS = 1; - } - - // The span name will be derived from this field. If - // :ref:`traffic_direction ` is - // specified on the parent listener, then it is used instead of this field. - // - // .. attention:: - // This field has been deprecated in favor of `traffic_direction`. - OperationName operation_name = 1 [ - deprecated = true, - (validate.rules).enum = {defined_only: true}, - (envoy.annotations.disallowed_by_default) = true - ]; - - // A list of header names used to create tags for the active span. The header name is used to - // populate the tag name, and the header value is used to populate the tag value. The tag is - // created if the specified header name is present in the request's headers. - // - // .. attention:: - // This field has been deprecated in favor of :ref:`custom_tags - // `. - repeated string request_headers_for_tags = 2 [deprecated = true]; - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_enabled' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - type.Percent client_sampling = 3; - - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.Percent random_sampling = 4; - - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.Percent overall_sampling = 5; - - // Whether to annotate spans with additional data. If true, spans will include logs for stream - // events. - bool verbose = 6; - - // Maximum length of the request path to extract and include in the HttpUrl tag. Used to - // truncate lengthy request paths to meet the needs of a tracing backend. - // Default: 256 - google.protobuf.UInt32Value max_path_tag_length = 7; - - // A list of custom tags with unique tag name to create tags for the active span. - repeated type.tracing.v2.CustomTag custom_tags = 8; - - // Configuration for an external tracing provider. - // If not specified, no tracing will be performed. - trace.v2.Tracing.Http provider = 9; - } - - message InternalAddressConfig { - // Whether unix socket addresses should be considered internal. - bool unix_sockets = 1; - } - - // [#next-free-field: 7] - message SetCurrentClientCertDetails { - reserved 2; - - // Whether to forward the subject of the client cert. Defaults to false. - google.protobuf.BoolValue subject = 1; - - // Whether to forward the entire client cert in URL encoded PEM format. This will appear in the - // XFCC header comma separated from other values with the value Cert="PEM". - // Defaults to false. - bool cert = 3; - - // Whether to forward the entire client cert chain (including the leaf cert) in URL encoded PEM - // format. This will appear in the XFCC header comma separated from other values with the value - // Chain="PEM". - // Defaults to false. - bool chain = 6; - - // Whether to forward the DNS type Subject Alternative Names of the client cert. - // Defaults to false. - bool dns = 4; - - // Whether to forward the URI type Subject Alternative Name of the client cert. Defaults to - // false. - bool uri = 5; - } - - // The configuration for HTTP upgrades. - // For each upgrade type desired, an UpgradeConfig must be added. - // - // .. warning:: - // - // The current implementation of upgrade headers does not handle - // multi-valued upgrade headers. Support for multi-valued headers may be - // added in the future if needed. - // - // .. warning:: - // The current implementation of upgrade headers does not work with HTTP/2 - // upstreams. - message UpgradeConfig { - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] - // will be proxied upstream. - string upgrade_type = 1; - - // If present, this represents the filter chain which will be created for - // this type of upgrade. If no filters are present, the filter chain for - // HTTP connections will be used for this upgrade type. - repeated HttpFilter filters = 2; - - // Determines if upgrades are enabled or disabled by default. Defaults to true. - // This can be overridden on a per-route basis with :ref:`cluster - // ` as documented in the - // :ref:`upgrade documentation `. - google.protobuf.BoolValue enabled = 3; - } - - reserved 27; - - // Supplies the type of codec that the connection manager should use. - CodecType codec_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // The human readable prefix to use when emitting statistics for the - // connection manager. See the :ref:`statistics documentation ` for - // more information. - string stat_prefix = 2 [(validate.rules).string = {min_bytes: 1}]; - - oneof route_specifier { - option (validate.required) = true; - - // The connection manager’s route table will be dynamically loaded via the RDS API. - Rds rds = 3; - - // The route table for the connection manager is static and is specified in this property. - api.v2.RouteConfiguration route_config = 4; - - // A route table will be dynamically assigned to each request based on request attributes - // (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are - // specified in this message. - ScopedRoutes scoped_routes = 31; - } - - // A list of individual HTTP filters that make up the filter chain for - // requests made to the connection manager. :ref:`Order matters ` - // as the filters are processed sequentially as request events happen. - repeated HttpFilter http_filters = 5; - - // Whether the connection manager manipulates the :ref:`config_http_conn_man_headers_user-agent` - // and :ref:`config_http_conn_man_headers_downstream-service-cluster` headers. See the linked - // documentation for more information. Defaults to false. - google.protobuf.BoolValue add_user_agent = 6; - - // Presence of the object defines whether the connection manager - // emits :ref:`tracing ` data to the :ref:`configured tracing provider - // `. - Tracing tracing = 7; - - // Additional settings for HTTP requests handled by the connection manager. These will be - // applicable to both HTTP1 and HTTP2 requests. - api.v2.core.HttpProtocolOptions common_http_protocol_options = 35; - - // Additional HTTP/1 settings that are passed to the HTTP/1 codec. - api.v2.core.Http1ProtocolOptions http_protocol_options = 8; - - // Additional HTTP/2 settings that are passed directly to the HTTP/2 codec. - api.v2.core.Http2ProtocolOptions http2_protocol_options = 9; - - // An optional override that the connection manager will write to the server - // header in responses. If not set, the default is *envoy*. - string server_name = 10; - - // Defines the action to be applied to the Server header on the response path. - // By default, Envoy will overwrite the header with the value specified in - // server_name. - ServerHeaderTransformation server_header_transformation = 34 - [(validate.rules).enum = {defined_only: true}]; - - // The maximum request headers size for incoming connections. - // If unconfigured, the default max request headers allowed is 60 KiB. - // Requests that exceed this limit will receive a 431 response. - google.protobuf.UInt32Value max_request_headers_kb = 29 - [(validate.rules).uint32 = {lte: 8192 gt: 0}]; - - // The idle timeout for connections managed by the connection manager. The - // idle timeout is defined as the period in which there are no active - // requests. If not set, there is no idle timeout. When the idle timeout is - // reached the connection will be closed. If the connection is an HTTP/2 - // connection a drain sequence will occur prior to closing the connection. - // This field is deprecated. Use :ref:`idle_timeout - // ` - // instead. - google.protobuf.Duration idle_timeout = 11 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // The stream idle timeout for connections managed by the connection manager. - // If not specified, this defaults to 5 minutes. The default value was selected - // so as not to interfere with any smaller configured timeouts that may have - // existed in configurations prior to the introduction of this feature, while - // introducing robustness to TCP connections that terminate without a FIN. - // - // This idle timeout applies to new streams and is overridable by the - // :ref:`route-level idle_timeout - // `. Even on a stream in - // which the override applies, prior to receipt of the initial request - // headers, the :ref:`stream_idle_timeout - // ` - // applies. Each time an encode/decode event for headers or data is processed - // for the stream, the timer will be reset. If the timeout fires, the stream - // is terminated with a 408 Request Timeout error code if no upstream response - // header has been received, otherwise a stream reset occurs. - // - // This timeout also specifies the amount of time that Envoy will wait for the peer to open enough - // window to write any remaining stream data once the entirety of stream data (local end stream is - // true) has been buffered pending available window. In other words, this timeout defends against - // a peer that does not release enough window to completely write the stream, even though all - // data has been proxied within available flow control windows. If the timeout is hit in this - // case, the :ref:`tx_flush_timeout ` counter will be - // incremented. Note that :ref:`max_stream_duration - // ` does not apply to this corner - // case. - // - // Note that it is possible to idle timeout even if the wire traffic for a stream is non-idle, due - // to the granularity of events presented to the connection manager. For example, while receiving - // very large request headers, it may be the case that there is traffic regularly arriving on the - // wire while the connection manage is only able to observe the end-of-headers event, hence the - // stream may still idle timeout. - // - // A value of 0 will completely disable the connection manager stream idle - // timeout, although per-route idle timeout overrides will continue to apply. - google.protobuf.Duration stream_idle_timeout = 24; - - // The amount of time that Envoy will wait for the entire request to be received. - // The timer is activated when the request is initiated, and is disarmed when the last byte of the - // request is sent upstream (i.e. all decoding filters have processed the request), OR when the - // response is initiated. If not specified or set to 0, this timeout is disabled. - google.protobuf.Duration request_timeout = 28; - - // The time that Envoy will wait between sending an HTTP/2 “shutdown - // notification” (GOAWAY frame with max stream ID) and a final GOAWAY frame. - // This is used so that Envoy provides a grace period for new streams that - // race with the final GOAWAY frame. During this grace period, Envoy will - // continue to accept new streams. After the grace period, a final GOAWAY - // frame is sent and Envoy will start refusing new streams. Draining occurs - // both when a connection hits the idle timeout or during general server - // draining. The default grace period is 5000 milliseconds (5 seconds) if this - // option is not specified. - google.protobuf.Duration drain_timeout = 12; - - // The delayed close timeout is for downstream connections managed by the HTTP connection manager. - // It is defined as a grace period after connection close processing has been locally initiated - // during which Envoy will wait for the peer to close (i.e., a TCP FIN/RST is received by Envoy - // from the downstream connection) prior to Envoy closing the socket associated with that - // connection. - // NOTE: This timeout is enforced even when the socket associated with the downstream connection - // is pending a flush of the write buffer. However, any progress made writing data to the socket - // will restart the timer associated with this timeout. This means that the total grace period for - // a socket in this state will be - // +. - // - // Delaying Envoy's connection close and giving the peer the opportunity to initiate the close - // sequence mitigates a race condition that exists when downstream clients do not drain/process - // data in a connection's receive buffer after a remote close has been detected via a socket - // write(). This race leads to such clients failing to process the response code sent by Envoy, - // which could result in erroneous downstream processing. - // - // If the timeout triggers, Envoy will close the connection's socket. - // - // The default timeout is 1000 ms if this option is not specified. - // - // .. NOTE:: - // To be useful in avoiding the race condition described above, this timeout must be set - // to *at least* +<100ms to account for - // a reasonable "worst" case processing time for a full iteration of Envoy's event loop>. - // - // .. WARNING:: - // A value of 0 will completely disable delayed close processing. When disabled, the downstream - // connection's socket will be closed immediately after the write flush is completed or will - // never close if the write flush does not complete. - google.protobuf.Duration delayed_close_timeout = 26; - - // Configuration for :ref:`HTTP access logs ` - // emitted by the connection manager. - repeated accesslog.v2.AccessLog access_log = 13; - - // If set to true, the connection manager will use the real remote address - // of the client connection when determining internal versus external origin and manipulating - // various headers. If set to false or absent, the connection manager will use the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for`, - // :ref:`config_http_conn_man_headers_x-envoy-internal`, and - // :ref:`config_http_conn_man_headers_x-envoy-external-address` for more information. - google.protobuf.BoolValue use_remote_address = 14; - - // The number of additional ingress proxy hops from the right side of the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when - // determining the origin client's IP address. The default is zero if this option - // is not specified. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. - uint32 xff_num_trusted_hops = 19; - - // Configures what network addresses are considered internal for stats and header sanitation - // purposes. If unspecified, only RFC1918 IP addresses will be considered internal. - // See the documentation for :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information about internal/external addresses. - InternalAddressConfig internal_address_config = 25; - - // If set, Envoy will not append the remote address to the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. This may be used in - // conjunction with HTTP filters that explicitly manipulate XFF after the HTTP connection manager - // has mutated the request headers. While :ref:`use_remote_address - // ` - // will also suppress XFF addition, it has consequences for logging and other - // Envoy uses of the remote address, so *skip_xff_append* should be used - // when only an elision of XFF addition is intended. - bool skip_xff_append = 21; - - // Via header value to append to request and response headers. If this is - // empty, no via header will be appended. - string via = 22; - - // Whether the connection manager will generate the :ref:`x-request-id - // ` header if it does not exist. This defaults to - // true. Generating a random UUID4 is expensive so in high throughput scenarios where this feature - // is not desired it can be disabled. - google.protobuf.BoolValue generate_request_id = 15; - - // Whether the connection manager will keep the :ref:`x-request-id - // ` header if passed for a request that is edge - // (Edge request is the request from external clients to front Envoy) and not reset it, which - // is the current Envoy behaviour. This defaults to false. - bool preserve_external_request_id = 32; - - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - ForwardClientCertDetails forward_client_cert_details = 16 - [(validate.rules).enum = {defined_only: true}]; - - // This field is valid only when :ref:`forward_client_cert_details - // ` - // is APPEND_FORWARD or SANITIZE_SET and the client connection is mTLS. It specifies the fields in - // the client certificate to be forwarded. Note that in the - // :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, *Hash* is always set, and - // *By* is always set when the client certificate presents the URI type Subject Alternative Name - // value. - SetCurrentClientCertDetails set_current_client_cert_details = 17; - - // If proxy_100_continue is true, Envoy will proxy incoming "Expect: - // 100-continue" headers upstream, and forward "100 Continue" responses - // downstream. If this is false or not set, Envoy will instead strip the - // "Expect: 100-continue" header, and send a "100 Continue" response itself. - bool proxy_100_continue = 18; - - // If - // :ref:`use_remote_address - // ` - // is true and represent_ipv4_remote_address_as_ipv4_mapped_ipv6 is true and the remote address is - // an IPv4 address, the address will be mapped to IPv6 before it is appended to *x-forwarded-for*. - // This is useful for testing compatibility of upstream services that parse the header value. For - // example, 50.0.0.1 is represented as ::FFFF:50.0.0.1. See `IPv4-Mapped IPv6 Addresses - // `_ for details. This will also affect the - // :ref:`config_http_conn_man_headers_x-envoy-external-address` header. See - // :ref:`http_connection_manager.represent_ipv4_remote_address_as_ipv4_mapped_ipv6 - // ` for runtime - // control. - // [#not-implemented-hide:] - bool represent_ipv4_remote_address_as_ipv4_mapped_ipv6 = 20; - - repeated UpgradeConfig upgrade_configs = 23; - - // Should paths be normalized according to RFC 3986 before any processing of - // requests by HTTP filters or routing? This affects the upstream *:path* header - // as well. For paths that fail this check, Envoy will respond with 400 to - // paths that are malformed. This defaults to false currently but will default - // true in the future. When not specified, this value may be overridden by the - // runtime variable - // :ref:`http_connection_manager.normalize_path`. - // See `Normalization and Comparison `_ - // for details of normalization. - // Note that Envoy does not perform - // `case normalization `_ - google.protobuf.BoolValue normalize_path = 30; - - // Determines if adjacent slashes in the path are merged into one before any processing of - // requests by HTTP filters or routing. This affects the upstream *:path* header as well. Without - // setting this option, incoming requests with path `//dir///file` will not match against route - // with `prefix` match set to `/dir`. Defaults to `false`. Note that slash merging is not part of - // `HTTP spec `_ and is provided for convenience. - bool merge_slashes = 33; - - // The configuration of the request ID extension. This includes operations such as - // generation, validation, and associated tracing operations. - // - // If not set, Envoy uses the default UUID-based behavior: - // - // 1. Request ID is propagated using *x-request-id* header. - // - // 2. Request ID is a universally unique identifier (UUID). - // - // 3. Tracing decision (sampled, forced, etc) is set in 14th byte of the UUID. - RequestIDExtension request_id_extension = 36; -} - -message Rds { - // Configuration source specifier for RDS. - api.v2.core.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // The name of the route configuration. This name will be passed to the RDS - // API. This allows an Envoy configuration with multiple HTTP listeners (and - // associated HTTP connection manager filters) to use different route - // configurations. - string route_config_name = 2 [(validate.rules).string = {min_bytes: 1}]; -} - -// This message is used to work around the limitations with 'oneof' and repeated fields. -message ScopedRouteConfigurationsList { - repeated api.v2.ScopedRouteConfiguration scoped_route_configurations = 1 - [(validate.rules).repeated = {min_items: 1}]; -} - -// [#next-free-field: 6] -message ScopedRoutes { - // Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These - // keys are matched against a set of :ref:`Key` - // objects assembled from :ref:`ScopedRouteConfiguration` - // messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via - // :ref:`scoped_route_configurations_list`. - // - // Upon receiving a request's headers, the Router will build a key using the algorithm specified - // by this message. This key will be used to look up the routing table (i.e., the - // :ref:`RouteConfiguration`) to use for the request. - message ScopeKeyBuilder { - // Specifies the mechanism for constructing key fragments which are composed into scope keys. - message FragmentBuilder { - // Specifies how the value of a header should be extracted. - // The following example maps the structure of a header to the fields in this message. - // - // .. code:: - // - // <0> <1> <-- index - // X-Header: a=b;c=d - // | || | - // | || \----> - // | || - // | |\----> - // | | - // | \----> - // | - // \----> - // - // Each 'a=b' key-value pair constitutes an 'element' of the header field. - message HeaderValueExtractor { - // Specifies a header field's key value pair to match on. - message KvElement { - // The separator between key and value (e.g., '=' separates 'k=v;...'). - // If an element is an empty string, the element is ignored. - // If an element contains no separator, the whole element is parsed as key and the - // fragment value is an empty string. - // If there are multiple values for a matched key, the first value is returned. - string separator = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The key to match on. - string key = 2 [(validate.rules).string = {min_bytes: 1}]; - } - - // The name of the header field to extract the value from. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The element separator (e.g., ';' separates 'a;b;c;d'). - // Default: empty string. This causes the entirety of the header field to be extracted. - // If this field is set to an empty string and 'index' is used in the oneof below, 'index' - // must be set to 0. - string element_separator = 2; - - oneof extract_type { - // Specifies the zero based index of the element to extract. - // Note Envoy concatenates multiple values of the same header key into a comma separated - // string, the splitting always happens after the concatenation. - uint32 index = 3; - - // Specifies the key value pair to extract the value from. - KvElement element = 4; - } - } - - oneof type { - option (validate.required) = true; - - // Specifies how a header field's value should be extracted. - HeaderValueExtractor header_value_extractor = 1; - } - } - - // The final(built) scope key consists of the ordered union of these fragments, which are compared in order with the - // fragments of a :ref:`ScopedRouteConfiguration`. - // A missing fragment during comparison will make the key invalid, i.e., the computed key doesn't match any key. - repeated FragmentBuilder fragments = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // The name assigned to the scoped routing configuration. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The algorithm to use for constructing a scope key for each request. - ScopeKeyBuilder scope_key_builder = 2 [(validate.rules).message = {required: true}]; - - // Configuration source specifier for RDS. - // This config source is used to subscribe to RouteConfiguration resources specified in - // ScopedRouteConfiguration messages. - api.v2.core.ConfigSource rds_config_source = 3 [(validate.rules).message = {required: true}]; - - oneof config_specifier { - option (validate.required) = true; - - // The set of routing scopes corresponding to the HCM. A scope is assigned to a request by - // matching a key constructed from the request's attributes according to the algorithm specified - // by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRouteConfigurationsList scoped_route_configurations_list = 4; - - // The set of routing scopes associated with the HCM will be dynamically loaded via the SRDS - // API. A scope is assigned to a request by matching a key constructed from the request's - // attributes according to the algorithm specified by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRds scoped_rds = 5; - } -} - -message ScopedRds { - // Configuration source specifier for scoped RDS. - api.v2.core.ConfigSource scoped_rds_config_source = 1 - [(validate.rules).message = {required: true}]; -} - -message HttpFilter { - reserved 3; - - // The name of the filter to instantiate. The name must match a - // :ref:`supported filter `. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 4; - } -} - -message RequestIDExtension { - // Request ID extension specific configuration. - google.protobuf.Any typed_config = 1; -} diff --git a/src/main/proto/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto b/src/main/proto/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto deleted file mode 100644 index e5f86da..0000000 --- a/src/main/proto/envoy/config/filter/network/kafka_broker/v2alpha1/kafka_broker.proto +++ /dev/null @@ -1,72 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.kafka_broker.v2alpha1; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.kafka_broker.v2alpha1"; -option java_outer_classname = "KafkaBrokerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/kafka_broker/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.kafka_broker.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Kafka Broker] -// Kafka Broker :ref:`configuration overview `. -// [#extension: envoy.filters.network.kafka_broker] -// [#next-free-field: 6] -message KafkaBroker { - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Set to true if broker filter should attempt to serialize the received responses from the - // upstream broker instead of passing received bytes as is. - // Disabled by default. - bool force_response_rewrite = 2; - - // Optional broker address rewrite specification. - // Allows the broker filter to rewrite Kafka responses so that all connections established by - // the Kafka clients point to Envoy. - // This allows Kafka cluster not to configure its 'advertised.listeners' property - // (as the necessary re-pointing will be done by this filter). - // This collection of rules should cover all brokers in the cluster that is being proxied, - // otherwise some nodes' addresses might leak to the downstream clients. - oneof broker_address_rewrite_spec { - // Broker address rewrite rules that match by broker ID. - IdBasedBrokerRewriteSpec id_based_broker_address_rewrite_spec = 3; - } - - // Optional list of allowed Kafka API keys. Only requests with provided API keys will be - // routed, otherwise the connection will be closed. No effect if empty. - repeated uint32 api_keys_allowed = 4 - [(validate.rules).repeated = {items {uint32 {lte: 32767 gte: 0}}}]; - - // Optional list of denied Kafka API keys. Requests with API keys matching this list will have - // the connection closed. No effect if empty. - repeated uint32 api_keys_denied = 5 - [(validate.rules).repeated = {items {uint32 {lte: 32767 gte: 0}}}]; -} - -// Collection of rules matching by broker ID. -message IdBasedBrokerRewriteSpec { - repeated IdBasedBrokerRewriteRule rules = 1; -} - -// Defines a rule to rewrite broker address data. -message IdBasedBrokerRewriteRule { - // Broker ID to match. - uint32 id = 1 [(validate.rules).uint32 = {gte: 0}]; - - // The host value to use (resembling the host part of Kafka's advertised.listeners). - // The value should point to the Envoy (not Kafka) listener, so that all client traffic goes - // through Envoy. - string host = 2 [(validate.rules).string = {min_len: 1}]; - - // The port value to use (resembling the port part of Kafka's advertised.listeners). - // The value should point to the Envoy (not Kafka) listener, so that all client traffic goes - // through Envoy. - uint32 port = 3 [(validate.rules).uint32 = {lte: 65535}]; -} diff --git a/src/main/proto/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto b/src/main/proto/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto deleted file mode 100644 index 9c21ab2..0000000 --- a/src/main/proto/envoy/config/filter/network/local_rate_limit/v2alpha/local_rate_limit.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.local_rate_limit.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/type/token_bucket.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.local_rate_limit.v2alpha"; -option java_outer_classname = "LocalRateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/local_rate_limit/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.local_ratelimit.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Local rate limit] -// Local rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.network.local_ratelimit] - -message LocalRateLimit { - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The token bucket configuration to use for rate limiting connections that are processed by the - // filter's filter chain. Each incoming connection processed by the filter consumes a single - // token. If the token is available, the connection will be allowed. If no tokens are available, - // the connection will be immediately closed. - // - // .. note:: - // In the current implementation each filter and filter chain has an independent rate limit. - // - // .. note:: - // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive - // refills. - type.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; - - // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults - // to enabled. - api.v2.core.RuntimeFeatureFlag runtime_enabled = 3; -} diff --git a/src/main/proto/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto b/src/main/proto/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto deleted file mode 100644 index 88e914f..0000000 --- a/src/main/proto/envoy/config/filter/network/mongo_proxy/v2/mongo_proxy.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.mongo_proxy.v2; - -import "envoy/config/filter/fault/v2/fault.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.mongo_proxy.v2"; -option java_outer_classname = "MongoProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/mongo_proxy/v2;mongo_proxyv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.mongo_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Mongo proxy] -// MongoDB :ref:`configuration overview `. -// [#extension: envoy.filters.network.mongo_proxy] - -message MongoProxy { - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The optional path to use for writing Mongo access logs. If not access log - // path is specified no access logs will be written. Note that access log is - // also gated :ref:`runtime `. - string access_log = 2; - - // Inject a fixed delay before proxying a Mongo operation. Delays are - // applied to the following MongoDB operations: Query, Insert, GetMore, - // and KillCursors. Once an active delay is in progress, all incoming - // data up until the timer event fires will be a part of the delay. - fault.v2.FaultDelay delay = 3; - - // Flag to specify whether :ref:`dynamic metadata - // ` should be emitted. Defaults to false. - bool emit_dynamic_metadata = 4; -} diff --git a/src/main/proto/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto b/src/main/proto/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto deleted file mode 100644 index 8c6066c..0000000 --- a/src/main/proto/envoy/config/filter/network/mysql_proxy/v1alpha1/mysql_proxy.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.mysql_proxy.v1alpha1; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.mysql_proxy.v1alpha1"; -option java_outer_classname = "MysqlProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/mysql_proxy/v1alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.mysql_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: MySQL proxy] -// MySQL Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.mysql_proxy] - -message MySQLProxy { - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // [#not-implemented-hide:] The optional path to use for writing MySQL access logs. - // If the access log field is empty, access logs will not be written. - string access_log = 2; -} diff --git a/src/main/proto/envoy/config/filter/network/rate_limit/v2/rate_limit.proto b/src/main/proto/envoy/config/filter/network/rate_limit/v2/rate_limit.proto deleted file mode 100644 index b9c02b2..0000000 --- a/src/main/proto/envoy/config/filter/network/rate_limit/v2/rate_limit.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.rate_limit.v2; - -import "envoy/api/v2/ratelimit/ratelimit.proto"; -import "envoy/config/ratelimit/v2/rls.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.rate_limit.v2"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/rate_limit/v2;rate_limitv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.ratelimit.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.network.ratelimit] - -// [#next-free-field: 7] -message RateLimit { - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The rate limit domain to use in the rate limit service request. - string domain = 2 [(validate.rules).string = {min_bytes: 1}]; - - // The rate limit descriptor list to use in the rate limit service request. - repeated api.v2.ratelimit.RateLimitDescriptor descriptors = 3 - [(validate.rules).repeated = {min_items: 1}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 4; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 5; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - ratelimit.v2.RateLimitServiceConfig rate_limit_service = 6 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/filter/network/rbac/v2/rbac.proto b/src/main/proto/envoy/config/filter/network/rbac/v2/rbac.proto deleted file mode 100644 index 780cdc8..0000000 --- a/src/main/proto/envoy/config/filter/network/rbac/v2/rbac.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.rbac.v2; - -import "envoy/config/rbac/v2/rbac.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.rbac.v2"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/rbac/v2;rbacv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.filters.network.rbac.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: RBAC] -// Role-Based Access Control :ref:`configuration overview `. -// [#extension: envoy.filters.network.rbac] - -// RBAC network filter config. -// -// Header should not be used in rules/shadow_rules in RBAC network filter as -// this information is only available in :ref:`RBAC http filter `. -message RBAC { - enum EnforcementType { - // Apply RBAC policies when the first byte of data arrives on the connection. - ONE_TIME_ON_FIRST_BYTE = 0; - - // Continuously apply RBAC policies as data arrives. Use this mode when - // using RBAC with message oriented protocols such as Mongo, MySQL, Kafka, - // etc. when the protocol decoders emit dynamic metadata such as the - // resources being accessed and the operations on the resources. - CONTINUOUS = 1; - } - - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - config.rbac.v2.RBAC rules = 1; - - // Shadow rules are not enforced by the filter but will emit stats and logs - // and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - config.rbac.v2.RBAC shadow_rules = 2; - - // The prefix to use when emitting statistics. - string stat_prefix = 3 [(validate.rules).string = {min_bytes: 1}]; - - // RBAC enforcement strategy. By default RBAC will be enforced only once - // when the first byte of data arrives from the downstream. When used in - // conjunction with filters that emit dynamic metadata after decoding - // every payload (e.g., Mongo, MySQL, Kafka) set the enforcement type to - // CONTINUOUS to enforce RBAC policies on every message boundary. - EnforcementType enforcement_type = 4; -} diff --git a/src/main/proto/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto b/src/main/proto/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto deleted file mode 100644 index c8b6807..0000000 --- a/src/main/proto/envoy/config/filter/network/redis_proxy/v2/redis_proxy.proto +++ /dev/null @@ -1,246 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.redis_proxy.v2; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.redis_proxy.v2"; -option java_outer_classname = "RedisProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/redis_proxy/v2;redis_proxyv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.redis_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Redis Proxy] -// Redis Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.redis_proxy] - -// [#next-free-field: 7] -message RedisProxy { - // Redis connection pool settings. - // [#next-free-field: 9] - message ConnPoolSettings { - // ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently - // supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data - // because replication is asynchronous and requires some delay. You need to ensure that your - // application can tolerate stale data. - enum ReadPolicy { - // Default mode. Read from the current primary node. - MASTER = 0; - - // Read from the primary, but if it is unavailable, read from replica nodes. - PREFER_MASTER = 1; - - // Read from replica nodes. If multiple replica nodes are present within a shard, a random - // node is selected. Healthy nodes have precedent over unhealthy nodes. - REPLICA = 2; - - // Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not - // present or unhealthy), read from the primary. - PREFER_REPLICA = 3; - - // Read from any node of the cluster. A random node is selected among the primary and - // replicas, healthy nodes have precedent over unhealthy nodes. - ANY = 4; - } - - // Per-operation timeout in milliseconds. The timer starts when the first - // command of a pipeline is written to the backend connection. Each response received from Redis - // resets the timer since it signifies that the next command is being processed by the backend. - // The only exception to this behavior is when a connection to a backend is not yet established. - // In that case, the connect timeout on the cluster will govern the timeout until the connection - // is ready. - google.protobuf.Duration op_timeout = 1 [(validate.rules).duration = {required: true}]; - - // Use hash tagging on every redis key to guarantee that keys with the same hash tag will be - // forwarded to the same upstream. The hash key used for determining the upstream in a - // consistent hash ring configuration will be computed from the hash tagged key instead of the - // whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster - // implementation `_. - // - // Examples: - // - // * '{user1000}.following' and '{user1000}.followers' **will** be sent to the same upstream - // * '{user1000}.following' and '{user1001}.following' **might** be sent to the same upstream - bool enable_hashtagging = 2; - - // Accept `moved and ask redirection - // `_ errors from upstream - // redis servers, and retry commands to the specified target server. The target server does not - // need to be known to the cluster manager. If the command cannot be redirected, then the - // original error is passed downstream unchanged. By default, this support is not enabled. - bool enable_redirection = 3; - - // Maximum size of encoded request buffer before flush is triggered and encoded requests - // are sent upstream. If this is unset, the buffer flushes whenever it receives data - // and performs no batching. - // This feature makes it possible for multiple clients to send requests to Envoy and have - // them batched- for example if one is running several worker processes, each with its own - // Redis connection. There is no benefit to using this with a single downstream process. - // Recommended size (if enabled) is 1024 bytes. - uint32 max_buffer_size_before_flush = 4; - - // The encoded request buffer is flushed N milliseconds after the first request has been - // encoded, unless the buffer size has already exceeded `max_buffer_size_before_flush`. - // If `max_buffer_size_before_flush` is not set, this flush timer is not used. Otherwise, - // the timer should be set according to the number of clients, overall request rate and - // desired maximum latency for a single command. For example, if there are many requests - // being batched together at a high rate, the buffer will likely be filled before the timer - // fires. Alternatively, if the request rate is lower the buffer will not be filled as often - // before the timer fires. - // If `max_buffer_size_before_flush` is set, but `buffer_flush_timeout` is not, the latter - // defaults to 3ms. - google.protobuf.Duration buffer_flush_timeout = 5; - - // `max_upstream_unknown_connections` controls how many upstream connections to unknown hosts - // can be created at any given time by any given worker thread (see `enable_redirection` for - // more details). If the host is unknown and a connection cannot be created due to enforcing - // this limit, then redirection will fail and the original redirection error will be passed - // downstream unchanged. This limit defaults to 100. - google.protobuf.UInt32Value max_upstream_unknown_connections = 6; - - // Enable per-command statistics per upstream cluster, in addition to the filter level aggregate - // count. - bool enable_command_stats = 8; - - // Read policy. The default is to read from the primary. - ReadPolicy read_policy = 7 [(validate.rules).enum = {defined_only: true}]; - } - - message PrefixRoutes { - message Route { - // The router is capable of shadowing traffic from one cluster to another. The current - // implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to - // respond before returning the response from the primary cluster. All normal statistics are - // collected for the shadow cluster making this feature useful for testing. - message RequestMirrorPolicy { - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // If not specified or the runtime key is not present, all requests to the target cluster - // will be mirrored. - // - // If specified, Envoy will lookup the runtime key to get the percentage of requests to the - // mirror. - api.v2.core.RuntimeFractionalPercent runtime_fraction = 2; - - // Set this to TRUE to only mirror write commands, this is effectively replicating the - // writes in a "fire and forget" manner. - bool exclude_read_commands = 3; - } - - // String prefix that must match the beginning of the keys. Envoy will always favor the - // longest match. - string prefix = 1; - - // Indicates if the prefix needs to be removed from the key when forwarded. - bool remove_prefix = 2; - - // Upstream cluster to forward the command to. - string cluster = 3 [(validate.rules).string = {min_bytes: 1}]; - - // Indicates that the route has a request mirroring policy. - repeated RequestMirrorPolicy request_mirror_policy = 4; - } - - // List of prefix routes. - repeated Route routes = 1; - - // Indicates that prefix matching should be case insensitive. - bool case_insensitive = 2; - - // Optional catch-all route to forward commands that doesn't match any of the routes. The - // catch-all route becomes required when no routes are specified. - // .. attention:: - // - // This field is deprecated. Use a :ref:`catch_all - // route` - // instead. - string catch_all_cluster = 3 - [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Optional catch-all route to forward commands that doesn't match any of the routes. The - // catch-all route becomes required when no routes are specified. - Route catch_all_route = 4; - } - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Name of cluster from cluster manager. See the :ref:`configuration section - // ` of the architecture overview for recommendations on - // configuring the backing cluster. - // - // .. attention:: - // - // This field is deprecated. Use a :ref:`catch_all - // route` - // instead. - string cluster = 2 [deprecated = true, (envoy.annotations.disallowed_by_default) = true]; - - // Network settings for the connection pool to the upstream clusters. - ConnPoolSettings settings = 3 [(validate.rules).message = {required: true}]; - - // Indicates that latency stat should be computed in microseconds. By default it is computed in - // milliseconds. - bool latency_in_micros = 4; - - // List of **unique** prefixes used to separate keys from different workloads to different - // clusters. Envoy will always favor the longest match first in case of overlap. A catch-all - // cluster can be used to forward commands when there is no match. Time complexity of the - // lookups are in O(min(longest key prefix, key length)). - // - // Example: - // - // .. code-block:: yaml - // - // prefix_routes: - // routes: - // - prefix: "ab" - // cluster: "cluster_a" - // - prefix: "abc" - // cluster: "cluster_b" - // - // When using the above routes, the following prefixes would be sent to: - // - // * ``get abc:users`` would retrieve the key 'abc:users' from cluster_b. - // * ``get ab:users`` would retrieve the key 'ab:users' from cluster_a. - // * ``get z:users`` would return a NoUpstreamHost error. A :ref:`catch-all - // route` - // would have retrieved the key from that cluster instead. - // - // See the :ref:`configuration section - // ` of the architecture overview for recommendations on - // configuring the backing clusters. - PrefixRoutes prefix_routes = 5; - - // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis - // AUTH command `_ with this password before enabling any other - // command. If an AUTH command's password matches this password, an "OK" response will be returned - // to the client. If the AUTH command password does not match this password, then an "ERR invalid - // password" error will be returned. If any other command is received before AUTH when this - // password is set, then a "NOAUTH Authentication required." error response will be sent to the - // client. If an AUTH command is received when the password is not set, then an "ERR Client sent - // AUTH, but no password is set" error will be returned. - api.v2.core.DataSource downstream_auth_password = 6 [(udpa.annotations.sensitive) = true]; -} - -// RedisProtocolOptions specifies Redis upstream protocol options. This object is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name `envoy.filters.network.redis_proxy`. -message RedisProtocolOptions { - // Upstream server password as defined by the `requirepass` directive - // `_ in the server's configuration file. - api.v2.core.DataSource auth_password = 1 [(udpa.annotations.sensitive) = true]; -} diff --git a/src/main/proto/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto b/src/main/proto/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto deleted file mode 100644 index f5ef8de..0000000 --- a/src/main/proto/envoy/config/filter/network/sni_cluster/v2/sni_cluster.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.sni_cluster.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.sni_cluster.v2"; -option java_outer_classname = "SniClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/sni_cluster/v2;sni_clusterv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.sni_cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: SNI Cluster Filter] -// Set the upstream cluster name from the SNI field in the TLS connection. -// [#extension: envoy.filters.network.sni_cluster] - -message SniCluster { -} diff --git a/src/main/proto/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto b/src/main/proto/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto deleted file mode 100644 index 25a020a..0000000 --- a/src/main/proto/envoy/config/filter/network/tcp_proxy/v2/tcp_proxy.proto +++ /dev/null @@ -1,185 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.tcp_proxy.v2; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/config/filter/accesslog/v2/accesslog.proto"; -import "envoy/type/hash_policy.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.tcp_proxy.v2"; -option java_outer_classname = "TcpProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2;tcp_proxyv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.tcp_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: TCP Proxy] -// TCP Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.tcp_proxy] - -// [#next-free-field: 13] -message TcpProxy { - // [#not-implemented-hide:] Deprecated. - // TCP Proxy filter configuration using V1 format. - message DeprecatedV1 { - option deprecated = true; - - // A TCP proxy route consists of a set of optional L4 criteria and the - // name of a cluster. If a downstream connection matches all the - // specified criteria, the cluster in the route is used for the - // corresponding upstream connection. Routes are tried in the order - // specified until a match is found. If no match is found, the connection - // is closed. A route with no criteria is valid and always produces a - // match. - // [#next-free-field: 6] - message TCPRoute { - // The cluster to connect to when a the downstream network connection - // matches the specified criteria. - string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // An optional list of IP address subnets in the form - // “ip_address/xx”. The criteria is satisfied if the destination IP - // address of the downstream connection is contained in at least one of - // the specified subnets. If the parameter is not specified or the list - // is empty, the destination IP address is ignored. The destination IP - // address of the downstream connection might be different from the - // addresses on which the proxy is listening if the connection has been - // redirected. - repeated api.v2.core.CidrRange destination_ip_list = 2; - - // An optional string containing a comma-separated list of port numbers - // or ranges. The criteria is satisfied if the destination port of the - // downstream connection is contained in at least one of the specified - // ranges. If the parameter is not specified, the destination port is - // ignored. The destination port address of the downstream connection - // might be different from the port on which the proxy is listening if - // the connection has been redirected. - string destination_ports = 3; - - // An optional list of IP address subnets in the form - // “ip_address/xx”. The criteria is satisfied if the source IP address - // of the downstream connection is contained in at least one of the - // specified subnets. If the parameter is not specified or the list is - // empty, the source IP address is ignored. - repeated api.v2.core.CidrRange source_ip_list = 4; - - // An optional string containing a comma-separated list of port numbers - // or ranges. The criteria is satisfied if the source port of the - // downstream connection is contained in at least one of the specified - // ranges. If the parameter is not specified, the source port is - // ignored. - string source_ports = 5; - } - - // The route table for the filter. All filter instances must have a route - // table, even if it is empty. - repeated TCPRoute routes = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Allows for specification of multiple upstream clusters along with weights - // that indicate the percentage of traffic to be forwarded to each cluster. - // The router selects an upstream cluster based on these weights. - message WeightedCluster { - message ClusterWeight { - // Name of the upstream cluster. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // When a request matches the route, the choice of an upstream cluster is - // determined by its weight. The sum of weights across all entries in the - // clusters array determines the total weight. - uint32 weight = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what is set in this field will be considered - // for load balancing. Note that this will be merged with what's provided in - // :ref:`TcpProxy.metadata_match - // `, with values - // here taking precedence. The filter name should be specified as *envoy.lb*. - api.v2.core.Metadata metadata_match = 3; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Configuration for tunneling TCP over other transports or application layers. - // Currently, only HTTP/2 is supported. When other options exist, HTTP/2 will - // remain the default. - message TunnelingConfig { - // The hostname to send in the synthesized CONNECT headers to the upstream proxy. - string hostname = 1 [(validate.rules).string = {min_bytes: 1}]; - } - - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof cluster_specifier { - option (validate.required) = true; - - // The upstream cluster to connect to. - string cluster = 2; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedCluster weighted_clusters = 10; - } - - // Optional endpoint metadata match criteria. Only endpoints in the upstream - // cluster with metadata matching that set in metadata_match will be - // considered. The filter name should be specified as *envoy.lb*. - api.v2.core.Metadata metadata_match = 9; - - // The idle timeout for connections managed by the TCP proxy filter. The idle timeout - // is defined as the period in which there are no bytes sent or received on either - // the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set - // to 0s, the timeout will be disabled. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - google.protobuf.Duration idle_timeout = 8; - - // [#not-implemented-hide:] The idle timeout for connections managed by the TCP proxy - // filter. The idle timeout is defined as the period in which there is no - // active traffic. If not set, there is no idle timeout. When the idle timeout - // is reached the connection will be closed. The distinction between - // downstream_idle_timeout/upstream_idle_timeout provides a means to set - // timeout based on the last byte sent on the downstream/upstream connection. - google.protobuf.Duration downstream_idle_timeout = 3; - - // [#not-implemented-hide:] - google.protobuf.Duration upstream_idle_timeout = 4; - - // Configuration for :ref:`access logs ` - // emitted by the this tcp_proxy. - repeated accesslog.v2.AccessLog access_log = 5; - - // [#not-implemented-hide:] Deprecated. - DeprecatedV1 deprecated_v1 = 6 [deprecated = true]; - - // The maximum number of unsuccessful connection attempts that will be made before - // giving up. If the parameter is not specified, 1 connection attempt will be made. - google.protobuf.UInt32Value max_connect_attempts = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Optional configuration for TCP proxy hash policy. If hash_policy is not set, the hash-based - // load balancing algorithms will select a host randomly. Currently the number of hash policies is - // limited to 1. - repeated type.HashPolicy hash_policy = 11 [(validate.rules).repeated = {max_items: 1}]; - - // [#not-implemented-hide:] feature in progress - // If set, this configures tunneling, e.g. configuration options to tunnel multiple TCP - // payloads over a shared HTTP/2 tunnel. If this message is absent, the payload - // will be proxied upstream as per usual. - TunnelingConfig tunneling_config = 12; -} diff --git a/src/main/proto/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto b/src/main/proto/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto deleted file mode 100644 index 3144f3b..0000000 --- a/src/main/proto/envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto +++ /dev/null @@ -1,142 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.thrift_proxy.v2alpha1; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/route/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/thrift_proxy/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.thrift_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Thrift Proxy Route Configuration] -// Thrift Proxy :ref:`configuration overview `. - -message RouteConfiguration { - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; -} - -message Route { - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - oneof match_specifier { - option (validate.required) = true; - - // If specified, the route must exactly match the request method name. As a special case, an - // empty string matches any request method name. - string method_name = 1; - - // If specified, the route must have the service name as the request method name prefix. As a - // special case, an empty string matches any service name. Only relevant when service - // multiplexing. - string service_name = 2; - } - - // Inverts whatever matching is done in the :ref:`method_name - // ` or - // :ref:`service_name - // ` fields. - // Cannot be combined with wildcard matching as that would result in routes never being matched. - // - // .. note:: - // - // This does not invert matching done as part of the :ref:`headers field - // ` field. To - // invert header matching, see :ref:`invert_match - // `. - bool invert = 3; - - // Specifies a set of headers that the route should match on. The router will check the request’s - // headers against all the specified headers in the route config. A match will happen if all the - // headers in the route are present in the request with the same values (or based on presence if - // the value field is not in the config). Note that this only applies for Thrift transports and/or - // protocols that support headers. - repeated api.v2.route.HeaderMatcher headers = 4; -} - -// [#next-free-field: 7] -message RouteAction { - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates a single upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedCluster weighted_clusters = 2; - - // Envoy will determine the cluster to route to by reading the value of the - // Thrift header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist Envoy will - // respond with an unknown method exception or an internal error exception, - // respectively. - string cluster_header = 6 [(validate.rules).string = {min_bytes: 1}]; - } - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered. - // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match - // `, - // with values there taking precedence. Keys and values should be provided under the "envoy.lb" - // metadata key. - api.v2.core.Metadata metadata_match = 3; - - // Specifies a set of rate limit configurations that could be applied to the route. - // N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders - // action with the header name ":method-name". - repeated api.v2.route.RateLimit rate_limits = 4; - - // Strip the service prefix from the method name, if there's a prefix. For - // example, the method call Service:method would end up being just method. - bool strip_service_name = 5; -} - -// Allows for specification of multiple upstream clusters along with weights that indicate the -// percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster -// based on these weights. -message WeightedCluster { - message ClusterWeight { - // Name of the upstream cluster. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // When a request matches the route, the choice of an upstream cluster is determined by its - // weight. The sum of weights across all entries in the clusters array determines the total - // weight. - google.protobuf.UInt32Value weight = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field, combined with what's - // provided in :ref:`RouteAction's metadata_match - // `, - // will be considered. Values here will take precedence. Keys and values should be provided - // under the "envoy.lb" metadata key. - api.v2.core.Metadata metadata_match = 3; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto b/src/main/proto/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto deleted file mode 100644 index 56639db..0000000 --- a/src/main/proto/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto +++ /dev/null @@ -1,122 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.thrift_proxy.v2alpha1; - -import "envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1"; -option java_outer_classname = "ThriftProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/thrift_proxy/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.thrift_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Thrift Proxy] -// Thrift Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.thrift_proxy] - -// Thrift transport types supported by Envoy. -enum TransportType { - // For downstream connections, the Thrift proxy will attempt to determine which transport to use. - // For upstream connections, the Thrift proxy will use same transport as the downstream - // connection. - AUTO_TRANSPORT = 0; - - // The Thrift proxy will use the Thrift framed transport. - FRAMED = 1; - - // The Thrift proxy will use the Thrift unframed transport. - UNFRAMED = 2; - - // The Thrift proxy will assume the client is using the Thrift header transport. - HEADER = 3; -} - -// Thrift Protocol types supported by Envoy. -enum ProtocolType { - // For downstream connections, the Thrift proxy will attempt to determine which protocol to use. - // Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol - // detection. For upstream connections, the Thrift proxy will use the same protocol as the - // downstream connection. - AUTO_PROTOCOL = 0; - - // The Thrift proxy will use the Thrift binary protocol. - BINARY = 1; - - // The Thrift proxy will use Thrift non-strict binary protocol. - LAX_BINARY = 2; - - // The Thrift proxy will use the Thrift compact protocol. - COMPACT = 3; - - // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. - TWITTER = 4; -} - -// [#next-free-field: 6] -message ThriftProxy { - // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. - TransportType transport = 2 [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. - ProtocolType protocol = 3 [(validate.rules).enum = {defined_only: true}]; - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The route table for the connection manager is static and is specified in this property. - RouteConfiguration route_config = 4; - - // A list of individual Thrift filters that make up the filter chain for requests made to the - // Thrift proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no thrift_filters are specified, a default Thrift router filter - // (`envoy.filters.thrift.router`) is used. - repeated ThriftFilter thrift_filters = 5; -} - -// ThriftFilter configures a Thrift filter. -message ThriftFilter { - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(zuercher): Auto generate the following list] - // * :ref:`envoy.filters.thrift.router ` - // * :ref:`envoy.filters.thrift.rate_limit ` - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } -} - -// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in -// in -// :ref:`typed_extension_protocol_options`, -// keyed by the name `envoy.filters.network.thrift_proxy`. -message ThriftProtocolOptions { - // Supplies the type of transport that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_TRANSPORT`, - // which is the default, causes the proxy to use the same transport as the downstream connection. - TransportType transport = 1 [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_PROTOCOL`, - // which is the default, causes the proxy to use the same protocol as the downstream connection. - ProtocolType protocol = 2 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto b/src/main/proto/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto deleted file mode 100644 index 68704f2..0000000 --- a/src/main/proto/envoy/config/filter/network/zookeeper_proxy/v1alpha1/zookeeper_proxy.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.network.zookeeper_proxy.v1alpha1; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.network.zookeeper_proxy.v1alpha1"; -option java_outer_classname = "ZookeeperProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/zookeeper_proxy/v1alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.zookeeper_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: ZooKeeper proxy] -// ZooKeeper Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.zookeeper_proxy] - -message ZooKeeperProxy { - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - // [#not-implemented-hide:] The optional path to use for writing ZooKeeper access logs. - // If the access log field is empty, access logs will not be written. - string access_log = 2; - - // Messages — requests, responses and events — that are bigger than this value will - // be ignored. If it is not set, the default value is 1Mb. - // - // The value here should match the jute.maxbuffer property in your cluster configuration: - // - // https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#Unsafe+Options - // - // if that is set. If it isn't, ZooKeeper's default is also 1Mb. - google.protobuf.UInt32Value max_packet_bytes = 3; -} diff --git a/src/main/proto/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto b/src/main/proto/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto deleted file mode 100644 index 90cec49..0000000 --- a/src/main/proto/envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.thrift.rate_limit.v2alpha1; - -import "envoy/config/ratelimit/v2/rls.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.thrift.rate_limit.v2alpha1"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/thrift/rate_limit/v2alpha1"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.rate_limit] - -// [#next-free-field: 6] -message RateLimit { - // The rate limit domain to use in the rate limit service request. - string domain = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Specifies the rate limit configuration stage. Each configured rate limit filter performs a - // rate limit check using descriptors configured in the - // :ref:`envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.RouteAction` for the request. - // Only those entries with a matching stage number are used for a given filter. If not set, the - // default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 2 [(validate.rules).uint32 = {lte: 10}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 3; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 4; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - ratelimit.v2.RateLimitServiceConfig rate_limit_service = 5 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/filter/thrift/router/v2alpha1/router.proto b/src/main/proto/envoy/config/filter/thrift/router/v2alpha1/router.proto deleted file mode 100644 index 5a7b988..0000000 --- a/src/main/proto/envoy/config/filter/thrift/router/v2alpha1/router.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.thrift.router.v2alpha1; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.thrift.router.v2alpha1"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/thrift/router/v2alpha1"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Router] -// Thrift router :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.router] - -message Router { -} diff --git a/src/main/proto/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto b/src/main/proto/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto deleted file mode 100644 index e762caa..0000000 --- a/src/main/proto/envoy/config/filter/udp/udp_proxy/v2alpha/udp_proxy.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package envoy.config.filter.udp.udp_proxy.v2alpha; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.filter.udp.udp_proxy.v2alpha"; -option java_outer_classname = "UdpProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/filter/udp/udp_proxy/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.filters.udp.udp_proxy.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: UDP proxy] -// UDP proxy :ref:`configuration overview `. -// [#extension: envoy.filters.udp_listener.udp_proxy] - -// Configuration for the UDP proxy filter. -message UdpProxyConfig { - // The stat prefix used when emitting UDP proxy filter stats. - string stat_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof route_specifier { - option (validate.required) = true; - - // The upstream cluster to connect to. - string cluster = 2 [(validate.rules).string = {min_bytes: 1}]; - } - - // The idle timeout for sessions. Idle is defined as no datagrams between received or sent by - // the session. The default if not specified is 1 minute. - google.protobuf.Duration idle_timeout = 3; -} diff --git a/src/main/proto/envoy/config/grpc_credential/v2alpha/aws_iam.proto b/src/main/proto/envoy/config/grpc_credential/v2alpha/aws_iam.proto deleted file mode 100644 index d67900b..0000000 --- a/src/main/proto/envoy/config/grpc_credential/v2alpha/aws_iam.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.config.grpc_credential.v2alpha; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.grpc_credential.v2alpha"; -option java_outer_classname = "AwsIamProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Grpc Credentials AWS IAM] -// Configuration for AWS IAM Grpc Credentials Plugin -// [#extension: envoy.grpc_credentials.aws_iam] - -message AwsIamConfig { - // The `service namespace - // `_ - // of the Grpc endpoint. - // - // Example: appmesh - string service_name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The `region `_ hosting the Grpc - // endpoint. If unspecified, the extension will use the value in the ``AWS_REGION`` environment - // variable. - // - // Example: us-west-2 - string region = 2; -} diff --git a/src/main/proto/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto b/src/main/proto/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto deleted file mode 100644 index 07290a7..0000000 --- a/src/main/proto/envoy/config/grpc_credential/v2alpha/file_based_metadata.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.config.grpc_credential.v2alpha; - -import "envoy/api/v2/core/base.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.grpc_credential.v2alpha"; -option java_outer_classname = "FileBasedMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Grpc Credentials File Based Metadata] -// Configuration for File Based Metadata Grpc Credentials Plugin -// [#extension: envoy.grpc_credentials.file_based_metadata] - -message FileBasedMetadataConfig { - // Location or inline data of secret to use for authentication of the Google gRPC connection - // this secret will be attached to a header of the gRPC connection - api.v2.core.DataSource secret_data = 1 [(udpa.annotations.sensitive) = true]; - - // Metadata header key to use for sending the secret data - // if no header key is set, "authorization" header will be used - string header_key = 2; - - // Prefix to prepend to the secret in the metadata header - // if no prefix is set, the default is to use no prefix - string header_prefix = 3; -} diff --git a/src/main/proto/envoy/config/grpc_credential/v3/file_based_metadata.proto b/src/main/proto/envoy/config/grpc_credential/v3/file_based_metadata.proto deleted file mode 100644 index a9e6c94..0000000 --- a/src/main/proto/envoy/config/grpc_credential/v3/file_based_metadata.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.config.grpc_credential.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.grpc_credential.v3"; -option java_outer_classname = "FileBasedMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/grpc_credential/v3;grpc_credentialv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Grpc Credentials File Based Metadata] -// Configuration for File Based Metadata Grpc Credentials Plugin -// [#extension: envoy.grpc_credentials.file_based_metadata] - -message FileBasedMetadataConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.grpc_credential.v2alpha.FileBasedMetadataConfig"; - - // Location or inline data of secret to use for authentication of the Google gRPC connection - // this secret will be attached to a header of the gRPC connection - core.v3.DataSource secret_data = 1 [(udpa.annotations.sensitive) = true]; - - // Metadata header key to use for sending the secret data - // if no header key is set, "authorization" header will be used - string header_key = 2; - - // Prefix to prepend to the secret in the metadata header - // if no prefix is set, the default is to use no prefix - string header_prefix = 3; -} diff --git a/src/main/proto/envoy/config/health_checker/redis/v2/redis.proto b/src/main/proto/envoy/config/health_checker/redis/v2/redis.proto deleted file mode 100644 index 22d404c..0000000 --- a/src/main/proto/envoy/config/health_checker/redis/v2/redis.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.config.health_checker.redis.v2; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.health_checker.redis.v2"; -option java_outer_classname = "RedisProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/health_checker/redis/v2;redisv2"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Redis] -// Redis health checker :ref:`configuration overview `. -// [#extension: envoy.health_checkers.redis] - -message Redis { - // If set, optionally perform ``EXISTS `` instead of ``PING``. A return value - // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other - // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance - // by setting the specified key to any value and waiting for traffic to drain. - string key = 1; -} diff --git a/src/main/proto/envoy/config/listener/v2/api_listener.proto b/src/main/proto/envoy/config/listener/v2/api_listener.proto deleted file mode 100644 index ae47c7d..0000000 --- a/src/main/proto/envoy/config/listener/v2/api_listener.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v2; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v2"; -option java_outer_classname = "ApiListenerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v2;listenerv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.listener.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: API listener] - -// Describes a type of API listener, which is used in non-proxy clients. The type of API -// exposed to the non-proxy application depends on the type of API listener. -message ApiListener { - // The type in this field determines the type of API listener. At present, the following - // types are supported: - // envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager (HTTP) - // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the - // specific config message for each type of API listener. We could not do this in v2 because - // it would have caused circular dependencies for go protos: lds.proto depends on this file, - // and http_connection_manager.proto depends on rds.proto, which is in the same directory as - // lds.proto, so lds.proto cannot depend on this file.] - google.protobuf.Any api_listener = 1; -} diff --git a/src/main/proto/envoy/config/listener/v3/api_listener.proto b/src/main/proto/envoy/config/listener/v3/api_listener.proto deleted file mode 100644 index a3610e6..0000000 --- a/src/main/proto/envoy/config/listener/v3/api_listener.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "ApiListenerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: API listener] - -// Describes a type of API listener, which is used in non-proxy clients. The type of API -// exposed to the non-proxy application depends on the type of API listener. -message ApiListener { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.listener.v2.ApiListener"; - - // The type in this field determines the type of API listener. At present, the following - // types are supported: - // envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager (HTTP) - // envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager (HTTP) - // [#next-major-version: In the v3 API, replace this Any field with a oneof containing the - // specific config message for each type of API listener. We could not do this in v2 because - // it would have caused circular dependencies for go protos: lds.proto depends on this file, - // and http_connection_manager.proto depends on rds.proto, which is in the same directory as - // lds.proto, so lds.proto cannot depend on this file.] - google.protobuf.Any api_listener = 1; -} diff --git a/src/main/proto/envoy/config/listener/v3/listener.proto b/src/main/proto/envoy/config/listener/v3/listener.proto deleted file mode 100644 index 772f4cd..0000000 --- a/src/main/proto/envoy/config/listener/v3/listener.proto +++ /dev/null @@ -1,457 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/socket_option.proto"; -import "envoy/config/listener/v3/api_listener.proto"; -import "envoy/config/listener/v3/listener_components.proto"; -import "envoy/config/listener/v3/udp_listener_config.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/core/v3/collection_entry.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "ListenerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Listener configuration] -// Listener :ref:`configuration overview ` - -// The additional address the listener is listening on. -message AdditionalAddress { - core.v3.Address address = 1; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. If specified, this will override the - // :ref:`socket_options ` - // in the listener. If specified with no - // :ref:`socket_options ` - // or an empty list of :ref:`socket_options `, - // it means no socket option will apply. - core.v3.SocketOptionsOverride socket_options = 2; - - // Configures TCP keepalive settings for the additional address. - // If not set, the listener :ref:`tcp_keepalive ` - // configuration is inherited. You can explicitly disable TCP keepalive for the additional address by setting any keepalive field - // (:ref:`keepalive_probes `, - // :ref:`keepalive_time `, or - // :ref:`keepalive_interval `) to ``0``. - core.v3.TcpKeepalive tcp_keepalive = 3; -} - -// Listener list collections. Entries are ``Listener`` resources or references. -// [#not-implemented-hide:] -message ListenerCollection { - repeated xds.core.v3.CollectionEntry entries = 1; -} - -// [#next-free-field: 38] -message Listener { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Listener"; - - enum DrainType { - // Drain in response to calling /healthcheck/fail admin endpoint (along with the health check - // filter), listener removal/modification, and hot restart. - DEFAULT = 0; - - // Drain in response to listener removal/modification and hot restart. This setting does not - // include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress - // and egress listeners. - MODIFY_ONLY = 1; - } - - // [#not-implemented-hide:] - message DeprecatedV1 { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Listener.DeprecatedV1"; - - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that - // set use_original_dst parameter to true. Default is true. - // - // This is deprecated. Use :ref:`Listener.bind_to_port - // ` - google.protobuf.BoolValue bind_to_port = 1; - } - - // Configuration for listener connection balancing. - message ConnectionBalanceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Listener.ConnectionBalanceConfig"; - - // A connection balancer implementation that does exact balancing. This means that a lock is - // held during balancing so that connection counts are nearly exactly balanced between worker - // threads. This is "nearly" exact in the sense that a connection might close in parallel thus - // making the counts incorrect, but this should be rectified on the next accept. This balancer - // sacrifices accept throughput for accuracy and should be used when there are a small number of - // connections that rarely cycle (e.g., service mesh gRPC egress). - message ExactBalance { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance"; - } - - oneof balance_type { - option (validate.required) = true; - - // If specified, the listener will use the exact connection balancer. - ExactBalance exact_balance = 1; - - // The listener will use the connection balancer according to ``type_url``. If ``type_url`` is invalid, - // Envoy will not attempt to balance active connections between worker threads. - // The ``envoy.network.connection_balance`` extension category is currently empty - // because the only registered member (``envoy.network.connection_balance.dlb``) - // is disabled. See https://github.com/envoyproxy/envoy/issues/45491. - core.v3.TypedExtensionConfig extend_balance = 2; - } - } - - // Configuration for envoy internal listener. All the future internal listener features should be added here. - message InternalListenerConfig { - } - - // Configuration for filter chains discovery. - // [#not-implemented-hide:] - message FcdsConfig { - // Optional name to present to the filter chain discovery service. This may be an arbitrary name with arbitrary - // length. If a name is not provided, the listener's name is used. Refer to :ref:`filter_chains `. - // for details on how listener name is determined if unspecified. In addition, this may be a xdstp:// URL. - string name = 1; - - // Configuration for the source of FCDS updates for this listener. - // .. note:: - // This discovery service only supports ``AGGREGATED_GRPC`` API type. - core.v3.ConfigSource config_source = 2; - } - - reserved 14, 23; - - // The unique name by which this listener is known. If no name is provided, - // Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically - // updated or removed via :ref:`LDS ` a unique name must be provided. - string name = 1; - - // The address that the listener should listen on. In general, the address must be unique, though - // that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on - // Linux as the actual port will be allocated by the OS. - // Required unless ``api_listener`` or ``listener_specifier`` is populated. - // - // When the address contains a network namespace filepath (via - // :ref:`network_namespace_filepath `), - // Envoy automatically populates the filter state with key ``envoy.network.network_namespace`` - // when a connection is accepted. This provides read-only access to the network namespace for - // filters, access logs, and other components. - core.v3.Address address = 2; - - // The additional addresses the listener should listen on. The addresses must be unique across all - // listeners. Multiple addresses with port 0 can be supplied. When using multiple addresses in a single listener, - // all addresses use the same protocol, and multiple internal addresses are not supported. - repeated AdditionalAddress additional_addresses = 33; - - // Optional prefix to use on listener stats. If empty, the stats will be rooted at - // ``listener.
.``. If non-empty, stats will be rooted at - // ``listener..``. - string stat_prefix = 28; - - // A list of filter chains to consider for this listener. The - // :ref:`FilterChain ` with the most specific - // :ref:`FilterChainMatch ` criteria is used on a - // connection. - // - // Example using SNI for filter chain selection can be found in the - // :ref:`FAQ entry `. - repeated FilterChain filter_chains = 3; - - // Discover filter chains configurations by external service. Dynamic discovery of filter chains is allowed - // while having statically configured filter chains, however, a filter chain name must be unique within a - // listener. If a discovered filter chain matches a name of an existing filter chain, it is discarded. - // [#not-implemented-hide:] - FcdsConfig fcds_config = 36; - - // :ref:`Matcher API ` resolving the filter chain name from the - // network properties. This matcher is used as a replacement for the filter chain match condition - // :ref:`filter_chain_match - // `. If specified, all - // :ref:`filter_chains ` must have a - // non-empty and unique :ref:`name ` field - // and not specify :ref:`filter_chain_match - // ` field. - // - // .. note:: - // - // Once matched, each connection is permanently bound to its filter chain. - // If the matcher changes but the filter chain remains the same, the - // connections bound to the filter chain are not drained. If, however, the - // filter chain is removed or structurally modified, then the drain for its - // connections is initiated. - xds.type.matcher.v3.Matcher filter_chain_matcher = 32; - - // If a connection is redirected using ``iptables``, the port on which the proxy - // receives it might be different from the original destination address. When this flag is set to - // true, the listener hands off redirected connections to the listener associated with the - // original destination address. If there is no listener associated with the original destination - // address, the connection is handled by the listener that receives it. Defaults to false. - google.protobuf.BoolValue use_original_dst = 4; - - // The default filter chain if none of the filter chain matches. If no default filter chain is supplied, - // the connection will be closed. The filter chain match is ignored in this field. - FilterChain default_filter_chain = 25; - - // Soft limit on size of the listener’s new connection read and write buffers. - // If unspecified, an implementation defined default is applied (1MiB). - google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // Listener metadata. - core.v3.Metadata metadata = 6; - - // [#not-implemented-hide:] - DeprecatedV1 deprecated_v1 = 7 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The type of draining to perform at a listener-wide level. - DrainType drain_type = 8; - - // Listener filters have the opportunity to manipulate and augment the connection metadata that - // is used in connection filter chain matching, for example. These filters are run before any in - // :ref:`filter_chains `. Order matters as the - // filters are processed sequentially right after a socket has been accepted by the listener, and - // before a connection is created. - // UDP Listener filters can be specified when the protocol in the listener socket address in - // :ref:`protocol ` is :ref:`UDP - // ` and no - // :ref:`quic_options ` is specified in :ref:`udp_listener_config `. - // QUIC listener filters can be specified when :ref:`quic_options - // ` is - // specified in :ref:`udp_listener_config `. - // They are processed sequentially right before connection creation. And like TCP Listener filters, they can be used to manipulate the connection metadata and socket. But the difference is that they can't be used to pause connection creation. - repeated ListenerFilter listener_filters = 9; - - // The timeout to wait for all listener filters to complete operation. If the timeout is reached, - // the accepted socket is closed without a connection being created unless - // ``continue_on_listener_filters_timeout`` is set to true. Specify 0 to disable the - // timeout. If not specified, a default timeout of 15s is used. - google.protobuf.Duration listener_filters_timeout = 15; - - // Whether a connection should be created when listener filters timeout. Default is false. - // - // .. attention:: - // - // Some listener filters, such as :ref:`Proxy Protocol filter - // `, should not be used with this option. It will cause - // unexpected behavior when a connection is created. - bool continue_on_listener_filters_timeout = 17; - - // Whether the listener should be set as a transparent socket. - // When this flag is set to true, connections can be redirected to the listener using an - // ``iptables`` ``TPROXY`` target, in which case the original source and destination addresses and - // ports are preserved on accepted connections. This flag should be used in combination with - // :ref:`an original_dst ` :ref:`listener filter - // ` to mark the connections' local addresses as - // "restored." This can be used to hand off each redirected connection to another listener - // associated with the connection's destination address. Direct connections to the socket without - // using ``TPROXY`` cannot be distinguished from connections redirected using ``TPROXY`` and are - // therefore treated as if they were redirected. - // When this flag is set to false, the listener's socket is explicitly reset as non-transparent. - // Setting this flag requires Envoy to run with the ``CAP_NET_ADMIN`` capability. - // When this flag is not set (default), the socket is not modified, i.e. the transparent option - // is neither set nor reset. - google.protobuf.BoolValue transparent = 10; - - // Whether the listener should set the ``IP_FREEBIND`` socket option. When this - // flag is set to true, listeners can be bound to an IP address that is not - // configured on the system running Envoy. When this flag is set to false, the - // option ``IP_FREEBIND`` is disabled on the socket. When this flag is not set - // (default), the socket is not modified, i.e. the option is neither enabled - // nor disabled. - google.protobuf.BoolValue freebind = 11; - - // Additional socket options that may not be present in Envoy source code or - // precompiled binaries. - // It is not allowed to update the socket options for any existing address if - // :ref:`enable_reuse_port ` - // is ``false`` to avoid the conflict when creating new sockets for the listener. - repeated core.v3.SocketOption socket_options = 13; - - // Whether the listener should accept TCP Fast Open (TFO) connections. - // When this flag is set to a value greater than 0, the option TCP_FASTOPEN is enabled on - // the socket, with a queue length of the specified size - // (see `details in RFC7413 `_). - // When this flag is set to 0, the option TCP_FASTOPEN is disabled on the socket. - // When this flag is not set (default), the socket is not modified, - // i.e. the option is neither enabled nor disabled. - // - // On Linux, the net.ipv4.tcp_fastopen kernel parameter must include flag 0x2 to enable - // TCP_FASTOPEN. - // See `ip-sysctl.txt `_. - // - // On macOS, only values of 0, 1, and unset are valid; other values may result in an error. - // To set the queue length on macOS, set the net.inet.tcp.fastopen_backlog kernel parameter. - google.protobuf.UInt32Value tcp_fast_open_queue_length = 12; - - // Specifies the intended direction of the traffic relative to the local Envoy. - // This property is required on Windows for listeners using the original destination filter, - // see :ref:`Original Destination `. - core.v3.TrafficDirection traffic_direction = 16; - - // If the protocol in the listener socket address in :ref:`protocol - // ` is :ref:`UDP - // `, this field specifies UDP - // listener specific configuration. - UdpListenerConfig udp_listener_config = 18; - - // Used to represent an API listener, which is used in non-proxy clients. The type of API - // exposed to the non-proxy application depends on the type of API listener. - // When this field is set, no other field except for :ref:`name` - // should be set. - // - // .. note:: - // - // Currently only one ApiListener can be installed; and it can only be done via bootstrap config, - // not LDS. - // - // [#next-major-version: In the v3 API, instead of this messy approach where the socket - // listener fields are directly in the top-level Listener message and the API listener types - // are in the ApiListener message, the socket listener messages should be in their own message, - // and the top-level Listener should essentially be a oneof that selects between the - // socket listener and the various types of API listener. That way, a given Listener message - // can structurally only contain the fields of the relevant type.] - ApiListener api_listener = 19; - - // The listener's connection balancer configuration, currently only applicable to TCP listeners. - // If no configuration is specified, Envoy will not attempt to balance active connections between - // worker threads. - // - // In the scenario that the listener X redirects all the connections to the listeners Y1 and Y2 - // by setting :ref:`use_original_dst ` in X - // and :ref:`bind_to_port ` to false in Y1 and Y2, - // it is recommended to disable the balance config in listener X to avoid the cost of balancing, and - // enable the balance config in Y1 and Y2 to balance the connections among the workers. - ConnectionBalanceConfig connection_balance_config = 20; - - // Deprecated. Use ``enable_reuse_port`` instead. - bool reuse_port = 21 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // When this flag is set to true, listeners set the ``SO_REUSEPORT`` socket option and - // create one socket for each worker thread. This makes inbound connections - // distribute among worker threads roughly evenly in cases where there are a high number - // of connections. When this flag is set to false, all worker threads share one socket. This field - // defaults to true. The change of field will be rejected during an listener update when the - // runtime flag ``envoy.reloadable_features.enable_update_listener_socket_options`` is enabled. - // Otherwise, the update of this field will be ignored quietly. - // - // .. attention:: - // - // Although this field defaults to true, it has different behavior on different platforms. See - // the following text for more information. - // - // * On Linux, reuse_port is respected for both TCP and UDP listeners. It also works correctly - // with hot restart. - // * On macOS, reuse_port for TCP does not do what it does on Linux. Instead of load balancing, - // the last socket wins and receives all connections/packets. For TCP, reuse_port is force - // disabled and the user is warned. For UDP, it is enabled, but only one worker will receive - // packets. For QUIC/H3, SW routing will send packets to other workers. For "raw" UDP, only - // a single worker will currently receive packets. - // * On Windows, reuse_port for TCP has undefined behavior. It is force disabled and the user - // is warned similar to macOS. It is left enabled for UDP with undefined behavior currently. - google.protobuf.BoolValue enable_reuse_port = 29; - - // Configuration for :ref:`access logs ` - // emitted by this listener. - repeated accesslog.v3.AccessLog access_log = 22; - - // The maximum length a tcp listener's pending connections queue can grow to. If no value is - // provided net.core.somaxconn will be used on Linux and 128 otherwise. - google.protobuf.UInt32Value tcp_backlog_size = 24; - - // The maximum number of connections to accept from the kernel per socket - // event. Envoy may decide to close these connections after accepting them - // from the kernel e.g. due to load shedding, or other policies. - // If there are more than max_connections_to_accept_per_socket_event - // connections pending accept, connections over this threshold will be - // accepted in later event loop iterations. - // If no value is provided Envoy will accept all connections pending accept - // from the kernel. - // - // .. note:: - // - // It is recommended to lower this value for better overload management and reduced per-event cost. - // Setting it to 1 is a viable option with no noticeable impact on performance. - google.protobuf.UInt32Value max_connections_to_accept_per_socket_event = 34 - [(validate.rules).uint32 = {gt: 0}]; - - // Whether the listener should bind to the port. A listener that doesn't - // bind can only receive connections redirected from other listeners that set - // :ref:`use_original_dst ` - // to true. Default is true. - google.protobuf.BoolValue bind_to_port = 26; - - // The exclusive listener type and the corresponding config. - oneof listener_specifier { - // Used to represent an internal listener which does not listen on OSI L4 address but can be used by the - // :ref:`envoy cluster ` to create a user space connection to. - // The internal listener acts as a TCP listener. It supports listener filters and network filter chains. - // Upstream clusters refer to the internal listeners by their :ref:`name - // `. :ref:`Address - // ` must not be set on the internal listeners. - // - // There are some limitations that are derived from the implementation. The known limitations include: - // - // * :ref:`ConnectionBalanceConfig ` is not - // allowed because both the cluster connection and the listener connection must be owned by the same dispatcher. - // * :ref:`tcp_backlog_size ` - // * :ref:`freebind ` - // * :ref:`transparent ` - InternalListenerConfig internal_listener = 27; - } - - // Enable MPTCP (multi-path TCP) on this listener. Clients will be allowed to establish - // MPTCP connections. Non-MPTCP clients will fall back to regular TCP. - bool enable_mptcp = 30; - - // Whether the listener should limit connections based upon the value of - // :ref:`global_downstream_max_connections `. - bool ignore_global_conn_limit = 31; - - // Whether the listener bypasses configured overload manager actions. - bool bypass_overload_manager = 35; - - // If set, TCP keepalive settings are configured for the listener address and inherited by - // additional addresses. If not set, TCP keepalive settings are not configured for the - // listener address and additional addresses by default. See :ref:`tcp_keepalive ` - // to explicitly configure TCP keepalive settings for individual additional addresses. - core.v3.TcpKeepalive tcp_keepalive = 37; -} - -// A placeholder proto so that users can explicitly configure the standard -// Listener Manager via the bootstrap's :ref:`listener_manager `. -// [#not-implemented-hide:] -message ListenerManager { -} - -// A placeholder proto so that users can explicitly configure the standard -// Validation Listener Manager via the bootstrap's :ref:`listener_manager `. -// [#not-implemented-hide:] -message ValidationListenerManager { -} - -// A placeholder proto so that users can explicitly configure the API -// Listener Manager via the bootstrap's :ref:`listener_manager `. -// [#not-implemented-hide:] -message ApiListenerManager { -} diff --git a/src/main/proto/envoy/config/listener/v3/listener_components.proto b/src/main/proto/envoy/config/listener/v3/listener_components.proto deleted file mode 100644 index 16b4356..0000000 --- a/src/main/proto/envoy/config/listener/v3/listener_components.proto +++ /dev/null @@ -1,353 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "ListenerComponentsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Listener components] -// Listener :ref:`configuration overview ` - -// [#next-free-field: 6] -message Filter { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.Filter"; - - reserved 3, 2; - - reserved "config"; - - // The name of the filter configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - // [#extension-category: envoy.filters.network] - google.protobuf.Any typed_config = 4; - - // Configuration source specifier for an extension configuration discovery - // service. In case of a failure and without the default configuration, the - // listener closes the connections. - core.v3.ExtensionConfigSource config_discovery = 5; - } -} - -// Specifies the match criteria for selecting a specific filter chain for a -// listener. -// -// In order for a filter chain to be selected, *ALL* of its criteria must be -// fulfilled by the incoming connection, properties of which are set by the -// networking stack and/or listener filters. -// -// The following order applies: -// -// 1. Destination port. -// 2. Destination IP address. -// 3. Server name (e.g. SNI for TLS protocol), -// 4. Transport protocol. -// 5. Application protocols (e.g. ALPN for TLS protocol). -// 6. Directly connected source IP address (this will only be different from the source IP address -// when using a listener filter that overrides the source address, such as the :ref:`Proxy Protocol -// listener filter `). -// 7. Source type (e.g. any, local or external network). -// 8. Source IP address. -// 9. Source port. -// -// For criteria that allow ranges or wildcards, the most specific value in any -// of the configured filter chains that matches the incoming connection is going -// to be used (e.g. for SNI ``www.example.com`` the most specific match would be -// ``www.example.com``, then ``*.example.com``, then ``*.com``, then any filter -// chain without ``server_names`` requirements). -// -// A different way to reason about the filter chain matches: -// Suppose there exists N filter chains. Prune the filter chain set using the above 8 steps. -// In each step, filter chains which most specifically matches the attributes continue to the next step. -// The listener guarantees at most 1 filter chain is left after all of the steps. -// -// Example: -// -// For destination port, filter chains specifying the destination port of incoming traffic are the -// most specific match. If none of the filter chains specifies the exact destination port, the filter -// chains which do not specify ports are the most specific match. Filter chains specifying the -// wrong port can never be the most specific match. -// -// [#comment: Implemented rules are kept in the preference order, with deprecated fields -// listed at the end, because that's how we want to list them in the docs. -// -// [#comment:TODO(PiotrSikora): Add support for configurable precedence of the rules] -// [#next-free-field: 14] -message FilterChainMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.FilterChainMatch"; - - enum ConnectionSourceType { - // Any connection source matches. - ANY = 0; - - // Match a connection originating from the same host. - SAME_IP_OR_LOOPBACK = 1; - - // Match a connection originating from a different host. - EXTERNAL = 2; - } - - reserved 1; - - // Optional destination port to consider when use_original_dst is set on the - // listener in determining a filter chain match. - google.protobuf.UInt32Value destination_port = 8 [(validate.rules).uint32 = {lte: 65535 gte: 1}]; - - // If non-empty, an IP address and prefix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - repeated core.v3.CidrRange prefix_ranges = 3; - - // If non-empty, an IP address and suffix length to match addresses when the - // listener is bound to 0.0.0.0/:: or when use_original_dst is specified. - // [#not-implemented-hide:] - string address_suffix = 4; - - // [#not-implemented-hide:] - google.protobuf.UInt32Value suffix_len = 5; - - // The criteria is satisfied if the directly connected source IP address of the downstream - // connection is contained in at least one of the specified subnets. If the parameter is not - // specified or the list is empty, the directly connected source IP address is ignored. - repeated core.v3.CidrRange direct_source_prefix_ranges = 13; - - // Specifies the connection source IP match type. Can be any, local or external network. - ConnectionSourceType source_type = 12 [(validate.rules).enum = {defined_only: true}]; - - // The criteria is satisfied if the source IP address of the downstream - // connection is contained in at least one of the specified subnets. If the - // parameter is not specified or the list is empty, the source IP address is - // ignored. - repeated core.v3.CidrRange source_prefix_ranges = 6; - - // The criteria is satisfied if the source port of the downstream connection - // is contained in at least one of the specified ports. If the parameter is - // not specified, the source port is ignored. - repeated uint32 source_ports = 7 - [(validate.rules).repeated = {items {uint32 {lte: 65535 gte: 1}}}]; - - // If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining - // a filter chain match. Those values will be compared against the server names of a new - // connection, when detected by one of the listener filters. - // - // The server name will be matched against all wildcard domains, i.e. ``www.example.com`` - // will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. - // - // Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. - // The value ``*`` is also not supported, and ``server_names`` should be omitted instead. - // - // .. attention:: - // - // See the :ref:`FAQ entry ` on how to configure SNI for more - // information. - repeated string server_names = 11; - - // If non-empty, a transport protocol to consider when determining a filter chain match. - // This value will be compared against the transport protocol of a new connection, when - // it's detected by one of the listener filters. - // - // Suggested values include: - // - // * ``raw_buffer`` - default, used when no transport protocol is detected, - // * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` - // when TLS protocol is detected. - string transport_protocol = 9; - - // If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when - // determining a filter chain match. Those values will be compared against the application - // protocols of a new connection, when detected by one of the listener filters. - // - // Suggested values include: - // - // * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector - // `, - // * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` - // - // .. attention:: - // - // Currently, only :ref:`TLS Inspector ` provides - // application protocol detection based on the requested - // `ALPN `_ values. - // - // However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, - // and matching on values other than ``h2`` is going to lead to a lot of false negatives, - // unless all connecting clients are known to use ALPN. - repeated string application_protocols = 10; -} - -// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and -// various other parameters. -// [#next-free-field: 10] -message FilterChain { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.listener.FilterChain"; - - reserved 2, 8; - - reserved "tls_context", "on_demand_configuration"; - - // The criteria to use when matching a connection to this filter chain. - FilterChainMatch filter_chain_match = 1; - - // A list of individual network filters that make up the filter chain for - // connections established with the listener. Order matters as the filters are - // processed sequentially as connection events happen. Note: If the filter - // list is empty, the connection will close by default. - // - // For QUIC listeners, network filters other than HTTP Connection Manager (HCM) - // can be created, but due to differences in the connection implementation compared - // to TCP, the onData() method will never be called. Therefore, network filters - // for QUIC listeners should only expect to do work at the start of a new connection - // (i.e. in onNewConnection()). HCM must be the last (or only) filter in the chain. - repeated Filter filters = 3; - - // Whether the listener should expect a PROXY protocol V1 header on new - // connections. If this option is enabled, the listener will assume that that - // remote address of the connection is the one specified in the header. Some - // load balancers including the AWS ELB support this option. If the option is - // absent or set to false, Envoy will use the physical peer address of the - // connection as the remote address. - // - // This field is deprecated. Add a - // :ref:`PROXY protocol listener filter ` - // explicitly instead. - google.protobuf.BoolValue use_proxy_proto = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Filter chain metadata. - core.v3.Metadata metadata = 5; - - // Optional custom transport socket implementation to use for downstream connections. - // To setup TLS, set a transport socket with name ``envoy.transport_sockets.tls`` and - // :ref:`DownstreamTlsContext ` in the ``typed_config``. - // If no transport socket configuration is specified, new connections - // will be set up with plaintext. - // [#extension-category: envoy.transport_sockets.downstream] - core.v3.TransportSocket transport_socket = 6; - - // If present and nonzero, the amount of time to allow incoming connections to complete any - // transport socket negotiations. If this expires before the transport reports connection - // establishment, the connection is summarily closed. - google.protobuf.Duration transport_socket_connect_timeout = 9; - - // The unique name (or empty) by which this filter chain is known. - // - // .. note:: - // :ref:`filter_chain_matcher - // ` - // requires that filter chains are uniquely named within a listener. - string name = 7; -} - -// Listener filter chain match configuration. This is a recursive structure which allows complex -// nested match configurations to be built using various logical operators. -// -// Examples: -// -// * Matches if the destination port is 3306. -// -// .. code-block:: yaml -// -// destination_port_range: -// start: 3306 -// end: 3307 -// -// * Matches if the destination port is 3306 or 15000. -// -// .. code-block:: yaml -// -// or_match: -// rules: -// - destination_port_range: -// start: 3306 -// end: 3307 -// - destination_port_range: -// start: 15000 -// end: 15001 -// -// [#next-free-field: 6] -message ListenerFilterChainMatchPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.ListenerFilterChainMatchPredicate"; - - // A set of match configurations used for logical operations. - message MatchSet { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet"; - - // The list of rules that make up the set. - repeated ListenerFilterChainMatchPredicate rules = 1 - [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - ListenerFilterChainMatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // Match destination port. Particularly, the match evaluation must use the recovered local port if - // the owning listener filter is after :ref:`an original_dst listener filter `. - type.v3.Int32Range destination_port_range = 5; - } -} - -// [#next-free-field: 6] -message ListenerFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.ListenerFilter"; - - reserved 2; - - reserved "config"; - - // The name of the filter configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - // [#extension-category: envoy.filters.listener,envoy.filters.udp_listener] - google.protobuf.Any typed_config = 3; - - // Configuration source specifier for an extension configuration discovery - // service. In case of a failure and without the default configuration, the - // listener closes the connections. - core.v3.ExtensionConfigSource config_discovery = 5; - } - - // Optional match predicate used to disable the filter. The filter is enabled when this field is empty. - // See :ref:`ListenerFilterChainMatchPredicate ` - // for further examples. - ListenerFilterChainMatchPredicate filter_disabled = 4; -} diff --git a/src/main/proto/envoy/config/listener/v3/quic_config.proto b/src/main/proto/envoy/config/listener/v3/quic_config.proto deleted file mode 100644 index c208a58..0000000 --- a/src/main/proto/envoy/config/listener/v3/quic_config.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/protocol.proto"; -import "envoy/config/core/v3/socket_cmsg_headers.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "QuicConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC listener config] - -// Configuration specific to the UDP QUIC listener. -// [#next-free-field: 15] -message QuicProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.QuicProtocolOptions"; - - core.v3.QuicProtocolOptions quic_protocol_options = 1; - - // Maximum number of milliseconds that connection will be alive when there is - // no network activity. - // - // If it is less than 1ms, Envoy will use 1ms. 300000ms if not specified. - google.protobuf.Duration idle_timeout = 2; - - // Connection timeout in milliseconds before the crypto handshake is finished. - // - // If it is less than 5000ms, Envoy will use 5000ms. 20000ms if not specified. - google.protobuf.Duration crypto_handshake_timeout = 3; - - // Runtime flag that controls whether the listener is enabled or not. If not specified, defaults - // to enabled. - core.v3.RuntimeFeatureFlag enabled = 4; - - // A multiplier to number of connections which is used to determine how many packets to read per - // event loop. A reasonable number should allow the listener to process enough payload but not - // starve TCP and other UDP sockets and also prevent long event loop duration. - // The default value is 32. This means if there are N QUIC connections, the total number of - // packets to read in each read event will be 32 * N. - // The actual number of packets to read in total by the UDP listener is also - // bound by 6000, regardless of this field or how many connections there are. - google.protobuf.UInt32Value packets_to_read_to_connection_count_ratio = 5 - [(validate.rules).uint32 = {gte: 1}]; - - // Configure which implementation of ``quic::QuicCryptoClientStreamBase`` to be used for this listener. - // If not specified the :ref:`QUICHE default one configured by ` will be used. - // [#extension-category: envoy.quic.server.crypto_stream] - core.v3.TypedExtensionConfig crypto_stream_config = 6; - - // Configure which implementation of ``quic::ProofSource`` to be used for this listener. - // If not specified the :ref:`default one configured by ` will be used. - // [#extension-category: envoy.quic.proof_source] - core.v3.TypedExtensionConfig proof_source_config = 7; - - // Config which implementation of ``quic::ConnectionIdGeneratorInterface`` to be used for this listener. - // If not specified the :ref:`default one configured by ` will be used. - // [#extension-category: envoy.quic.connection_id_generator] - core.v3.TypedExtensionConfig connection_id_generator_config = 8; - - // Configure the server's preferred address to advertise so that client can migrate to it. See :ref:`example ` which configures a pair of v4 and v6 preferred addresses. - // The current QUICHE implementation will advertise only one of the preferred IPv4 and IPv6 addresses based on the address family the client initially connects with. - // If not specified, Envoy will not advertise any server's preferred address. - // [#extension-category: envoy.quic.server_preferred_address] - core.v3.TypedExtensionConfig server_preferred_address_config = 9 - [(xds.annotations.v3.field_status).work_in_progress = true]; - - // Configure the server to send transport parameter `disable_active_migration `_. - // Defaults to false (do not send this transport parameter). - google.protobuf.BoolValue send_disable_active_migration = 10; - - // Configure which implementation of ``quic::QuicConnectionDebugVisitor`` to be used for this listener. - // If not specified, no debug visitor will be attached to connections. - // [#extension-category: envoy.quic.connection_debug_visitor] - core.v3.TypedExtensionConfig connection_debug_visitor_config = 11; - - // Configure a type of UDP cmsg to pass to listener filters via QuicReceivedPacket. - // Both level and type must be specified for cmsg to be saved. - // Cmsg may be truncated or omitted if expected size is not set. - // If not specified, no cmsg will be saved to QuicReceivedPacket. - repeated core.v3.SocketCmsgHeaders save_cmsg_config = 12 - [(validate.rules).repeated = {max_items: 1}]; - - // If true, the listener will reject connection-establishing packets at the - // QUIC layer by replying with an empty version negotiation packet to the - // client. - bool reject_new_connections = 13; - - // Maximum number of QUIC sessions to create per event loop. - // If not specified, the default value is 16. - // This is an equivalent of the TCP listener option - // max_connections_to_accept_per_socket_event. - google.protobuf.UInt32Value max_sessions_per_event_loop = 14 [(validate.rules).uint32 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/config/listener/v3/udp_listener_config.proto b/src/main/proto/envoy/config/listener/v3/udp_listener_config.proto deleted file mode 100644 index 4e619b1..0000000 --- a/src/main/proto/envoy/config/listener/v3/udp_listener_config.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.config.listener.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/udp_socket_config.proto"; -import "envoy/config/listener/v3/quic_config.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.listener.v3"; -option java_outer_classname = "UdpListenerConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3;listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP listener config] -// Listener :ref:`configuration overview ` - -// [#next-free-field: 9] -message UdpListenerConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.UdpListenerConfig"; - - reserved 1, 2, 3, 4, 6; - - reserved "config"; - - // UDP socket configuration for the listener. The default for - // :ref:`prefer_gro ` is false for - // listener sockets. If receiving a large amount of datagrams from a small number of sources, it - // may be worthwhile to enable this option after performance testing. - core.v3.UdpSocketConfig downstream_socket_config = 5; - - // Configuration for QUIC protocol. If empty, QUIC will not be enabled on this listener. Set - // to the default object to enable QUIC without modifying any additional options. - QuicProtocolOptions quic_options = 7; - - // Configuration for the UDP packet writer. If empty, HTTP/3 will use GSO if available - // (:ref:`UdpDefaultWriterFactory `) - // or the default kernel sendmsg if not, - // (:ref:`UdpDefaultWriterFactory `) - // and raw UDP will use kernel sendmsg. - // [#extension-category: envoy.udp_packet_writer] - core.v3.TypedExtensionConfig udp_packet_packet_writer_config = 8; -} - -message ActiveRawUdpListenerConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.listener.ActiveRawUdpListenerConfig"; -} diff --git a/src/main/proto/envoy/config/metrics/v2/metrics_service.proto b/src/main/proto/envoy/config/metrics/v2/metrics_service.proto deleted file mode 100644 index bb06377..0000000 --- a/src/main/proto/envoy/config/metrics/v2/metrics_service.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.config.metrics.v2; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.metrics.v2"; -option java_outer_classname = "MetricsServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v2;metricsv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Metrics service] - -// Metrics Service is configured as a built-in *envoy.stat_sinks.metrics_service* :ref:`StatsSink -// `. This opaque configuration will be used to create -// Metrics Service. -// [#extension: envoy.stat_sinks.metrics_service] -message MetricsServiceConfig { - // The upstream gRPC cluster that hosts the metrics service. - api.v2.core.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/metrics/v2/stats.proto b/src/main/proto/envoy/config/metrics/v2/stats.proto deleted file mode 100644 index 1cb9525..0000000 --- a/src/main/proto/envoy/config/metrics/v2/stats.proto +++ /dev/null @@ -1,340 +0,0 @@ -syntax = "proto3"; - -package envoy.config.metrics.v2; - -import "envoy/api/v2/core/address.proto"; -import "envoy/type/matcher/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.metrics.v2"; -option java_outer_classname = "StatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v2;metricsv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Stats] -// Statistics :ref:`architecture overview `. - -// Configuration for pluggable stats sinks. -message StatsSink { - // The name of the stats sink to instantiate. The name must match a supported - // stats sink. The built-in stats sinks are: - // - // * :ref:`envoy.stat_sinks.statsd ` - // * :ref:`envoy.stat_sinks.dog_statsd ` - // * :ref:`envoy.stat_sinks.metrics_service ` - // * :ref:`envoy.stat_sinks.hystrix ` - // - // Sinks optionally support tagged/multiple dimensional metrics. - string name = 1; - - // Stats sink specific configuration which depends on the sink being instantiated. See - // :ref:`StatsdSink ` for an example. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } -} - -// Statistics configuration such as tagging. -message StatsConfig { - // Each stat name is iteratively processed through these tag specifiers. - // When a tag is matched, the first capture group is removed from the name so - // later :ref:`TagSpecifiers ` cannot match that - // same portion of the match. - repeated TagSpecifier stats_tags = 1; - - // Use all default tag regexes specified in Envoy. These can be combined with - // custom tags specified in :ref:`stats_tags - // `. They will be processed before - // the custom tags. - // - // .. note:: - // - // If any default tags are specified twice, the config will be considered - // invalid. - // - // See :repo:`well_known_names.h ` for a list of the - // default tags in Envoy. - // - // If not provided, the value is assumed to be true. - google.protobuf.BoolValue use_all_default_tags = 2; - - // Inclusion/exclusion matcher for stat name creation. If not provided, all stats are instantiated - // as normal. Preventing the instantiation of certain families of stats can improve memory - // performance for Envoys running especially large configs. - // - // .. warning:: - // Excluding stats may affect Envoy's behavior in undocumented ways. See - // `issue #8771 `_ for more information. - // If any unexpected behavior changes are observed, please open a new issue immediately. - StatsMatcher stats_matcher = 3; -} - -// Configuration for disabling stat instantiation. -message StatsMatcher { - // The instantiation of stats is unrestricted by default. If the goal is to configure Envoy to - // instantiate all stats, there is no need to construct a StatsMatcher. - // - // However, StatsMatcher can be used to limit the creation of families of stats in order to - // conserve memory. Stats can either be disabled entirely, or they can be - // limited by either an exclusion or an inclusion list of :ref:`StringMatcher - // ` protos: - // - // * If ``reject_all`` is set to ``true``, no stats will be instantiated. If ``reject_all`` is set to - // ``false``, all stats will be instantiated. - // - // * If an exclusion list is supplied, any stat name matching *any* of the StringMatchers in the - // list will not instantiate. - // - // * If an inclusion list is supplied, no stats will instantiate, except those matching *any* of - // the StringMatchers in the list. - // - // - // A StringMatcher can be used to match against an exact string, a suffix / prefix, or a regex. - // **NB:** For performance reasons, it is highly recommended to use a prefix- or suffix-based - // matcher rather than a regex-based matcher. - // - // Example 1. Excluding all stats. - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "rejectAll": "true" - // } - // } - // - // Example 2. Excluding all cluster-specific stats, but not cluster-manager stats: - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "exclusionList": { - // "patterns": [ - // { - // "prefix": "cluster." - // } - // ] - // } - // } - // } - // - // Example 3. Including only manager-related stats: - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "inclusionList": { - // "patterns": [ - // { - // "prefix": "cluster_manager." - // }, - // { - // "prefix": "listener_manager." - // } - // ] - // } - // } - // } - // - - oneof stats_matcher { - option (validate.required) = true; - - // If `reject_all` is true, then all stats are disabled. If `reject_all` is false, then all - // stats are enabled. - bool reject_all = 1; - - // Exclusive match. All stats are enabled except for those matching one of the supplied - // StringMatcher protos. - type.matcher.ListStringMatcher exclusion_list = 2; - - // Inclusive match. No stats are enabled except for those matching one of the supplied - // StringMatcher protos. - type.matcher.ListStringMatcher inclusion_list = 3; - } -} - -// Designates a tag name and value pair. The value may be either a fixed value -// or a regex providing the value via capture groups. The specified tag will be -// unconditionally set if a fixed value, otherwise it will only be set if one -// or more capture groups in the regex match. -message TagSpecifier { - // Attaches an identifier to the tag values to identify the tag being in the - // sink. Envoy has a set of default names and regexes to extract dynamic - // portions of existing stats, which can be found in :repo:`well_known_names.h - // ` in the Envoy repository. If a :ref:`tag_name - // ` is provided in the config and - // neither :ref:`regex ` or - // :ref:`fixed_value ` were specified, - // Envoy will attempt to find that name in its set of defaults and use the accompanying regex. - // - // .. note:: - // - // It is invalid to specify the same tag name twice in a config. - string tag_name = 1; - - oneof tag_value { - // Designates a tag to strip from the tag extracted name and provide as a named - // tag value for all statistics. This will only occur if any part of the name - // matches the regex provided with one or more capture groups. - // - // The first capture group identifies the portion of the name to remove. The - // second capture group (which will normally be nested inside the first) will - // designate the value of the tag for the statistic. If no second capture - // group is provided, the first will also be used to set the value of the tag. - // All other capture groups will be ignored. - // - // Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and - // one tag specifier: - // - // .. code-block:: json - // - // { - // "tag_name": "envoy.cluster_name", - // "regex": "^cluster\\.((.+?)\\.)" - // } - // - // Note that the regex will remove ``foo_cluster.`` making the tag extracted - // name ``cluster.upstream_rq_timeout`` and the tag value for - // ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no - // ``.`` character because of the second capture group). - // - // Example 2. a stat name - // ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two - // tag specifiers: - // - // .. code-block:: json - // - // [ - // { - // "tag_name": "envoy.http_user_agent", - // "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" - // }, - // { - // "tag_name": "envoy.http_conn_manager_prefix", - // "regex": "^http\\.((.*?)\\.)" - // } - // ] - // - // The two regexes of the specifiers will be processed in the definition order. - // - // The first regex will remove ``ios.``, leaving the tag extracted name - // ``http.connection_manager_1.user_agent.downstream_cx_total``. The tag - // ``envoy.http_user_agent`` will be added with tag value ``ios``. - // - // The second regex will remove ``connection_manager_1.`` from the tag - // extracted name produced by the first regex - // ``http.connection_manager_1.user_agent.downstream_cx_total``, leaving - // ``http.user_agent.downstream_cx_total`` as the tag extracted name. The tag - // ``envoy.http_conn_manager_prefix`` will be added with the tag value - // ``connection_manager_1``. - string regex = 2 [(validate.rules).string = {max_bytes: 1024}]; - - // Specifies a fixed tag value for the ``tag_name``. - string fixed_value = 3; - } -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.statsd* sink. This sink does not support -// tagged metrics. -// [#extension: envoy.stat_sinks.statsd] -message StatsdSink { - oneof statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running `statsd `_ - // compliant listener. If specified, statistics will be flushed to this - // address. - api.v2.core.Address address = 1; - - // The name of a cluster that is running a TCP `statsd - // `_ compliant listener. If specified, - // Envoy will connect to this cluster to flush statistics. - string tcp_cluster_name = 2; - } - - // Optional custom prefix for StatsdSink. If - // specified, this will override the default prefix. - // For example: - // - // .. code-block:: json - // - // { - // "prefix" : "envoy-prod" - // } - // - // will change emitted stats to - // - // .. code-block:: cpp - // - // envoy-prod.test_counter:1|c - // envoy-prod.test_timer:5|ms - // - // Note that the default prefix, "envoy", will be used if a prefix is not - // specified. - // - // Stats with default prefix: - // - // .. code-block:: cpp - // - // envoy.test_counter:1|c - // envoy.test_timer:5|ms - string prefix = 3; -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.dog_statsd* sink. -// The sink emits stats with `DogStatsD `_ -// compatible tags. Tags are configurable via :ref:`StatsConfig -// `. -// [#extension: envoy.stat_sinks.dog_statsd] -message DogStatsdSink { - reserved 2; - - oneof dog_statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running DogStatsD compliant listener. If specified, - // statistics will be flushed to this address. - api.v2.core.Address address = 1; - } - - // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. - string prefix = 3; -} - -// Stats configuration proto schema for built-in *envoy.stat_sinks.hystrix* sink. -// The sink emits stats in `text/event-stream -// `_ -// formatted stream for use by `Hystrix dashboard -// `_. -// -// Note that only a single HystrixSink should be configured. -// -// Streaming is started through an admin endpoint :http:get:`/hystrix_event_stream`. -// [#extension: envoy.stat_sinks.hystrix] -message HystrixSink { - // The number of buckets the rolling statistical window is divided into. - // - // Each time the sink is flushed, all relevant Envoy statistics are sampled and - // added to the rolling window (removing the oldest samples in the window - // in the process). The sink then outputs the aggregate statistics across the - // current rolling window to the event stream(s). - // - // rolling_window(ms) = stats_flush_interval(ms) * num_of_buckets - // - // More detailed explanation can be found in `Hystrix wiki - // `_. - int64 num_buckets = 1; -} diff --git a/src/main/proto/envoy/config/metrics/v3/metrics_service.proto b/src/main/proto/envoy/config/metrics/v3/metrics_service.proto deleted file mode 100644 index 24b44b0..0000000 --- a/src/main/proto/envoy/config/metrics/v3/metrics_service.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package envoy.config.metrics.v3; - -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/grpc_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.metrics.v3"; -option java_outer_classname = "MetricsServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v3;metricsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Metrics service] - -// HistogramEmitMode is used to configure which metric types should be emitted for histograms. -enum HistogramEmitMode { - // Emit Histogram and Summary metric types. - SUMMARY_AND_HISTOGRAM = 0; - - // Emit only Summary metric types. - SUMMARY = 1; - - // Emit only Histogram metric types. - HISTOGRAM = 2; -} - -// Metrics Service is configured as a built-in ``envoy.stat_sinks.metrics_service`` :ref:`StatsSink -// `. This opaque configuration will be used to create -// Metrics Service. -// -// Example: -// -// .. code-block:: yaml -// -// stats_sinks: -// - name: envoy.stat_sinks.metrics_service -// typed_config: -// "@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig -// -// [#extension: envoy.stat_sinks.metrics_service] -// [#next-free-field: 7] -message MetricsServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v2.MetricsServiceConfig"; - - // The upstream gRPC cluster that hosts the metrics service. - core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; - - // API version for metric service transport protocol. This describes the metric service gRPC - // endpoint and version of messages used on the wire. - core.v3.ApiVersion transport_api_version = 3 [(validate.rules).enum = {defined_only: true}]; - - // If true, counters are reported as the delta between flushing intervals. Otherwise, the current - // counter value is reported. Defaults to false. - // Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the - // sink will take updates from the :ref:`MetricsResponse `. - google.protobuf.BoolValue report_counters_as_deltas = 2; - - // If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService, - // and the tag extracted name will be used instead of the full name, which may contain values used by the tag - // extractor or additional tags added during stats creation. - bool emit_tags_as_labels = 4; - - // Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM. - HistogramEmitMode histogram_emit_mode = 5 [(validate.rules).enum = {defined_only: true}]; - - // The maximum number of metrics to send in a single gRPC message. If not set or set to 0, - // all metrics will be sent in a single message (current behavior). When set to a positive value, - // metrics will be batched into multiple messages, with each message containing at most batch_size - // metric families. This helps avoid hitting gRPC message size limits (typically 4MB) when sending - // large numbers of metrics. - uint32 batch_size = 6 [(validate.rules).uint32 = {gte: 0}]; -} diff --git a/src/main/proto/envoy/config/metrics/v3/stats.proto b/src/main/proto/envoy/config/metrics/v3/stats.proto deleted file mode 100644 index 0fcf36c..0000000 --- a/src/main/proto/envoy/config/metrics/v3/stats.proto +++ /dev/null @@ -1,411 +0,0 @@ -syntax = "proto3"; - -package envoy.config.metrics.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.metrics.v3"; -option java_outer_classname = "StatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/metrics/v3;metricsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Stats] -// Statistics :ref:`architecture overview `. - -// Configuration for pluggable stats sinks. -message StatsSink { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.metrics.v2.StatsSink"; - - reserved 2; - - reserved "config"; - - // The name of the stats sink to instantiate. The name must match a supported - // stats sink. - // See the :ref:`extensions listed in typed_config below ` for the default list of available stats sink. - // Sinks optionally support tagged/multiple dimensional metrics. - string name = 1; - - // Stats sink specific configuration which depends on the sink being instantiated. See - // :ref:`StatsdSink ` for an example. - // [#extension-category: envoy.stats_sinks] - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// Statistics configuration such as tagging. -message StatsConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v2.StatsConfig"; - - // Each stat name is independently processed through these tag specifiers. When a tag is - // matched, the first capture group is not immediately removed from the name, so later - // :ref:`TagSpecifiers ` can also match that - // same portion of the match. After all tag matching is complete, a tag-extracted version of - // the name is produced and is used in stats sinks that represent tags, such as Prometheus. - repeated TagSpecifier stats_tags = 1; - - // Use all default tag regexes specified in Envoy. These can be combined with - // custom tags specified in :ref:`stats_tags - // `. They will be processed before - // the custom tags. - // - // See :repo:`well_known_names.h ` for a list of the - // default tags in Envoy. - // - // If not provided, the value is assumed to be true. - google.protobuf.BoolValue use_all_default_tags = 2; - - // Inclusion/exclusion matcher for stat name creation. If not provided, all stats are instantiated - // as normal. Preventing the instantiation of certain families of stats can improve memory - // performance for Envoys running especially large configs. - // - // .. warning:: - // Excluding stats may affect Envoy's behavior in undocumented ways. See - // `issue #8771 `_ for more information. - // If any unexpected behavior changes are observed, please open a new issue immediately. - StatsMatcher stats_matcher = 3; - - // Defines rules for setting the histogram buckets. Rules are evaluated in order, and the first - // match is applied. If no match is found (or if no rules are set), the following default buckets - // are used: - // - // .. code-block:: json - // - // [ - // 0.5, - // 1, - // 5, - // 10, - // 25, - // 50, - // 100, - // 250, - // 500, - // 1000, - // 2500, - // 5000, - // 10000, - // 30000, - // 60000, - // 300000, - // 600000, - // 1800000, - // 3600000 - // ] - repeated HistogramBucketSettings histogram_bucket_settings = 4; -} - -// Configuration for disabling stat instantiation. -message StatsMatcher { - // The instantiation of stats is unrestricted by default. If the goal is to configure Envoy to - // instantiate all stats, there is no need to construct a StatsMatcher. - // - // However, StatsMatcher can be used to limit the creation of families of stats in order to - // conserve memory. Stats can either be disabled entirely, or they can be - // limited by either an exclusion or an inclusion list of :ref:`StringMatcher - // ` protos: - // - // * If ``reject_all`` is set to ``true``, no stats will be instantiated. If ``reject_all`` is set to - // ``false``, all stats will be instantiated. - // - // * If an exclusion list is supplied, any stat name matching *any* of the StringMatchers in the - // list will not instantiate. - // - // * If an inclusion list is supplied, no stats will instantiate, except those matching *any* of - // the StringMatchers in the list. - // - // - // A StringMatcher can be used to match against an exact string, a suffix / prefix, or a regex. - // **NB:** For performance reasons, it is highly recommended to use a prefix- or suffix-based - // matcher rather than a regex-based matcher. - // - // Example 1. Excluding all stats. - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "rejectAll": "true" - // } - // } - // - // Example 2. Excluding all cluster-specific stats, but not cluster-manager stats: - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "exclusionList": { - // "patterns": [ - // { - // "prefix": "cluster." - // } - // ] - // } - // } - // } - // - // Example 3. Including only manager-related stats: - // - // .. code-block:: json - // - // { - // "statsMatcher": { - // "inclusionList": { - // "patterns": [ - // { - // "prefix": "cluster_manager." - // }, - // { - // "prefix": "listener_manager." - // } - // ] - // } - // } - // } - // - - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v2.StatsMatcher"; - - oneof stats_matcher { - option (validate.required) = true; - - // If ``reject_all`` is true, then all stats are disabled. If ``reject_all`` is false, then all - // stats are enabled. - bool reject_all = 1; - - // Exclusive match. All stats are enabled except for those matching one of the supplied - // StringMatcher protos. - type.matcher.v3.ListStringMatcher exclusion_list = 2; - - // Inclusive match. No stats are enabled except for those matching one of the supplied - // StringMatcher protos. - type.matcher.v3.ListStringMatcher inclusion_list = 3; - } -} - -// Designates a tag name and value pair. The value may be either a fixed value -// or a regex providing the value via capture groups. The specified tag will be -// unconditionally set if a fixed value, otherwise it will only be set if one -// or more capture groups in the regex match. -message TagSpecifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v2.TagSpecifier"; - - // Attaches an identifier to the tag values to identify the tag being in the - // sink. Envoy has a set of default names and regexes to extract dynamic - // portions of existing stats, which can be found in :repo:`well_known_names.h - // ` in the Envoy repository. If a :ref:`tag_name - // ` is provided in the config and - // neither :ref:`regex ` or - // :ref:`fixed_value ` were specified, - // Envoy will attempt to find that name in its set of defaults and use the accompanying regex. - // - // .. note:: - // - // A stat name may be spelled in such a way that it matches two different - // tag extractors for the same tag name. In that case, all but one of the - // tag values will be dropped. It is not specified which tag value will be - // retained. The extraction will only occur for one of the extractors, and - // only the matched extraction will be removed from the tag name. - string tag_name = 1; - - oneof tag_value { - // Designates a tag to strip from the tag extracted name and provide as a named - // tag value for all statistics. This will only occur if any part of the name - // matches the regex provided with one or more capture groups. - // - // The first capture group identifies the portion of the name to remove. The - // second capture group (which will normally be nested inside the first) will - // designate the value of the tag for the statistic. If no second capture - // group is provided, the first will also be used to set the value of the tag. - // All other capture groups will be ignored. - // - // Example 1. a stat name ``cluster.foo_cluster.upstream_rq_timeout`` and - // one tag specifier: - // - // .. code-block:: json - // - // { - // "tag_name": "envoy.cluster_name", - // "regex": "^cluster\\.((.+?)\\.)" - // } - // - // Note that the regex will remove ``foo_cluster.`` making the tag extracted - // name ``cluster.upstream_rq_timeout`` and the tag value for - // ``envoy.cluster_name`` will be ``foo_cluster`` (note: there will be no - // ``.`` character because of the second capture group). - // - // Example 2. a stat name - // ``http.connection_manager_1.user_agent.ios.downstream_cx_total`` and two - // tag specifiers: - // - // .. code-block:: json - // - // [ - // { - // "tag_name": "envoy.http_user_agent", - // "regex": "^http(?=\\.).*?\\.user_agent\\.((.+?)\\.)\\w+?$" - // }, - // { - // "tag_name": "envoy.http_conn_manager_prefix", - // "regex": "^http\\.((.*?)\\.)" - // } - // ] - // - // The two regexes of the specifiers will be processed from the elaborated - // stat name. - // - // The first regex will save ``ios.`` as the tag value for ``envoy.http_user_agent``. It will - // leave it in the name for potential matching with additional tag specifiers. After all tag - // specifiers are processed the tags will be removed from the name. - // - // The second regex will populate tag ``envoy.http_conn_manager_prefix`` with value - // ``connection_manager_1.``, based on the original stat name. - // - // As a final step, the matched tags are removed, leaving - // ``http.user_agent.downstream_cx_total`` as the tag extracted name. - string regex = 2 [(validate.rules).string = {max_bytes: 1024}]; - - // Specifies a fixed tag value for the ``tag_name``. - string fixed_value = 3; - } -} - -// Specifies a matcher for stats and the buckets that matching stats should use. -message HistogramBucketSettings { - // The stats that this rule applies to. The match is applied to the original stat name - // before tag-extraction, for example ``cluster.exampleclustername.upstream_cx_length_ms``. - type.matcher.v3.StringMatcher match = 1 [(validate.rules).message = {required: true}]; - - // Each value is the upper bound of a bucket. Each bucket must be greater than 0 and unique. - // The order of the buckets does not matter. - repeated double buckets = 2 [(validate.rules).repeated = { - unique: true - items {double {gt: 0.0}} - }]; - - // Initial number of bins for the ``circllhist`` thread local histogram per time series. Default value is 100. - google.protobuf.UInt32Value bins = 3 [(validate.rules).uint32 = {lte: 46082 gt: 0}]; -} - -// Stats configuration proto schema for built-in ``envoy.stat_sinks.statsd`` sink. This sink does not support -// tagged metrics. -// [#extension: envoy.stat_sinks.statsd] -message StatsdSink { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.metrics.v2.StatsdSink"; - - oneof statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running `statsd `_ - // compliant listener. If specified, statistics will be flushed to this - // address. - core.v3.Address address = 1; - - // The name of a cluster that is running a TCP `statsd - // `_ compliant listener. If specified, - // Envoy will connect to this cluster to flush statistics. - string tcp_cluster_name = 2; - } - - // Optional custom prefix for StatsdSink. If - // specified, this will override the default prefix. - // For example: - // - // .. code-block:: json - // - // { - // "prefix" : "envoy-prod" - // } - // - // will change emitted stats to - // - // .. code-block:: cpp - // - // envoy-prod.test_counter:1|c - // envoy-prod.test_timer:5|ms - // - // Note that the default prefix, "envoy", will be used if a prefix is not - // specified. - // - // Stats with default prefix: - // - // .. code-block:: cpp - // - // envoy.test_counter:1|c - // envoy.test_timer:5|ms - string prefix = 3; -} - -// Stats configuration proto schema for built-in ``envoy.stat_sinks.dog_statsd`` sink. -// The sink emits stats with `DogStatsD `_ -// compatible tags. Tags are configurable via :ref:`StatsConfig -// `. -// [#extension: envoy.stat_sinks.dog_statsd] -message DogStatsdSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v2.DogStatsdSink"; - - reserved 2; - - oneof dog_statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running DogStatsD compliant listener. If specified, - // statistics will be flushed to this address. - core.v3.Address address = 1; - } - - // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. - string prefix = 3; - - // Optional max datagram size to use when sending UDP messages. By default Envoy - // will emit one metric per datagram. By specifying a max-size larger than a single - // metric, Envoy will emit multiple, new-line separated metrics. The max datagram - // size should not exceed your network's MTU. - // - // Note that this value may not be respected if smaller than a single metric. - google.protobuf.UInt64Value max_bytes_per_datagram = 4 [(validate.rules).uint64 = {gt: 0}]; -} - -// Stats configuration proto schema for built-in ``envoy.stat_sinks.hystrix`` sink. -// The sink emits stats in `text/event-stream -// `_ -// formatted stream for use by `Hystrix dashboard -// `_. -// -// Note that only a single HystrixSink should be configured. -// -// Streaming is started through an admin endpoint :http:get:`/hystrix_event_stream`. -// [#extension: envoy.stat_sinks.hystrix] -message HystrixSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.metrics.v2.HystrixSink"; - - // The number of buckets the rolling statistical window is divided into. - // - // Each time the sink is flushed, all relevant Envoy statistics are sampled and - // added to the rolling window (removing the oldest samples in the window - // in the process). The sink then outputs the aggregate statistics across the - // current rolling window to the event stream(s). - // - // ``rolling_window(ms)`` = ``stats_flush_interval(ms)`` * ``num_of_buckets`` - // - // More detailed explanation can be found in `Hystrix wiki - // `_. - int64 num_buckets = 1; -} diff --git a/src/main/proto/envoy/config/overload/v2alpha/overload.proto b/src/main/proto/envoy/config/overload/v2alpha/overload.proto deleted file mode 100644 index 5c7639b..0000000 --- a/src/main/proto/envoy/config/overload/v2alpha/overload.proto +++ /dev/null @@ -1,81 +0,0 @@ -syntax = "proto3"; - -package envoy.config.overload.v2alpha; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.overload.v2alpha"; -option java_outer_classname = "OverloadProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/overload/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Overload Manager] - -// The Overload Manager provides an extensible framework to protect Envoy instances -// from overload of various resources (memory, cpu, file descriptors, etc). -// It monitors a configurable set of resources and notifies registered listeners -// when triggers related to those resources fire. - -message ResourceMonitor { - // The name of the resource monitor to instantiate. Must match a registered - // resource monitor type. The built-in resource monitors are: - // - // * :ref:`envoy.resource_monitors.fixed_heap - // ` - // * :ref:`envoy.resource_monitors.injected_resource - // ` - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Configuration for the resource monitor being instantiated. - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } -} - -message ThresholdTrigger { - // If the resource pressure is greater than or equal to this value, the trigger - // will fire. - double value = 1 [(validate.rules).double = {lte: 1.0 gte: 0.0}]; -} - -message Trigger { - // The name of the resource this is a trigger for. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - oneof trigger_oneof { - option (validate.required) = true; - - ThresholdTrigger threshold = 2; - } -} - -message OverloadAction { - // The name of the overload action. This is just a well-known string that listeners can - // use for registering callbacks. Custom overload actions should be named using reverse - // DNS to ensure uniqueness. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // A set of triggers for this action. If any of these triggers fire the overload action - // is activated. Listeners are notified when the overload action transitions from - // inactivated to activated, or vice versa. - repeated Trigger triggers = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -message OverloadManager { - // The interval for refreshing resource usage. - google.protobuf.Duration refresh_interval = 1; - - // The set of resources to monitor. - repeated ResourceMonitor resource_monitors = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The set of overload actions. - repeated OverloadAction actions = 3; -} diff --git a/src/main/proto/envoy/config/overload/v3/overload.proto b/src/main/proto/envoy/config/overload/v3/overload.proto deleted file mode 100644 index b5bc2c4..0000000 --- a/src/main/proto/envoy/config/overload/v3/overload.proto +++ /dev/null @@ -1,227 +0,0 @@ -syntax = "proto3"; - -package envoy.config.overload.v3; - -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.overload.v3"; -option java_outer_classname = "OverloadProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/overload/v3;overloadv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Overload Manager] - -// The Overload Manager provides an extensible framework to protect Envoy instances -// from overload of various resources (memory, cpu, file descriptors, etc). -// It monitors a configurable set of resources and notifies registered listeners -// when triggers related to those resources fire. - -message ResourceMonitor { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.overload.v2alpha.ResourceMonitor"; - - reserved 2; - - reserved "config"; - - // The name of the resource monitor to instantiate. Must match a registered - // resource monitor type. - // See the :ref:`extensions listed in typed_config below ` for the default list of available resource monitor. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Configuration for the resource monitor being instantiated. - // [#extension-category: envoy.resource_monitors] - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -message ThresholdTrigger { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.overload.v2alpha.ThresholdTrigger"; - - // If the resource pressure is greater than or equal to this value, the trigger - // will enter saturation. - double value = 1 [(validate.rules).double = {lte: 1.0 gte: 0.0}]; -} - -message ScaledTrigger { - // If the resource pressure is greater than this value, the trigger will be in the - // :ref:`scaling ` state with value - // ``(pressure - scaling_threshold) / (saturation_threshold - scaling_threshold)``. - double scaling_threshold = 1 [(validate.rules).double = {lte: 1.0 gte: 0.0}]; - - // If the resource pressure is greater than this value, the trigger will enter saturation. - double saturation_threshold = 2 [(validate.rules).double = {lte: 1.0 gte: 0.0}]; -} - -message Trigger { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.overload.v2alpha.Trigger"; - - // The name of the resource this is a trigger for. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof trigger_oneof { - option (validate.required) = true; - - ThresholdTrigger threshold = 2; - - ScaledTrigger scaled = 3; - } -} - -// Typed configuration for the "envoy.overload_actions.reduce_timeouts" action. See -// :ref:`the docs ` for an example of how to configure -// the action with different timeouts and minimum values. -message ScaleTimersOverloadActionConfig { - enum TimerType { - // Unsupported value; users must explicitly specify the timer they want scaled. - UNSPECIFIED = 0; - - // Adjusts the idle timer for downstream HTTP connections that takes effect when there are no active streams. - // This affects the value of :ref:`HttpConnectionManager.common_http_protocol_options.idle_timeout - // ` - HTTP_DOWNSTREAM_CONNECTION_IDLE = 1; - - // Adjusts the idle timer for HTTP streams initiated by downstream clients. - // This affects the value of :ref:`RouteAction.idle_timeout ` and - // :ref:`HttpConnectionManager.stream_idle_timeout - // ` - HTTP_DOWNSTREAM_STREAM_IDLE = 2; - - // Adjusts the timer for how long downstream clients have to finish transport-level negotiations - // before the connection is closed. - // This affects the value of - // :ref:`FilterChain.transport_socket_connect_timeout `. - TRANSPORT_SOCKET_CONNECT = 3; - - // Adjusts the max connection duration timer for downstream HTTP connections. - // This affects the value of - // :ref:`HttpConnectionManager.common_http_protocol_options.max_connection_duration - // `. - HTTP_DOWNSTREAM_CONNECTION_MAX = 4; - - // Adjusts the timeout for the downstream codec to flush an ended stream. - // This affects the value of :ref:`RouteAction.flush_timeout - // ` and - // :ref:`HttpConnectionManager.stream_flush_timeout - // ` - HTTP_DOWNSTREAM_STREAM_FLUSH = 5; - } - - message ScaleTimer { - // The type of timer this minimum applies to. - TimerType timer = 1 [(validate.rules).enum = {defined_only: true not_in: 0}]; - - oneof overload_adjust { - option (validate.required) = true; - - // Sets the minimum duration as an absolute value. - google.protobuf.Duration min_timeout = 2; - - // Sets the minimum duration as a percentage of the maximum value. - type.v3.Percent min_scale = 3; - } - } - - // A set of timer scaling rules to be applied. - repeated ScaleTimer timer_scale_factors = 1 [(validate.rules).repeated = {min_items: 1}]; -} - -message OverloadAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.overload.v2alpha.OverloadAction"; - - // The name of the overload action. This is just a well-known string that - // listeners can use for registering callbacks. - // Valid known overload actions include: - // - envoy.overload_actions.stop_accepting_requests - // - envoy.overload_actions.disable_http_keepalive - // - envoy.overload_actions.stop_accepting_connections - // - envoy.overload_actions.reject_incoming_connections - // - envoy.overload_actions.shrink_heap - // - envoy.overload_actions.reduce_timeouts - // - envoy.overload_actions.reset_high_memory_stream - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A set of triggers for this action. The state of the action is the maximum - // state of all triggers, which can be scalar values between 0 and 1 or - // saturated. Listeners are notified when the overload action changes state. - // An overload manager action can only have one trigger for a given resource - // e.g. :ref:`Trigger.name - // ` must be unique - // in this list. - repeated Trigger triggers = 2 [(validate.rules).repeated = {min_items: 1}]; - - // Configuration for the action being instantiated if applicable. - google.protobuf.Any typed_config = 3; -} - -// A point within the connection or request lifecycle that provides context on -// whether to shed load at that given stage for the current entity at the -// point. -message LoadShedPoint { - // This is just a well-known string for the LoadShedPoint. - // Deployment specific LoadShedPoints e.g. within a custom extension should - // be prefixed by the company / deployment name to avoid colliding with any - // open source LoadShedPoints. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A set of triggers for this LoadShedPoint. The LoadShedPoint will use the - // the maximum state of all triggers, which can be scalar values between 0 and - // 1 or saturated. A LoadShedPoint can only have one trigger for a given - // resource e.g. :ref:`Trigger.name - // ` must be unique in - // this list. - repeated Trigger triggers = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Configuration for which accounts the WatermarkBuffer Factories should -// track. -message BufferFactoryConfig { - // The minimum power of two at which Envoy starts tracking an account. - // - // Envoy has 8 power of two buckets starting with the provided exponent below. - // Concretely the 1st bucket contains accounts for streams that use - // [2^minimum_account_to_track_power_of_two, - // 2^(minimum_account_to_track_power_of_two + 1)) bytes. - // With the 8th bucket tracking accounts - // >= 128 * 2^minimum_account_to_track_power_of_two. - // - // The maximum value is 56, since we're using uint64_t for bytes counting, - // and that's the last value that would use the 8 buckets. In practice, - // we don't expect the proxy to be holding 2^56 bytes. - // - // If omitted, Envoy should not do any tracking. - uint32 minimum_account_to_track_power_of_two = 1 [(validate.rules).uint32 = {lte: 56 gte: 10}]; -} - -// [#next-free-field: 6] -message OverloadManager { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.overload.v2alpha.OverloadManager"; - - // The interval for refreshing resource usage. - google.protobuf.Duration refresh_interval = 1; - - // The set of resources to monitor. - repeated ResourceMonitor resource_monitors = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The set of overload actions. - repeated OverloadAction actions = 3; - - // The set of load shed points. - repeated LoadShedPoint loadshed_points = 5; - - // Configuration for buffer factory. - BufferFactoryConfig buffer_factory_config = 4; -} diff --git a/src/main/proto/envoy/config/ratelimit/v2/rls.proto b/src/main/proto/envoy/config/ratelimit/v2/rls.proto deleted file mode 100644 index 4fd3671..0000000 --- a/src/main/proto/envoy/config/ratelimit/v2/rls.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.config.ratelimit.v2; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.ratelimit.v2"; -option java_outer_classname = "RlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v2;ratelimitv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Rate limit service] - -// Rate limit :ref:`configuration overview `. -message RateLimitServiceConfig { - reserved 1, 3; - - // Specifies the gRPC service that hosts the rate limit service. The client - // will connect to this cluster when it needs to make rate limit service - // requests. - api.v2.core.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/ratelimit/v3/rls.proto b/src/main/proto/envoy/config/ratelimit/v3/rls.proto deleted file mode 100644 index 6fc47ef..0000000 --- a/src/main/proto/envoy/config/ratelimit/v3/rls.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.config.ratelimit.v3; - -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.ratelimit.v3"; -option java_outer_classname = "RlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v3;ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rate limit service] - -// Rate limit :ref:`configuration overview `. -message RateLimitServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.ratelimit.v2.RateLimitServiceConfig"; - - reserved 1, 3; - - // Specifies the gRPC service that hosts the rate limit service. The client - // will connect to this cluster when it needs to make rate limit service - // requests. - core.v3.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; - - // API version for rate limit transport protocol. This describes the rate limit gRPC endpoint and - // version of messages used on the wire. - core.v3.ApiVersion transport_api_version = 4 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/config/rbac/v2/rbac.proto b/src/main/proto/envoy/config/rbac/v2/rbac.proto deleted file mode 100644 index 941d621..0000000 --- a/src/main/proto/envoy/config/rbac/v2/rbac.proto +++ /dev/null @@ -1,241 +0,0 @@ -syntax = "proto3"; - -package envoy.config.rbac.v2; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/route/route_components.proto"; -import "envoy/type/matcher/metadata.proto"; -import "envoy/type/matcher/path.proto"; -import "envoy/type/matcher/string.proto"; - -import "google/api/expr/v1alpha1/syntax.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.rbac.v2"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/rbac/v2;rbacv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Role Based Access Control (RBAC)] - -// Role Based Access Control (RBAC) provides service-level and method-level access control for a -// service. RBAC policies are additive. The policies are examined in order. A request is allowed -// once a matching policy is found (suppose the `action` is ALLOW). -// -// Here is an example of RBAC configuration. It has two policies: -// -// * Service account "cluster.local/ns/default/sa/admin" has full access to the service, and so -// does "cluster.local/ns/default/sa/superuser". -// -// * Any user can read ("GET") the service at paths with prefix "/products", so long as the -// destination port is either 80 or 443. -// -// .. code-block:: yaml -// -// action: ALLOW -// policies: -// "service-admin": -// permissions: -// - any: true -// principals: -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/admin" -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/superuser" -// "product-viewer": -// permissions: -// - and_rules: -// rules: -// - header: { name: ":method", exact_match: "GET" } -// - url_path: -// path: { prefix: "/products" } -// - or_rules: -// rules: -// - destination_port: 80 -// - destination_port: 443 -// principals: -// - any: true -// -message RBAC { - // Should we do safe-list or block-list style access control? - enum Action { - // The policies grant access to principals. The rest is denied. This is safe-list style - // access control. This is the default type. - ALLOW = 0; - - // The policies deny access to principals. The rest is allowed. This is block-list style - // access control. - DENY = 1; - } - - // The action to take if a policy matches. The request is allowed if and only if: - // - // * `action` is "ALLOWED" and at least one policy matches - // * `action` is "DENY" and none of the policies match - Action action = 1; - - // Maps from policy name to policy. A match occurs when at least one policy matches the request. - map policies = 2; -} - -// Policy specifies a role and the principals that are assigned/denied the role. A policy matches if -// and only if at least one of its permissions match the action taking place AND at least one of its -// principals match the downstream AND the condition is true if specified. -message Policy { - // Required. The set of permissions that define a role. Each permission is matched with OR - // semantics. To match all actions for this policy, a single Permission with the `any` field set - // to true should be used. - repeated Permission permissions = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Required. The set of principals that are assigned/denied the role based on “action”. Each - // principal is matched with OR semantics. To match all downstreams for this policy, a single - // Principal with the `any` field set to true should be used. - repeated Principal principals = 2 [(validate.rules).repeated = {min_items: 1}]; - - // An optional symbolic expression specifying an access control - // :ref:`condition `. The condition is combined - // with the permissions and the principals as a clause with AND semantics. - google.api.expr.v1alpha1.Expr condition = 3; -} - -// Permission defines an action (or actions) that a principal can take. -// [#next-free-field: 11] -message Permission { - // Used in the `and_rules` and `or_rules` fields in the `rule` oneof. Depending on the context, - // each are applied with the associated behavior. - message Set { - repeated Permission rules = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - oneof rule { - option (validate.required) = true; - - // A set of rules that all must match in order to define the action. - Set and_rules = 1; - - // A set of rules where at least one must match in order to define the action. - Set or_rules = 2; - - // When any is set, it matches any action. - bool any = 3 [(validate.rules).bool = {const: true}]; - - // A header (or pseudo-header such as :path or :method) on the incoming HTTP request. Only - // available for HTTP request. - // Note: the pseudo-header :path includes the query and fragment string. Use the `url_path` - // field if you want to match the URL path without the query and fragment string. - api.v2.route.HeaderMatcher header = 4; - - // A URL path on the incoming HTTP request. Only available for HTTP. - type.matcher.PathMatcher url_path = 10; - - // A CIDR block that describes the destination IP. - api.v2.core.CidrRange destination_ip = 5; - - // A port number that describes the destination port connecting to. - uint32 destination_port = 6 [(validate.rules).uint32 = {lte: 65535}]; - - // Metadata that describes additional information about the action. - type.matcher.MetadataMatcher metadata = 7; - - // Negates matching the provided permission. For instance, if the value of `not_rule` would - // match, this permission would not match. Conversely, if the value of `not_rule` would not - // match, this permission would match. - Permission not_rule = 8; - - // The request server from the client's connection request. This is - // typically TLS SNI. - // - // .. attention:: - // - // The behavior of this field may be affected by how Envoy is configured - // as explained below. - // - // * If the :ref:`TLS Inspector ` - // filter is not added, and if a `FilterChainMatch` is not defined for - // the :ref:`server name `, - // a TLS connection's requested SNI server name will be treated as if it - // wasn't present. - // - // * A :ref:`listener filter ` may - // overwrite a connection's requested server name within Envoy. - // - // Please refer to :ref:`this FAQ entry ` to learn to - // setup SNI. - type.matcher.StringMatcher requested_server_name = 9; - } -} - -// Principal defines an identity or a group of identities for a downstream subject. -// [#next-free-field: 12] -message Principal { - // Used in the `and_ids` and `or_ids` fields in the `identifier` oneof. Depending on the context, - // each are applied with the associated behavior. - message Set { - repeated Principal ids = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Authentication attributes for a downstream. - message Authenticated { - reserved 1; - - // The name of the principal. If set, The URI SAN or DNS SAN in that order is used from the - // certificate, otherwise the subject field is used. If unset, it applies to any user that is - // authenticated. - type.matcher.StringMatcher principal_name = 2; - } - - oneof identifier { - option (validate.required) = true; - - // A set of identifiers that all must match in order to define the downstream. - Set and_ids = 1; - - // A set of identifiers at least one must match in order to define the downstream. - Set or_ids = 2; - - // When any is set, it matches any downstream. - bool any = 3 [(validate.rules).bool = {const: true}]; - - // Authenticated attributes that identify the downstream. - Authenticated authenticated = 4; - - // A CIDR block that describes the downstream IP. - // This address will honor proxy protocol, but will not honor XFF. - api.v2.core.CidrRange source_ip = 5 [deprecated = true]; - - // A CIDR block that describes the downstream remote/origin address. - // Note: This is always the physical peer even if the - // :ref:`remote_ip ` is inferred - // from for example the x-forwarder-for header, proxy protocol, etc. - api.v2.core.CidrRange direct_remote_ip = 10; - - // A CIDR block that describes the downstream remote/origin address. - // Note: This may not be the physical peer and could be different from the - // :ref:`direct_remote_ip `. - // E.g, if the remote ip is inferred from for example the x-forwarder-for header, - // proxy protocol, etc. - api.v2.core.CidrRange remote_ip = 11; - - // A header (or pseudo-header such as :path or :method) on the incoming HTTP request. Only - // available for HTTP request. - // Note: the pseudo-header :path includes the query and fragment string. Use the `url_path` - // field if you want to match the URL path without the query and fragment string. - api.v2.route.HeaderMatcher header = 6; - - // A URL path on the incoming HTTP request. Only available for HTTP. - type.matcher.PathMatcher url_path = 9; - - // Metadata that describes additional information about the principal. - type.matcher.MetadataMatcher metadata = 7; - - // Negates matching the provided principal. For instance, if the value of `not_id` would match, - // this principal would not match. Conversely, if the value of `not_id` would not match, this - // principal would match. - Principal not_id = 8; - } -} diff --git a/src/main/proto/envoy/config/rbac/v3/rbac.proto b/src/main/proto/envoy/config/rbac/v3/rbac.proto deleted file mode 100644 index ef153ad..0000000 --- a/src/main/proto/envoy/config/rbac/v3/rbac.proto +++ /dev/null @@ -1,470 +0,0 @@ -syntax = "proto3"; - -package envoy.config.rbac.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/cel.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/filter_state.proto"; -import "envoy/type/matcher/v3/metadata.proto"; -import "envoy/type/matcher/v3/path.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/range.proto"; - -import "google/api/expr/v1alpha1/checked.proto"; -import "google/api/expr/v1alpha1/syntax.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.rbac.v3"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/rbac/v3;rbacv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Role Based Access Control (RBAC)] - -enum MetadataSource { - // Query :ref:`dynamic metadata ` - DYNAMIC = 0; - - // Query :ref:`route metadata ` - ROUTE = 1; -} - -// Role Based Access Control (RBAC) provides service-level and method-level access control for a -// service. Requests are allowed or denied based on the ``action`` and whether a matching policy is -// found. For instance, if the action is ALLOW and a matching policy is found the request should be -// allowed. -// -// RBAC can also be used to make access logging decisions by communicating with access loggers -// through dynamic metadata. When the action is LOG and at least one policy matches, the -// ``access_log_hint`` value in the shared key namespace 'envoy.common' is set to ``true`` indicating -// the request should be logged. -// -// Here is an example of RBAC configuration. It has two policies: -// -// * Service account ``cluster.local/ns/default/sa/admin`` has full access to the service, and so -// does "cluster.local/ns/default/sa/superuser". -// -// * Any user can read (``GET``) the service at paths with prefix ``/products``, so long as the -// destination port is either 80 or 443. -// -// .. code-block:: yaml -// -// action: ALLOW -// policies: -// "service-admin": -// permissions: -// - any: true -// principals: -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/admin" -// - authenticated: -// principal_name: -// exact: "cluster.local/ns/default/sa/superuser" -// "product-viewer": -// permissions: -// - and_rules: -// rules: -// - header: -// name: ":method" -// string_match: -// exact: "GET" -// - url_path: -// path: { prefix: "/products" } -// - or_rules: -// rules: -// - destination_port: 80 -// - destination_port: 443 -// principals: -// - any: true -// -message RBAC { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v2.RBAC"; - - // Should we do safe-list or block-list style access control? - enum Action { - // The policies grant access to principals. The rest are denied. This is safe-list style - // access control. This is the default type. - ALLOW = 0; - - // The policies deny access to principals. The rest are allowed. This is block-list style - // access control. - DENY = 1; - - // The policies set the ``access_log_hint`` dynamic metadata key based on if requests match. - // All requests are allowed. - LOG = 2; - } - - message AuditLoggingOptions { - // Deny and allow here refer to RBAC decisions, not actions. - enum AuditCondition { - // Never audit. - NONE = 0; - - // Audit when RBAC denies the request. - ON_DENY = 1; - - // Audit when RBAC allows the request. - ON_ALLOW = 2; - - // Audit whether RBAC allows or denies the request. - ON_DENY_AND_ALLOW = 3; - } - - // [#not-implemented-hide:] - message AuditLoggerConfig { - // Typed logger configuration. - // - // [#extension-category: envoy.rbac.audit_loggers] - core.v3.TypedExtensionConfig audit_logger = 1; - - // If true, when the logger is not supported, the data plane will not NACK but simply ignore it. - bool is_optional = 2; - } - - // Condition for the audit logging to happen. - // If this condition is met, all the audit loggers configured here will be invoked. - // - // [#not-implemented-hide:] - AuditCondition audit_condition = 1 [(validate.rules).enum = {defined_only: true}]; - - // Configurations for RBAC-based authorization audit loggers. - // - // [#not-implemented-hide:] - repeated AuditLoggerConfig logger_configs = 2; - } - - // The action to take if a policy matches. Every action either allows or denies a request, - // and can also carry out action-specific operations. - // - // Actions: - // - // * ``ALLOW``: Allows the request if and only if there is a policy that matches - // the request. - // * ``DENY``: Allows the request if and only if there are no policies that - // match the request. - // * ``LOG``: Allows all requests. If at least one policy matches, the dynamic - // metadata key ``access_log_hint`` is set to the value ``true`` under the shared - // key namespace ``envoy.common``. If no policies match, it is set to ``false``. - // Other actions do not modify this key. - // - Action action = 1 [(validate.rules).enum = {defined_only: true}]; - - // Maps from policy name to policy. A match occurs when at least one policy matches the request. - // The policies are evaluated in lexicographic order of the policy name. - map policies = 2; - - // Audit logging options that include the condition for audit logging to happen - // and audit logger configurations. - // - // [#not-implemented-hide:] - AuditLoggingOptions audit_logging_options = 3; -} - -// Policy specifies a role and the principals that are assigned/denied the role. -// A policy matches if and only if at least one of its permissions match the -// action taking place AND at least one of its principals match the downstream -// AND the condition is true if specified. -// [#next-free-field: 6] -message Policy { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v2.Policy"; - - // Required. The set of permissions that define a role. Each permission is - // matched with OR semantics. To match all actions for this policy, a single - // Permission with the ``any`` field set to true should be used. - repeated Permission permissions = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Required. The set of principals that are assigned/denied the role based on - // “action”. Each principal is matched with OR semantics. To match all - // downstreams for this policy, a single Principal with the ``any`` field set to - // true should be used. - repeated Principal principals = 2 [(validate.rules).repeated = {min_items: 1}]; - - // An optional symbolic expression specifying an access control - // :ref:`condition `. The condition is combined - // with the permissions and the principals as a clause with AND semantics. - // Only be used when checked_condition is not used. - google.api.expr.v1alpha1.Expr condition = 3 - [(udpa.annotations.field_migrate).oneof_promotion = "expression_specifier"]; - - // [#not-implemented-hide:] - // An optional symbolic expression that has been successfully type checked. - // Only be used when condition is not used. - google.api.expr.v1alpha1.CheckedExpr checked_condition = 4 - [(udpa.annotations.field_migrate).oneof_promotion = "expression_specifier"]; - - // CEL expression configuration that modifies the evaluation behavior of the ``condition`` field. - // If specified, string conversion, concatenation, and manipulation functions may be enabled - // for the CEL expression. See :ref:`CelExpressionConfig ` - // for more details. - core.v3.CelExpressionConfig cel_config = 5; -} - -// SourcedMetadata enables matching against metadata from different sources in the request processing -// pipeline. It extends the base MetadataMatcher functionality by allowing specification of where the -// metadata should be sourced from, rather than only matching against dynamic metadata. -// -// The matcher can be configured to look up metadata from: -// -// * Dynamic metadata: Runtime metadata added by filters during request processing -// * Route metadata: Static metadata configured on the route entry -// -message SourcedMetadata { - // Metadata matcher configuration that defines what metadata to match against. This includes the filter name, - // metadata key path, and expected value. - type.matcher.v3.MetadataMatcher metadata_matcher = 1 - [(validate.rules).message = {required: true}]; - - // Specifies which metadata source should be used for matching. If not set, - // defaults to DYNAMIC (dynamic metadata). Set to ROUTE to match against - // static metadata configured on the route entry. - MetadataSource metadata_source = 2 [(validate.rules).enum = {defined_only: true}]; -} - -// Permission defines an action (or actions) that a principal can take. -// [#next-free-field: 15] -message Permission { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v2.Permission"; - - // Used in the ``and_rules`` and ``or_rules`` fields in the ``rule`` oneof. Depending on the context, - // each are applied with the associated behavior. - message Set { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.rbac.v2.Permission.Set"; - - repeated Permission rules = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - oneof rule { - option (validate.required) = true; - - // A set of rules that all must match in order to define the action. - Set and_rules = 1; - - // A set of rules where at least one must match in order to define the action. - Set or_rules = 2; - - // When any is set, it matches any action. - bool any = 3 [(validate.rules).bool = {const: true}]; - - // A header (or pseudo-header such as ``:path`` or ``:method``) on the incoming HTTP request. Only available - // for HTTP request. - // - // .. note:: - // - // The pseudo-header ``:path`` includes the query and fragment string. Use the ``url_path`` field if you - // want to match the URL path without the query and fragment string. - // - route.v3.HeaderMatcher header = 4; - - // A URL path on the incoming HTTP request. Only available for HTTP. - type.matcher.v3.PathMatcher url_path = 10; - - // A CIDR block that describes the destination IP. - core.v3.CidrRange destination_ip = 5; - - // A port number that describes the destination port connecting to. - uint32 destination_port = 6 [(validate.rules).uint32 = {lte: 65535}]; - - // A port number range that describes a range of destination ports connecting to. - type.v3.Int32Range destination_port_range = 11; - - // Metadata that describes additional information about the action. This field is deprecated; please use - // :ref:`sourced_metadata` instead. - type.matcher.v3.MetadataMatcher metadata = 7 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Negates matching the provided permission. For instance, if the value of - // ``not_rule`` would match, this permission would not match. Conversely, if - // the value of ``not_rule`` would not match, this permission would match. - Permission not_rule = 8; - - // The request server from the client's connection request. This is typically TLS SNI. - // - // .. attention:: - // - // The behavior of this field may be affected by how Envoy is configured - // as explained below. - // - // * If the :ref:`TLS Inspector ` - // filter is not added, and if a ``FilterChainMatch`` is not defined for - // the :ref:`server name - // `, - // a TLS connection's requested SNI server name will be treated as if it - // wasn't present. - // - // * A :ref:`listener filter ` may - // overwrite a connection's requested server name within Envoy. - // - // Please refer to :ref:`this FAQ entry ` to learn how to setup SNI. - type.matcher.v3.StringMatcher requested_server_name = 9; - - // Extension for configuring custom matchers for RBAC. - // [#extension-category: envoy.rbac.matchers] - core.v3.TypedExtensionConfig matcher = 12; - - // URI template path matching. - // [#extension-category: envoy.path.match] - core.v3.TypedExtensionConfig uri_template = 13; - - // Matches against metadata from either dynamic state or route configuration. Preferred over the - // ``metadata`` field as it provides more flexibility in metadata source selection. - SourcedMetadata sourced_metadata = 14; - } -} - -// Principal defines an identity or a group of identities for a downstream -// subject. -// [#next-free-field: 15] -message Principal { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.rbac.v2.Principal"; - - // Used in the ``and_ids`` and ``or_ids`` fields in the ``identifier`` oneof. - // Depending on the context, each are applied with the associated behavior. - message Set { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.rbac.v2.Principal.Set"; - - repeated Principal ids = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Authentication attributes for a downstream. - // It is recommended to NOT use this type, but instead use - // :ref:`MTlsAuthenticated `, - // configured via :ref:`custom `, - // which should be used for most use cases due to its improved security. - message Authenticated { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.rbac.v2.Principal.Authenticated"; - - reserved 1; - - // The name of the principal. If set, The URI SAN or DNS SAN in that order - // is used from the certificate, otherwise the subject field is used. If - // unset, it applies to any user that is allowed by the downstream TLS configuration. - // If :ref:`require_client_certificate ` - // is false or :ref:`trust_chain_verification ` - // is set to :ref:`ACCEPT_UNTRUSTED `, - // then no authentication is required. - type.matcher.v3.StringMatcher principal_name = 2; - } - - oneof identifier { - option (validate.required) = true; - - // A set of identifiers that all must match in order to define the downstream. - Set and_ids = 1; - - // A set of identifiers at least one must match in order to define the downstream. - Set or_ids = 2; - - // When any is set, it matches any downstream. - bool any = 3 [(validate.rules).bool = {const: true}]; - - // Authenticated attributes that identify the downstream. - // It is recommended to NOT use this field, but instead use - // :ref:`MTlsAuthenticated `, - // configured via :ref:`custom `, - // which should be used for most use cases due to its improved security. - Authenticated authenticated = 4; - - // A CIDR block that describes the downstream IP. - // This address will honor proxy protocol, but will not honor XFF. - // - // This field is deprecated; either use :ref:`remote_ip - // ` for the same - // behavior, or use - // :ref:`direct_remote_ip `. - core.v3.CidrRange source_ip = 5 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // A CIDR block that describes the downstream remote/origin address. - // - // .. note:: - // - // This is always the physical peer even if the - // :ref:`remote_ip ` is inferred from the - // x-forwarder-for header, the proxy protocol, etc. - // - core.v3.CidrRange direct_remote_ip = 10; - - // A CIDR block that describes the downstream remote/origin address. - // - // .. note:: - // - // This may not be the physical peer and could be different from the :ref:`direct_remote_ip - // `. E.g, if the remote ip is inferred from - // the x-forwarder-for header, the proxy protocol, etc. - // - core.v3.CidrRange remote_ip = 11; - - // A header (or pseudo-header such as ``:path`` or ``:method``) on the incoming HTTP request. Only available - // for HTTP request. - // - // .. note:: - // - // The pseudo-header ``:path`` includes the query and fragment string. Use the ``url_path`` field if you - // want to match the URL path without the query and fragment string. - // - route.v3.HeaderMatcher header = 6; - - // A URL path on the incoming HTTP request. Only available for HTTP. - type.matcher.v3.PathMatcher url_path = 9; - - // Metadata that describes additional information about the principal. This field is deprecated; please use - // :ref:`sourced_metadata` instead. - type.matcher.v3.MetadataMatcher metadata = 7 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Identifies the principal using a filter state object. - type.matcher.v3.FilterStateMatcher filter_state = 12; - - // Negates matching the provided principal. For instance, if the value of - // ``not_id`` would match, this principal would not match. Conversely, if the - // value of ``not_id`` would not match, this principal would match. - Principal not_id = 8; - - // Matches against metadata from either dynamic state or route configuration. Preferred over the - // ``metadata`` field as it provides more flexibility in metadata source selection. - SourcedMetadata sourced_metadata = 13; - - // Extension for configuring custom principals for RBAC. - // [#extension-category: envoy.rbac.principals] - core.v3.TypedExtensionConfig custom = 14; - } -} - -// Action defines the result of allowance or denial when a request matches the matcher. -message Action { - // The name indicates the policy name. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The action to take if the matcher matches. Every action either allows or denies a request, - // and can also carry out action-specific operations. - // - // **Actions:** - // - // * ``ALLOW``: If the request gets matched on ALLOW, it is permitted. - // * ``DENY``: If the request gets matched on DENY, it is not permitted. - // * ``LOG``: If the request gets matched on LOG, it is permitted. Besides, the - // dynamic metadata key ``access_log_hint`` under the shared key namespace - // ``envoy.common`` will be set to the value ``true``. - // * If the request cannot get matched, it will fallback to ``DENY``. - // - // **Log behavior:** - // - // If the RBAC matcher contains at least one LOG action, the dynamic - // metadata key ``access_log_hint`` will be set based on if the request - // get matched on the LOG action. - // - RBAC.Action action = 2; -} diff --git a/src/main/proto/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto b/src/main/proto/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto deleted file mode 100644 index 3a5bec3..0000000 --- a/src/main/proto/envoy/config/resource_monitor/fixed_heap/v2alpha/fixed_heap.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.config.resource_monitor.fixed_heap.v2alpha; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.resource_monitor.fixed_heap.v2alpha"; -option java_outer_classname = "FixedHeapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/resource_monitor/fixed_heap/v2alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Fixed heap] -// [#extension: envoy.resource_monitors.fixed_heap] - -// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a -// fraction of currently reserved heap memory divided by a statically configured maximum -// specified in the FixedHeapConfig. -message FixedHeapConfig { - uint64 max_heap_size_bytes = 1 [(validate.rules).uint64 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto b/src/main/proto/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto deleted file mode 100644 index 3a804b4..0000000 --- a/src/main/proto/envoy/config/resource_monitor/injected_resource/v2alpha/injected_resource.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.config.resource_monitor.injected_resource.v2alpha; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.resource_monitor.injected_resource.v2alpha"; -option java_outer_classname = "InjectedResourceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/resource_monitor/injected_resource/v2alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Injected resource] -// [#extension: envoy.resource_monitors.injected_resource] - -// The injected resource monitor allows injecting a synthetic resource pressure into Envoy -// via a text file, which must contain a floating-point number in the range [0..1] representing -// the resource pressure and be updated atomically by a symbolic link swap. -// This is intended primarily for integration tests to force Envoy into an overloaded state. -message InjectedResourceConfig { - string filename = 1 [(validate.rules).string = {min_bytes: 1}]; -} diff --git a/src/main/proto/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto b/src/main/proto/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto deleted file mode 100644 index a1180fb..0000000 --- a/src/main/proto/envoy/config/retry/omit_canary_hosts/v2/omit_canary_hosts.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.config.retry.omit_canary_hosts.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.retry.omit_canary_hosts.v2"; -option java_outer_classname = "OmitCanaryHostsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/omit_canary_hosts/v2;omit_canary_hostsv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.retry.host.omit_canary_hosts.v3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Omit Canary Hosts Predicate] -// [#extension: envoy.retry_host_predicates.omit_canary_hosts] - -message OmitCanaryHostsPredicate { -} diff --git a/src/main/proto/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto b/src/main/proto/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto deleted file mode 100644 index 373a6c9..0000000 --- a/src/main/proto/envoy/config/retry/omit_host_metadata/v2/omit_host_metadata_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.config.retry.omit_host_metadata.v2; - -import "envoy/api/v2/core/base.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.retry.omit_host_metadata.v2"; -option java_outer_classname = "OmitHostMetadataConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/omit_host_metadata/v2;omit_host_metadatav2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.retry.host.omit_host_metadata.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Omit host metadata retry predicate] - -// A retry host predicate that can be used to reject a host based on -// predefined metadata match criteria. -// [#extension: envoy.retry_host_predicates.omit_host_metadata] -message OmitHostMetadataConfig { - // Retry host predicate metadata match criteria. The hosts in - // the upstream cluster with matching metadata will be omitted while - // attempting a retry of a failed request. The metadata should be specified - // under the *envoy.lb* key. - api.v2.core.Metadata metadata_match = 1; -} diff --git a/src/main/proto/envoy/config/retry/previous_hosts/v2/previous_hosts.proto b/src/main/proto/envoy/config/retry/previous_hosts/v2/previous_hosts.proto deleted file mode 100644 index 6e5abf7..0000000 --- a/src/main/proto/envoy/config/retry/previous_hosts/v2/previous_hosts.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.config.retry.previous_hosts.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.retry.previous_hosts.v2"; -option java_outer_classname = "PreviousHostsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/previous_hosts/v2;previous_hostsv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.retry.host.previous_hosts.v3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Previous Hosts Predicate] -// [#extension: envoy.retry_host_predicates.previous_hosts] - -message PreviousHostsPredicate { -} diff --git a/src/main/proto/envoy/config/retry/previous_priorities/previous_priorities_config.proto b/src/main/proto/envoy/config/retry/previous_priorities/previous_priorities_config.proto deleted file mode 100644 index b10e4b6..0000000 --- a/src/main/proto/envoy/config/retry/previous_priorities/previous_priorities_config.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.config.retry.previous_priorities; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.retry.previous_priorities"; -option java_outer_classname = "PreviousPrioritiesConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/retry/previous_priorities"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.retry.priority.previous_priorities.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Previous priorities retry selector] - -// A retry host selector that attempts to spread retries between priorities, even if certain -// priorities would not normally be attempted due to higher priorities being available. -// -// As priorities get excluded, load will be distributed amongst the remaining healthy priorities -// based on the relative health of the priorities, matching how load is distributed during regular -// host selection. For example, given priority healths of {100, 50, 50}, the original load will be -// {100, 0, 0} (since P0 has capacity to handle 100% of the traffic). If P0 is excluded, the load -// changes to {0, 50, 50}, because P1 is only able to handle 50% of the traffic, causing the -// remaining to spill over to P2. -// -// Each priority attempted will be excluded until there are no healthy priorities left, at which -// point the list of attempted priorities will be reset, essentially starting from the beginning. -// For example, given three priorities P0, P1, P2 with healthy % of 100, 0 and 50 respectively, the -// following sequence of priorities would be selected (assuming update_frequency = 1): -// Attempt 1: P0 (P0 is 100% healthy) -// Attempt 2: P2 (P0 already attempted, P2 only healthy priority) -// Attempt 3: P0 (no healthy priorities, reset) -// Attempt 4: P2 -// -// In the case of all upstream hosts being unhealthy, no adjustments will be made to the original -// priority load, so behavior should be identical to not using this plugin. -// -// Using this PriorityFilter requires rebuilding the priority load, which runs in O(# of -// priorities), which might incur significant overhead for clusters with many priorities. -// [#extension: envoy.retry_priorities.previous_priorities] -message PreviousPrioritiesConfig { - // How often the priority load should be updated based on previously attempted priorities. Useful - // to allow each priorities to receive more than one request before being excluded or to reduce - // the number of times that the priority load has to be recomputed. - // - // For example, by setting this to 2, then the first two attempts (initial attempt and first - // retry) will use the unmodified priority load. The third and fourth attempt will use priority - // load which excludes the priorities routed to with the first two attempts, and the fifth and - // sixth attempt will use the priority load excluding the priorities used for the first four - // attempts. - // - // Must be greater than 0. - int32 update_frequency = 1 [(validate.rules).int32 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/config/route/v3/route.proto b/src/main/proto/envoy/config/route/v3/route.proto deleted file mode 100644 index 5bd909f..0000000 --- a/src/main/proto/envoy/config/route/v3/route.proto +++ /dev/null @@ -1,172 +0,0 @@ -syntax = "proto3"; - -package envoy.config.route.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/route/v3/route_components.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.route.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP route configuration] -// * Routing :ref:`architecture overview ` -// * HTTP :ref:`router filter ` - -// [#next-free-field: 19] -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RouteConfiguration"; - - // The name of the route configuration. For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.Rds`. - string name = 1; - - // An array of virtual hosts that make up the route table. - repeated VirtualHost virtual_hosts = 2; - - // An array of virtual hosts will be dynamically loaded via the VHDS API. - // Both ``virtual_hosts`` and ``vhds`` fields will be used when present. ``virtual_hosts`` can be used - // for a base routing table or for infrequently changing virtual hosts. ``vhds`` is used for - // on-demand discovery of virtual hosts. The contents of these two fields will be merged to - // generate a routing table for a given RouteConfiguration, with ``vhds`` derived configuration - // taking precedence. - Vhds vhds = 9; - - // Optionally specifies a list of HTTP headers that the connection manager - // will consider to be internal only. If they are found on external requests they will be cleaned - // prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information. - repeated string internal_only_headers = 3 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // Specifies a list of HTTP headers that should be added to each response that - // the connection manager encodes. Headers specified at this level are applied - // after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or - // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption response_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // that the connection manager encodes. - repeated string response_headers_to_remove = 5 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // Specifies a list of HTTP headers that should be added to each request - // routed by the HTTP connection manager. Headers specified at this level are - // applied after headers from any enclosed :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` or - // :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption request_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // routed by the HTTP connection manager. - repeated string request_headers_to_remove = 8 [ - (validate.rules).repeated = {items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}} - ]; - - // Headers mutations at all levels are evaluated, if specified. By default, the order is from most - // specific (i.e. route entry level) to least specific (i.e. route configuration level). Later header - // mutations may override earlier mutations. - // This order can be reversed by setting this field to true. In other words, most specific level mutation - // is evaluated last. - // - bool most_specific_header_mutations_wins = 10; - - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a 404 if the route - // is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`rds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - google.protobuf.BoolValue validate_clusters = 7; - - // The maximum bytes of the response :ref:`direct response body - // ` size. If not specified the default - // is 4096. - // - // .. warning:: - // - // Envoy currently holds the content of :ref:`direct response body - // ` in memory. Be careful setting - // this to be larger than the default 4KB, since the allocated memory for direct response body - // is not subject to data plane buffering controls. - // - google.protobuf.UInt32Value max_direct_response_body_size_bytes = 11; - - // A list of plugins and their configurations which may be used by a - // :ref:`cluster specifier plugin name ` - // within the route. All ``extension.name`` fields in this list must be unique. - repeated ClusterSpecifierPlugin cluster_specifier_plugins = 12; - - // Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. - // Note that policies are not merged, the most specific non-empty one becomes the mirror policies. - repeated RouteAction.RequestMirrorPolicy request_mirror_policies = 13; - - // By default, port in :authority header (if any) is used in host matching. - // With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost. - // - // .. note:: - // This option will not strip the port number (if any) contained in route config - // :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.domains field. - bool ignore_port_in_host_matching = 14; - - // Normally, virtual host matching is done using the :authority (or - // Host: in HTTP < 2) HTTP header. Setting this will instead, use a - // different HTTP header for this purpose. - string vhost_header = 18; - - // Ignore path-parameters in path-matching. - // Before RFC3986, URI were like(RFC1808): :///;?# - // Envoy by default takes ":path" as ";". - // For users who want to only match path on the "" portion, this option should be true. - bool ignore_path_parameters_in_path_matching = 15; - - // This field can be used to provide RouteConfiguration level per filter config. The key should match the - // :ref:`filter config name - // `. - // See :ref:`Http filter route specific config ` - // for details. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - map typed_per_filter_config = 16; - - // The metadata field can be used to provide additional information - // about the route configuration. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as ``envoy.filters.http.router``. - core.v3.Metadata metadata = 17; -} - -message Vhds { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Vhds"; - - // Configuration source specifier for VHDS. - core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/route/v3/route_components.proto b/src/main/proto/envoy/config/route/v3/route_components.proto deleted file mode 100644 index 4587ef1..0000000 --- a/src/main/proto/envoy/config/route/v3/route_components.proto +++ /dev/null @@ -1,2918 +0,0 @@ -syntax = "proto3"; - -package envoy.config.route.v3; - -import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/proxy_protocol.proto"; -import "envoy/config/core/v3/substitution_format_string.proto"; -import "envoy/type/matcher/v3/filter_state.proto"; -import "envoy/type/matcher/v3/metadata.proto"; -import "envoy/type/matcher/v3/regex.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/metadata/v3/metadata.proto"; -import "envoy/type/tracing/v3/custom_tag.proto"; -import "envoy/type/v3/percent.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/type/matcher/v3/matcher.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.route.v3"; -option java_outer_classname = "RouteComponentsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP route components] -// * Routing :ref:`architecture overview ` -// * HTTP :ref:`router filter ` - -// The top level element in the routing configuration is a virtual host. Each virtual host has -// a logical name as well as a set of domains that get routed to it based on the incoming request's -// host header. This allows a single listener to service multiple top level domain path trees. Once -// a virtual host is selected based on the domain, the routes are processed in order to see which -// upstream cluster to route to or whether to perform a redirect. -// [#next-free-field: 26] -message VirtualHost { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.VirtualHost"; - - enum TlsRequirementType { - // No TLS requirement for the virtual host. - NONE = 0; - - // External requests must use TLS. If a request is external and it is not - // using TLS, a 301 redirect will be sent telling the client to use HTTPS. - EXTERNAL_ONLY = 1; - - // All requests must use TLS. If a request is not using TLS, a 301 redirect - // will be sent telling the client to use HTTPS. - ALL = 2; - } - - reserved 9, 12; - - reserved "per_filter_config"; - - // The logical name of the virtual host. This is used when emitting certain - // statistics but is not relevant for routing. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A list of domains (host/authority header) that will be matched to this - // virtual host. Wildcard hosts are supported in the suffix or prefix form. - // - // Domain search order: - // 1. Exact domain names: ``www.foo.com``. - // 2. Suffix domain wildcards: ``*.foo.com`` or ``*-bar.foo.com``. - // 3. Prefix domain wildcards: ``foo.*`` or ``foo-*``. - // 4. Special wildcard ``*`` matching any domain. - // - // .. note:: - // - // The wildcard will not match the empty string. - // For example, ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - // - // Domains cannot contain control characters. This is validated by the well_known_regex HTTP_HEADER_VALUE. - repeated string domains = 2 [(validate.rules).repeated = { - min_items: 1 - items {string {well_known_regex: HTTP_HEADER_VALUE strict: false}} - }]; - - // The list of routes that will be matched, in order, for incoming requests. - // The first route that matches will be used. - // Only one of this and ``matcher`` can be specified. - repeated Route routes = 3 [(udpa.annotations.field_migrate).oneof_promotion = "route_selection"]; - - // The match tree to use when resolving route actions for incoming requests. Only one of this and ``routes`` - // can be specified. - xds.type.matcher.v3.Matcher matcher = 21 - [(udpa.annotations.field_migrate).oneof_promotion = "route_selection"]; - - // Specifies the type of TLS enforcement the virtual host expects. If this option is not - // specified, there is no TLS requirement for the virtual host. - TlsRequirementType require_tls = 4 [(validate.rules).enum = {defined_only: true}]; - - // A list of virtual clusters defined for this virtual host. Virtual clusters - // are used for additional statistics gathering. - repeated VirtualCluster virtual_clusters = 5; - - // Specifies a set of rate limit configurations that will be applied to the - // virtual host. - repeated RateLimit rate_limits = 6; - - // Specifies a list of HTTP headers that should be added to each request - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption request_headers_to_add = 7 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // handled by this virtual host. - repeated string request_headers_to_remove = 13 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Specifies a list of HTTP headers that should be added to each response - // handled by this virtual host. Headers specified at this level are applied - // after headers from enclosed :ref:`envoy_v3_api_msg_config.route.v3.Route` and before headers from the - // enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption response_headers_to_add = 10 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // handled by this virtual host. - repeated string response_headers_to_remove = 11 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Indicates that the virtual host has a CORS policy. This field is ignored if related cors policy is - // found in the - // :ref:`VirtualHost.typed_per_filter_config`. - // - // .. attention:: - // - // This option has been deprecated. Please use - // :ref:`VirtualHost.typed_per_filter_config` - // to configure the CORS HTTP filter. - CorsPolicy cors = 8 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // This field can be used to provide virtual host level per filter config. The key should match the - // :ref:`filter config name - // `. - // See :ref:`HTTP filter route-specific config ` - // for details. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - map typed_per_filter_config = 15; - - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the upstream request. Setting this option will cause it to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the upstream - // will see the attempt count as perceived by the second Envoy. - // - // Defaults to ``false``. - // - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - // - // [#next-major-version: rename to include_attempt_count_in_request.] - bool include_request_attempt_count = 14; - - // Decides whether the :ref:`x-envoy-attempt-count - // ` header should be included - // in the downstream response. Setting this option will cause the router to override any existing header - // value, so in the case of two Envoys on the request path with this option enabled, the downstream - // will see the attempt count as perceived by the Envoy closest upstream from itself. - // - // Defaults to ``false``. - // - // This header is unaffected by the - // :ref:`suppress_envoy_headers - // ` flag. - bool include_attempt_count_in_response = 19; - - // Indicates the retry policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g., values are not inherited). - RetryPolicy retry_policy = 16; - - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that setting a route level entry - // will take precedence over this config and it'll be treated independently (e.g., values are not - // inherited). :ref:`Retry policy ` should not be - // set if this field is used. - google.protobuf.Any retry_policy_typed_config = 20; - - // Indicates the hedge policy for all routes in this virtual host. Note that setting a - // route level entry will take precedence over this config and it'll be treated - // independently (e.g., values are not inherited). - HedgePolicy hedge_policy = 17; - - // Decides whether to include the :ref:`x-envoy-is-timeout-retry ` - // request header in retries initiated by per-try timeouts. - bool include_is_timeout_retry_header = 23; - - // The maximum bytes which will be buffered for retries and shadowing. If set, the bytes actually buffered will be - // the minimum value of this and the listener ``per_connection_buffer_limit_bytes``. - // - // .. attention:: - // - // This field has been deprecated. Please use :ref:`request_body_buffer_limit - // ` instead. - // Only one of ``per_request_buffer_limit_bytes`` and ``request_body_buffer_limit`` could be set. - google.protobuf.UInt32Value per_request_buffer_limit_bytes = 18 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The maximum bytes which will be buffered for request bodies to support large request body - // buffering beyond the ``per_connection_buffer_limit_bytes``. - // - // This limit is specifically for the request body buffering and allows buffering larger payloads while maintaining - // flow control. - // - // Buffer limit precedence (from highest to lowest priority): - // - // 1. If ``request_body_buffer_limit`` is set, then ``request_body_buffer_limit`` will be used. - // 2. If :ref:`per_request_buffer_limit_bytes ` - // is set but ``request_body_buffer_limit`` is not, then ``min(per_request_buffer_limit_bytes, per_connection_buffer_limit_bytes)`` - // will be used. - // 3. If neither is set, then ``per_connection_buffer_limit_bytes`` will be used. - // - // For flow control chunk sizes, ``min(per_connection_buffer_limit_bytes, 16KB)`` will be used. - // - // Only one of :ref:`per_request_buffer_limit_bytes ` - // and ``request_body_buffer_limit`` could be set. - google.protobuf.UInt64Value request_body_buffer_limit = 25 - [(validate.rules).message = {required: false}]; - - // Specify a set of default request mirroring policies for every route under this virtual host. - // It takes precedence over the route config mirror policy entirely. - // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. - repeated RouteAction.RequestMirrorPolicy request_mirror_policies = 22; - - // The metadata field can be used to provide additional information - // about the virtual host. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as ``envoy.filters.http.router``. - core.v3.Metadata metadata = 24; -} - -// A filter-defined action type. -message FilterAction { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.FilterAction"; - - google.protobuf.Any action = 1; -} - -// This can be used in route matcher :ref:`VirtualHost.matcher `. -// When the matcher matches, routes will be matched and run. -message RouteList { - // The list of routes that will be matched and run, in order. The first route that matches will be used. - repeated Route routes = 1; -} - -// A route is both a specification of how to match a request as well as an indication of what to do -// next (e.g., redirect, forward, rewrite, etc.). -// -// .. attention:: -// -// Envoy supports routing on HTTP method via :ref:`header matching -// `. -// [#next-free-field: 21] -message Route { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.Route"; - - reserved 6, 8; - - reserved "per_filter_config"; - - // Name for the route. - string name = 14; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - oneof action { - option (validate.required) = true; - - // Route request to some upstream cluster. - RouteAction route = 2; - - // Return a redirect. - RedirectAction redirect = 3; - - // Return an arbitrary HTTP response directly, without proxying. - DirectResponseAction direct_response = 7; - - // [#not-implemented-hide:] - // A filter-defined action (e.g., it could dynamically generate the RouteAction). - // [#comment: TODO(samflattery): Remove cleanup in route_fuzz_test.cc when - // implemented] - FilterAction filter_action = 17; - - // [#not-implemented-hide:] - // An action used when the route will generate a response directly, - // without forwarding to an upstream host. This will be used in non-proxy - // xDS clients like the gRPC server. It could also be used in the future - // in Envoy for a filter that directly generates responses for requests. - NonForwardingAction non_forwarding_action = 18; - } - - // The Metadata field can be used to provide additional information - // about the route. It can be used for configuration, stats, and logging. - // The metadata should go under the filter namespace that will need it. - // For instance, if the metadata is intended for the Router filter, - // the filter name should be specified as ``envoy.filters.http.router``. - core.v3.Metadata metadata = 4; - - // Decorator for the matched route. - Decorator decorator = 5; - - // This field can be used to provide route specific per filter config. The key should match the - // :ref:`filter config name - // `. - // See :ref:`HTTP filter route-specific config ` - // for details. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - map typed_per_filter_config = 13; - - // Specifies a set of headers that will be added to requests matching this - // route. Headers specified at this level are applied before headers from the - // enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption request_headers_to_add = 9 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request - // matching this route. - repeated string request_headers_to_remove = 12 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Specifies a set of headers that will be added to responses to requests - // matching this route. Headers specified at this level are applied before - // headers from the enclosing :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost` and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including - // details on header value syntax, see the documentation on - // :ref:`custom request headers `. - repeated core.v3.HeaderValueOption response_headers_to_add = 10 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each response - // to requests matching this route. - repeated string response_headers_to_remove = 11 [(validate.rules).repeated = { - items {string {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Presence of the object defines whether the connection manager's tracing configuration - // is overridden by this route specific instance. - Tracing tracing = 15; - - // The maximum bytes which will be buffered for retries and shadowing. - // If set, the bytes actually buffered will be the minimum value of this and the - // listener per_connection_buffer_limit_bytes. - // - // .. attention:: - // - // This field has been deprecated. Please use :ref:`request_body_buffer_limit - // ` instead. - // Only one of ``per_request_buffer_limit_bytes`` and ``request_body_buffer_limit`` may be set. - google.protobuf.UInt32Value per_request_buffer_limit_bytes = 16 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The human readable prefix to use when emitting statistics for this endpoint. - // The statistics are rooted at vhost..route.. - // This should be set for highly critical - // endpoints that one wishes to get “per-route” statistics on. - // If not set, endpoint statistics are not generated. - // - // The emitted statistics are the same as those documented for :ref:`virtual clusters `. - // - // .. warning:: - // - // We do not recommend setting up a stat prefix for - // every application endpoint. This is both not easily maintainable and - // statistics use a non-trivial amount of memory (approximately 1KiB per route). - string stat_prefix = 19; - - // The maximum bytes which will be buffered for request bodies to support large request body - // buffering beyond the ``per_connection_buffer_limit_bytes``. - // - // This limit is specifically for the request body buffering and allows buffering larger payloads while maintaining - // flow control. - // - // Buffer limit precedence (from highest to lowest priority): - // - // 1. If ``request_body_buffer_limit`` is set: use ``request_body_buffer_limit`` - // 2. If :ref:`per_request_buffer_limit_bytes ` - // is set but ``request_body_buffer_limit`` is not: use ``min(per_request_buffer_limit_bytes, per_connection_buffer_limit_bytes)`` - // 3. If neither is set: use ``per_connection_buffer_limit_bytes`` - // - // For flow control chunk sizes, use ``min(per_connection_buffer_limit_bytes, 16KB)``. - // - // Only one of :ref:`per_request_buffer_limit_bytes ` - // and ``request_body_buffer_limit`` may be set. - google.protobuf.UInt64Value request_body_buffer_limit = 20; -} - -// Compared to the :ref:`cluster ` field that specifies a -// single upstream cluster as the target of a request, the :ref:`weighted_clusters -// ` option allows for specification of -// multiple upstream clusters along with weights that indicate the percentage of -// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the -// weights. -// [#next-free-field: 6] -message WeightedCluster { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.WeightedCluster"; - - // [#next-free-field: 13] - message ClusterWeight { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.WeightedCluster.ClusterWeight"; - - reserved 7, 8; - - reserved "per_filter_config"; - - // Only one of ``name`` and ``cluster_header`` may be specified. - // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] - // Name of the upstream cluster. The cluster must exist in the - // :ref:`cluster manager configuration `. - string name = 1 [(udpa.annotations.field_migrate).oneof_promotion = "cluster_specifier"]; - - // Only one of ``name`` and ``cluster_header`` may be specified. - // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }] - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 - // ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string cluster_header = 12 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}, - (udpa.annotations.field_migrate).oneof_promotion = "cluster_specifier" - ]; - - // The weight of the cluster. This value is relative to the other clusters' - // weights. When a request matches the route, the choice of an upstream cluster - // is determined by its weight. The sum of weights across all - // entries in the clusters array must be greater than 0, and must not exceed - // uint32_t maximal value (4294967295). - google.protobuf.UInt32Value weight = 2; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. Note that this will be merged with what's provided in - // :ref:`RouteAction.metadata_match `, with - // values here taking precedence. The filter name should be specified as ``envoy.lb``. - core.v3.Metadata metadata_match = 3; - - // Specifies a list of headers to be added to requests when this cluster is selected - // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption request_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of HTTP headers that should be removed from each request when - // this cluster is selected through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - repeated string request_headers_to_remove = 9 [(validate.rules).repeated = { - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // Specifies a list of headers to be added to responses when this cluster is selected - // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - // Headers specified at this level are applied before headers from the enclosing - // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`, and - // :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. For more information, including details on - // header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated core.v3.HeaderValueOption response_headers_to_add = 5 - [(validate.rules).repeated = {max_items: 1000}]; - - // Specifies a list of headers to be removed from responses when this cluster is selected - // through the enclosing :ref:`envoy_v3_api_msg_config.route.v3.RouteAction`. - repeated string response_headers_to_remove = 6 [(validate.rules).repeated = { - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; - - // This field can be used to provide weighted cluster specific per filter config. The key should match the - // :ref:`filter config name - // `. - // See :ref:`HTTP filter route-specific config ` - // for details. - // [#comment: An entry's value may be wrapped in a - // :ref:`FilterConfig` - // message to specify additional options.] - map typed_per_filter_config = 10; - - oneof host_rewrite_specifier { - // Indicates that during forwarding, the host header will be swapped with - // this value. - string host_rewrite_literal = 11 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Specifies the total weight across all clusters. The sum of all cluster weights must equal this - // value, if this is greater than 0. - // This field is now deprecated, and the client will use the sum of all - // cluster weights. It is up to the management server to supply the correct weights. - google.protobuf.UInt32Value total_weight = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Specifies the runtime key prefix that should be used to construct the - // runtime keys associated with each cluster. When the ``runtime_key_prefix`` is - // specified, the router will look for weights associated with each upstream - // cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where - // ``cluster[i]`` denotes an entry in the clusters array field. If the runtime - // key for the cluster does not exist, the value specified in the - // configuration file will be used as the default weight. See the :ref:`runtime documentation - // ` for how key names map to the underlying implementation. - string runtime_key_prefix = 2; - - oneof random_value_specifier { - // Specifies the header name that is used to look up the random value passed in the request header. - // This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic. - // If header is not present or invalid, Envoy will fall back to use the internally generated random value. - // This header is expected to be single-valued header as we only want to have one selected value throughout - // the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX. - string header_name = 4 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // When set to true, the hash policies will be used to generate the random value for weighted cluster selection. - // This could ensure consistent cluster picking across multiple proxy levels for weighted traffic. - google.protobuf.BoolValue use_hash_policy = 5; - } -} - -// Configuration for a cluster specifier plugin. -message ClusterSpecifierPlugin { - // The name of the plugin and its opaque configuration. - // - // [#extension-category: envoy.router.cluster_specifier_plugin] - core.v3.TypedExtensionConfig extension = 1 [(validate.rules).message = {required: true}]; - - // If is_optional is not set or is set to false and the plugin defined by this message is not a - // supported type, the containing resource is NACKed. If is_optional is set to true, the resource - // would not be NACKed for this reason. In this case, routes referencing this plugin's name would - // not be treated as an illegal configuration, but would result in a failure if the route is - // selected. - bool is_optional = 2; -} - -// [#next-free-field: 18] -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteMatch"; - - message GrpcRouteMatchOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions"; - } - - message TlsContextMatchOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteMatch.TlsContextMatchOptions"; - - // If specified, the route will match against whether or not a certificate is presented. - // If not specified, certificate presentation status (true or false) will not be considered when route matching. - google.protobuf.BoolValue presented = 1; - - // If specified, the route will match against whether or not a certificate is validated. - // If not specified, certificate validation status (true or false) will not be considered when route matching. - // - // .. warning:: - // - // Client certificate validation is not currently performed upon TLS session resumption. For - // a resumed TLS session the route will match only when ``validated`` is false, regardless of - // whether the client TLS certificate is valid. - // - // The only known workaround for this issue is to disable TLS session resumption entirely, by - // setting both :ref:`disable_stateless_session_resumption ` - // and :ref:`disable_stateful_session_resumption ` on the DownstreamTlsContext. - google.protobuf.BoolValue validated = 2; - } - - // An extensible message for matching CONNECT or CONNECT-UDP requests. - message ConnectMatcher { - } - - reserved 5, 3; - - reserved "regex"; - - oneof path_specifier { - option (validate.required) = true; - - // If specified, the route is a prefix rule meaning that the prefix must - // match the beginning of the ``:path`` header. - string prefix = 1; - - // If specified, the route is an exact path rule meaning that the path must - // exactly match the ``:path`` header once the query string is removed. - string path = 2; - - // If specified, the route is a regular expression rule meaning that the - // regex must match the ``:path`` header once the query string is removed. The entire path - // (without the query string) must match the regex. The rule will not match if only a - // subsequence of the ``:path`` header matches the regex. - // - // [#next-major-version: In the v3 API we should redo how path specification works such - // that we utilize StringMatcher, and additionally have consistent options around whether we - // strip query strings, do a case-sensitive match, etc. In the interim it will be too disruptive - // to deprecate the existing options. We should even consider whether we want to do away with - // path_specifier entirely and just rely on a set of header matchers which can already match - // on :path, etc. The issue with that is it is unclear how to generically deal with query string - // stripping. This needs more thought.] - type.matcher.v3.RegexMatcher safe_regex = 10 [(validate.rules).message = {required: true}]; - - // If this is used as the matcher, the matcher will only match CONNECT or CONNECT-UDP requests. - // Note that this will not match other Extended CONNECT requests (WebSocket and the like) as - // they are normalized in Envoy as HTTP/1.1 style upgrades. - // This is the only way to match CONNECT requests for HTTP/1.1. For HTTP/2 and HTTP/3, - // where Extended CONNECT requests may have a path, the path matchers will work if - // there is a path present. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] - ConnectMatcher connect_matcher = 12; - - // If specified, the route is a path-separated prefix rule meaning that the - // ``:path`` header (without the query string) must either exactly match the - // ``path_separated_prefix`` or have it as a prefix, followed by ``/`` - // - // For example, ``/api/dev`` would match - // ``/api/dev``, ``/api/dev/``, ``/api/dev/v1``, and ``/api/dev?param=true`` - // but would not match ``/api/developer`` - // - // Expect the value to not contain ``?`` or ``#`` and not to end in ``/`` - string path_separated_prefix = 14 [(validate.rules).string = {pattern: "^[^?#]+[^?#/]$"}]; - - // [#extension-category: envoy.path.match] - core.v3.TypedExtensionConfig path_match_policy = 15; - } - - // Indicates that prefix/path matching should be case-sensitive. The default - // is true. Ignored for safe_regex matching. - google.protobuf.BoolValue case_sensitive = 4; - - // Indicates that the route should additionally match on a runtime key. Every time the route - // is considered for a match, it must also fall under the percentage of matches indicated by - // this field. For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the router continues to evaluate the remaining match criteria. A runtime_fraction - // route configuration can be used to roll out route changes in a gradual manner without full - // code/config deploys. Refer to the :ref:`traffic shifting - // ` docs for additional documentation. - // - // .. note:: - // - // Parsing this field is implemented such that the runtime key's data may be represented - // as a FractionalPercent proto represented as JSON/YAML and may also be represented as an - // integer with the assumption that the value is an integral percentage out of 100. For - // instance, a runtime key lookup returning the value "42" would parse as a FractionalPercent - // whose numerator is 42 and denominator is HUNDRED. This preserves legacy semantics. - core.v3.RuntimeFractionalPercent runtime_fraction = 9; - - // Specifies a set of headers that the route should match on. The router will - // check the request’s headers against all the specified headers in the route - // config. A match will happen if all the headers in the route are present in - // the request with the same values (or based on presence if the value field - // is not in the config). - repeated HeaderMatcher headers = 6; - - // Specifies a set of URL query parameters on which the route should - // match. The router will check the query string from the ``path`` header - // against all the specified query parameters. If the number of specified - // query parameters is nonzero, they all must match the ``path`` header's - // query string for a match to occur. In the event query parameters are - // repeated, only the first value for each key will be considered. - // - // .. note:: - // - // If query parameters are used to pass request message fields when - // `grpc_json_transcoder `_ - // is used, the transcoded message fields may be different. The query parameters are - // URL-encoded, but the message fields are not. For example, if a query - // parameter is "foo%20bar", the message field will be "foo bar". - repeated QueryParameterMatcher query_parameters = 7; - - // Specifies a set of cookies on which the route should match. The router parses the ``Cookie`` - // header and evaluates the named cookie against each matcher. If the number of specified cookie - // matchers is nonzero, they all must match for the route to be selected. - repeated CookieMatcher cookies = 17; - - // If specified, only gRPC requests will be matched. The router will check - // that the ``Content-Type`` header has ``application/grpc`` or one of the various - // ``application/grpc+`` values. - GrpcRouteMatchOptions grpc = 8; - - // If specified, the client tls context will be matched against the defined - // match options. - // - // [#next-major-version: unify with RBAC] - TlsContextMatchOptions tls_context = 11; - - // Specifies a set of dynamic metadata matchers on which the route should match. - // The router will check the dynamic metadata against all the specified dynamic metadata matchers. - // If the number of specified dynamic metadata matchers is nonzero, they all must match the - // dynamic metadata for a match to occur. - repeated type.matcher.v3.MetadataMatcher dynamic_metadata = 13; - - // Specifies a set of filter state matchers on which the route should match. - // The router will check the filter state against all the specified filter state matchers. - // If the number of specified filter state matchers is nonzero, they all must match the - // filter state for a match to occur. - repeated type.matcher.v3.FilterStateMatcher filter_state = 16; -} - -// Cors policy configuration. -// -// .. attention:: -// -// This message has been deprecated. Please use -// :ref:`CorsPolicy in filter extension ` -// as as alternative. -// -// [#next-free-field: 14] -message CorsPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.CorsPolicy"; - - reserved 1, 8, 7; - - reserved "allow_origin", "allow_origin_regex", "enabled"; - - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - repeated type.matcher.v3.StringMatcher allow_origin_string_match = 11; - - // Specifies the content for the ``access-control-allow-methods`` header. - string allow_methods = 2; - - // Specifies the content for the ``access-control-allow-headers`` header. - string allow_headers = 3; - - // Specifies the content for the ``access-control-expose-headers`` header. - string expose_headers = 4; - - // Specifies the content for the ``access-control-max-age`` header. - string max_age = 5; - - // Specifies whether the resource allows credentials. - google.protobuf.BoolValue allow_credentials = 6; - - oneof enabled_specifier { - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither ``enabled``, ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - core.v3.RuntimeFractionalPercent filter_enabled = 9; - } - - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when ``filter_enabled`` and ``enabled`` are off. One of those - // fields have to explicitly disable the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's ``Origin`` to determine if it's valid but will not enforce any policies. - core.v3.RuntimeFractionalPercent shadow_enabled = 10; - - // Specify whether allow requests whose target server's IP address is more private than that from - // which the request initiator was fetched. - // - // More details refer to https://developer.chrome.com/blog/private-network-access-preflight. - google.protobuf.BoolValue allow_private_network_access = 12; - - // Specifies if preflight requests not matching the configured allowed origin should be forwarded - // to the upstream. Default is ``true``. - google.protobuf.BoolValue forward_not_matching_preflights = 13; -} - -// [#next-free-field: 46] -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteAction"; - - enum ClusterNotFoundResponseCode { - // HTTP status code - 503 Service Unavailable. - SERVICE_UNAVAILABLE = 0; - - // HTTP status code - 404 Not Found. - NOT_FOUND = 1; - - // HTTP status code - 500 Internal Server Error. - INTERNAL_SERVER_ERROR = 2; - } - - // Configures :ref:`internal redirect ` behavior. - // [#next-major-version: remove this definition - it's defined in the InternalRedirectPolicy message.] - enum InternalRedirectAction { - option deprecated = true; - - PASS_THROUGH_INTERNAL_REDIRECT = 0; - HANDLE_INTERNAL_REDIRECT = 1; - } - - // The router is capable of shadowing traffic from one cluster to another. The current - // implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to - // respond before returning the response from the primary cluster. All normal statistics are - // collected for the shadow cluster making this feature useful for testing. - // - // During shadowing, the host/authority header is altered such that ``-shadow`` is appended. This is - // useful for logging. For example, ``cluster1`` becomes ``cluster1-shadow``. This behavior can be - // disabled by setting ``disable_shadow_host_suffix_append`` to ``true``. - // - // .. note:: - // - // Shadowing will not be triggered if the primary cluster does not exist. - // - // .. note:: - // - // Shadowing doesn't support HTTP CONNECT and upgrades. - // [#next-free-field: 9] - message RequestMirrorPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.RequestMirrorPolicy"; - - reserved 2; - - reserved "runtime_key"; - - // Only one of ``cluster`` and ``cluster_header`` can be specified. - // [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - string cluster = 1 [(udpa.annotations.field_migrate).oneof_promotion = "cluster_specifier"]; - - // Only one of ``cluster`` and ``cluster_header`` can be specified. - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. Only the first value in header is used, - // and no shadow request will happen if the value is not found in headers. Envoy will not wait for - // the shadow cluster to respond before returning the response from the primary cluster. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 - // ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string cluster_header = 5 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}, - (udpa.annotations.field_migrate).oneof_promotion = "cluster_specifier" - ]; - - // If not specified, all requests to the target cluster will be mirrored. - // - // If specified, this field takes precedence over the ``runtime_key`` field and requests must also - // fall under the percentage of matches indicated by this field. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - core.v3.RuntimeFractionalPercent runtime_fraction = 3; - - // Specifies whether the trace span for the shadow request should be sampled. If this field is not explicitly set, - // the shadow request will inherit the sampling decision of its parent span. This ensures consistency with the trace - // sampling policy of the original request and prevents oversampling, especially in scenarios where runtime sampling - // is disabled. - google.protobuf.BoolValue trace_sampled = 4; - - // Disables appending the ``-shadow`` suffix to the shadowed ``Host`` header. - // - // Defaults to ``false``. - bool disable_shadow_host_suffix_append = 6; - - // Specifies a list of header mutations that should be applied to each mirrored request. - // Header mutations are applied in the order they are specified. For more information, including - // details on header value syntax, see the documentation on :ref:`custom request headers - // `. - repeated common.mutation_rules.v3.HeaderMutation request_headers_mutations = 7 - [(validate.rules).repeated = {max_items: 1000}]; - - // Indicates that during mirroring, the host header will be swapped with this value. - // :ref:`disable_shadow_host_suffix_append - // ` - // is implicitly enabled if this field is set. - string host_rewrite_literal = 8 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // Specifies the route's hashing policy if the upstream cluster uses a hashing :ref:`load balancer - // `. - // [#next-free-field: 7] - message HashPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.HashPolicy"; - - message Header { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.HashPolicy.Header"; - - // The name of the request header that will be used to obtain the hash - // key. If the request header is not present, no hash will be produced. - string header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // If specified, the request header value will be rewritten and used - // to produce the hash key. - type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 2; - } - - // CookieAttribute defines an API for adding additional attributes for a HTTP cookie. - message CookieAttribute { - // The name of the cookie attribute. - string name = 1 - [(validate.rules).string = - {min_len: 1 max_bytes: 16384 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The optional value of the cookie attribute. - string value = 2 [(validate.rules).string = - {max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // Envoy supports two types of cookie affinity: - // - // 1. Passive. Envoy takes a cookie that's present in the cookies header and - // hashes on its value. - // - // 2. Generated. Envoy generates and sets a cookie with an expiration (TTL) - // on the first request from the client in its response to the client, - // based on the endpoint the request gets sent to. The client then - // presents this on the next and all subsequent requests. The hash of - // this is sufficient to ensure these requests get sent to the same - // endpoint. The cookie is generated by hashing the source and - // destination ports and addresses so that multiple independent HTTP2 - // streams on the same connection will independently receive the same - // cookie, even if they arrive at the Envoy simultaneously. - message Cookie { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.HashPolicy.Cookie"; - - // The name of the cookie that will be used to obtain the hash key. If the - // cookie is not present and ttl below is not set, no hash will be - // produced. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // If specified, a cookie with the TTL will be generated if the cookie is - // not present. If the TTL is present and zero, the generated cookie will - // be a session cookie. - google.protobuf.Duration ttl = 2; - - // The name of the path for the cookie. If no path is specified here, no path - // will be set for the cookie. - string path = 3; - - // Additional attributes for the cookie. They will be used when generating a new cookie. - repeated CookieAttribute attributes = 4; - } - - message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties"; - - // Hash on source IP address. - bool source_ip = 1; - } - - message QueryParameter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter"; - - // The name of the URL query parameter that will be used to obtain the hash - // key. If the parameter is not present, no hash will be produced. Query - // parameter names are case-sensitive. If query parameters are repeated, only - // the first value will be considered. - string name = 1 [(validate.rules).string = {min_len: 1}]; - } - - message FilterState { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.HashPolicy.FilterState"; - - // The name of the Object in the per-request filterState, which is an - // Envoy::Hashable object. If there is no data associated with the key, - // or the stored object is not Envoy::Hashable, no hash will be produced. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - - oneof policy_specifier { - option (validate.required) = true; - - // Header hash policy. - Header header = 1; - - // Cookie hash policy. - Cookie cookie = 2; - - // Connection properties hash policy. - ConnectionProperties connection_properties = 3; - - // Query parameter hash policy. - QueryParameter query_parameter = 5; - - // Filter state hash policy. - FilterState filter_state = 6; - } - - // The flag that short-circuits the hash computing. This field provides a - // 'fallback' style of configuration: "if a terminal policy doesn't work, - // fallback to rest of the policy list", it saves time when the terminal - // policy works. - // - // If true, and there is already a hash computed, ignore rest of the - // list of hash polices. - // For example, if the following hash methods are configured: - // - // ========= ======== - // specifier terminal - // ========= ======== - // Header A true - // Header B false - // Header C false - // ========= ======== - // - // The generateHash process ends if policy "header A" generates a hash, as - // it's a terminal policy. - bool terminal = 4; - } - - // Allows enabling and disabling upgrades on a per-route basis. - // This overrides any enabled/disabled upgrade filter chain specified in the - // HttpConnectionManager - // :ref:`upgrade_configs - // ` - // but does not affect any custom filter chain specified there. - message UpgradeConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RouteAction.UpgradeConfig"; - - // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT or POST requests, when forwarding request payload as raw TCP. - message ConnectConfig { - // If present, the proxy protocol header will be prepended to the CONNECT payload sent upstream. - core.v3.ProxyProtocolConfig proxy_protocol_config = 1; - - // If set, the route will also allow forwarding POST payload as raw TCP. - bool allow_post = 2; - } - - // The case-insensitive name of this upgrade, for example, "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] will be proxied upstream. - string upgrade_type = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Determines if upgrades are available on this route. - // - // Defaults to ``true``. - google.protobuf.BoolValue enabled = 2; - - // Configuration for sending data upstream as a raw data payload. This is used for - // CONNECT requests, when forwarding CONNECT payload as raw TCP. - // Note that CONNECT support is currently considered alpha in Envoy. - // [#comment: TODO(htuch): Replace the above comment with an alpha tag.] - ConnectConfig connect_config = 3; - } - - message MaxStreamDuration { - // Specifies the maximum duration allowed for streams on the route. If not specified, the value - // from the :ref:`max_stream_duration - // ` field in - // :ref:`HttpConnectionManager.common_http_protocol_options - // ` - // is used. If this field is set explicitly to zero, any - // HttpConnectionManager max_stream_duration timeout will be disabled for - // this route. - google.protobuf.Duration max_stream_duration = 1; - - // If present, and the request contains a `grpc-timeout header - // `_, use that value as the - // ``max_stream_duration``, but limit the applied timeout to the maximum value specified here. - // If set to 0, the ``grpc-timeout`` header is used without modification. - google.protobuf.Duration grpc_timeout_header_max = 2; - - // If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by - // subtracting the provided duration from the header. This is useful for allowing Envoy to set - // its global timeout to be less than that of the deadline imposed by the calling client, which - // makes it more likely that Envoy will handle the timeout instead of having the call canceled - // by the client. If, after applying the offset, the resulting timeout is zero or negative, - // the stream will timeout immediately. - google.protobuf.Duration grpc_timeout_header_offset = 3; - } - - reserved 12, 18, 19, 16, 22, 21, 10; - - reserved "request_mirror_policy"; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Envoy will determine the cluster to route to by reading the value of the - // HTTP header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist, Envoy will - // return a 404 response. - // - // .. attention:: - // - // Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 - // ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string cluster_header = 2 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. See - // :ref:`traffic splitting ` - // for additional documentation. - WeightedCluster weighted_clusters = 3; - - // Name of the cluster specifier plugin to use to determine the cluster for requests on this route. - // The cluster specifier plugin name must be defined in the associated - // :ref:`cluster specifier plugins ` - // in the :ref:`name ` field. - string cluster_specifier_plugin = 37; - - // Custom cluster specifier plugin configuration to use to determine the cluster for requests - // on this route. - ClusterSpecifierPlugin inline_cluster_specifier_plugin = 39; - } - - // The HTTP status code to use when configured cluster is not found. - // The default response code is 503 Service Unavailable. - ClusterNotFoundResponseCode cluster_not_found_response_code = 20 - [(validate.rules).enum = {defined_only: true}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what's set in this field will be considered - // for load balancing. If using :ref:`weighted_clusters - // `, metadata will be merged, with values - // provided there taking precedence. The filter name should be specified as ``envoy.lb``. - core.v3.Metadata metadata_match = 4; - - // Indicates that during forwarding, the matched prefix (or path) should be - // swapped with this value. This option allows application URLs to be rooted - // at a different path from those exposed at the reverse proxy layer. The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`regex_rewrite `, - // :ref:`path_rewrite_policy `, - // :ref:`path_rewrite `, - // or :ref:`prefix_rewrite ` - // may be specified. - // - // .. attention:: - // - // Pay careful attention to the use of trailing slashes in the - // :ref:`route's match ` prefix value. - // Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - // rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single - // :ref:`Route `, as shown by the below config entries: - // - // .. code-block:: yaml - // - // - match: - // prefix: "/prefix/" - // route: - // prefix_rewrite: "/" - // - match: - // prefix: "/prefix" - // route: - // prefix_rewrite: "/" - // - // Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while - // requests to ``/prefix/etc`` will be stripped to ``/etc``. - string prefix_rewrite = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during forwarding, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. The router filter will place the original path as it was - // before the rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`regex_rewrite `, - // :ref:`path_rewrite_policy `, - // :ref:`path_rewrite `, - // or :ref:`prefix_rewrite ` - // may be specified. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 32; - - // [#extension-category: envoy.path.rewrite] - core.v3.TypedExtensionConfig path_rewrite_policy = 41; - - // Rewrites the whole path (without query parameters) with the given path value. - // The router filter will - // place the original path before rewrite into the :ref:`x-envoy-original-path - // ` header. - // - // Only one of :ref:`regex_rewrite `, - // :ref:`path_rewrite_policy `, - // :ref:`path_rewrite `, - // or :ref:`prefix_rewrite ` - // may be specified. - // - // The :ref:`substitution format specifier ` could be applied here. - // For example, with the following config: - // - // .. code-block:: yaml - // - // path_rewrite: "/new_path_prefix%REQ(custom-path-header-name)%" - // - // Would rewrite the path to ``/new_path_prefix/some_value`` given the header - // ``custom-path-header-name: some_value``. If the header is not present, the path will be - // rewritten to ``/new_path_prefix``. - // - // - // If the final output of the path rewrite is empty, then the update will be ignored and the - // original path will be preserved. - string path_rewrite = 45; - - // If one of the host rewrite specifiers is set and the - // :ref:`suppress_envoy_headers - // ` flag is not - // set to true, the router filter will place the original host header value before - // rewriting into the :ref:`x-envoy-original-host - // ` header. - // - // And if the - // :ref:`append_x_forwarded_host ` - // is set to true, the original host value will also be appended to the - // :ref:`config_http_conn_man_headers_x-forwarded-host` header. - // - oneof host_rewrite_specifier { - // Indicates that during forwarding, the host header will be swapped with - // this value. - string host_rewrite_literal = 6 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during forwarding, the host header will be swapped with - // the hostname of the upstream host chosen by the cluster manager. This - // option is applicable only when the destination cluster for a route is of - // type ``strict_dns`` or ``logical_dns``, - // or when :ref:`hostname ` - // field is not empty. Setting this to true with other cluster types - // has no effect. - google.protobuf.BoolValue auto_host_rewrite = 7; - - // Indicates that during forwarding, the host header will be swapped with the content of given - // downstream or :ref:`custom ` header. - // If header value is empty, host header is left intact. - // - // .. attention:: - // - // Pay attention to the potential security implications of using this option. Provided header - // must come from trusted source. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string host_rewrite_header = 29 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Indicates that during forwarding, the host header will be swapped with - // the result of the regex substitution executed on path value with query and fragment removed. - // This is useful for transitioning variable content between path segment and subdomain. - // - // For example with the following config: - // - // .. code-block:: yaml - // - // host_rewrite_path_regex: - // pattern: - // google_re2: {} - // regex: "^/(.+)/.+$" - // substitution: \1 - // - // Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``. - type.matcher.v3.RegexMatchAndSubstitute host_rewrite_path_regex = 35; - - // Rewrites the host header with the value of this field. The router filter will - // place the original host header value before rewriting into the :ref:`x-envoy-original-host - // ` header. - // - // The :ref:`substitution format specifier ` could be applied here. - // For example, with the following config: - // - // .. code-block:: yaml - // - // host_rewrite: "prefix-%REQ(custom-host-header-name)%" - // - // Would rewrite the host header to ``prefix-some_value`` given the header - // ``custom-host-header-name: some_value``. If the header is not present, the host header will - // be rewritten to an value of ``prefix-``. - // - // If the final output of the host rewrite is empty, then the update will be ignored and the - // original host header will be preserved. - string host_rewrite = 44; - } - - // If set, then a host rewrite action (one of - // :ref:`host_rewrite_literal `, - // :ref:`auto_host_rewrite `, - // :ref:`host_rewrite_header `, or - // :ref:`host_rewrite_path_regex `) - // causes the original value of the host header, if any, to be appended to the - // :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended. - bool append_x_forwarded_host = 38; - - // Specifies the upstream timeout for the route. If not specified, the default is 15s. This - // spans between the point at which the entire downstream request (i.e. end-of-stream) has been - // processed and when the upstream response has been completely processed. A value of 0 will - // disable the route's timeout. - // - // .. note:: - // - // This timeout includes all retries. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - google.protobuf.Duration timeout = 8; - - // Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, - // although the connection manager wide :ref:`stream_idle_timeout - // ` - // will still apply. A value of 0 will completely disable the route's idle timeout, even if a - // connection manager stream idle timeout is configured. - // - // The idle timeout is distinct to :ref:`timeout - // `, which provides an upper bound - // on the upstream response time; :ref:`idle_timeout - // ` instead bounds the amount - // of time the request's stream may be idle. - // - // After header decoding, the idle timeout will apply on downstream and - // upstream request events. Each time an encode/decode event for headers or - // data is processed for the stream, the timer will be reset. If the timeout - // fires, the stream is terminated with a 408 Request Timeout error code if no - // upstream response header has been received, otherwise a stream reset - // occurs. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - // - // This timeout may also be used in place of ``flush_timeout`` in very specific cases. See the - // documentation for ``flush_timeout`` for more details. - google.protobuf.Duration idle_timeout = 24; - - // Specifies the codec stream flush timeout for the route. - // - // If not specified, the first preference is the global :ref:`stream_flush_timeout - // `, - // but only if explicitly configured. - // - // If neither the explicit HCM-wide flush timeout nor this route-specific flush timeout is configured, - // the route's stream idle timeout is reused for this timeout. This is for - // backwards compatibility since both behaviors were historically controlled by the one timeout. - // - // If the route also does not have an idle timeout configured, the global :ref:`stream_idle_timeout - // `. used, again - // for backwards compatibility. That timeout defaults to 5 minutes. - // - // A value of 0 via any of the above paths will completely disable the timeout for a given route. - google.protobuf.Duration flush_timeout = 42; - - // Specifies how to send request over TLS early data. - // If absent, allows `safe HTTP requests `_ to be sent on early data. - // [#extension-category: envoy.route.early_data_policy] - core.v3.TypedExtensionConfig early_data_policy = 40; - - // Indicates that the route has a retry policy. Note that if this is set, - // it'll take precedence over the virtual host level retry policy entirely - // (e.g., policies are not merged, the most internal one becomes the enforced policy). - RetryPolicy retry_policy = 9; - - // [#not-implemented-hide:] - // Specifies the configuration for retry policy extension. Note that if this is set, it'll take - // precedence over the virtual host level retry policy entirely (e.g., policies are not merged, - // the most internal one becomes the enforced policy). :ref:`Retry policy ` - // should not be set if this field is used. - google.protobuf.Any retry_policy_typed_config = 33; - - // Specify a set of route request mirroring policies. - // It takes precedence over the virtual host and route config mirror policy entirely. - // That is, policies are not merged, the most specific non-empty one becomes the mirror policies. - repeated RequestMirrorPolicy request_mirror_policies = 30; - - // Optionally specifies the :ref:`routing priority `. - core.v3.RoutingPriority priority = 11 [(validate.rules).enum = {defined_only: true}]; - - // Specifies a set of rate limit configurations that could be applied to the - // route. - repeated RateLimit rate_limits = 13; - - // Specifies if the rate limit filter should include the virtual host rate - // limits. By default, if the route configured rate limits, the virtual host - // :ref:`rate_limits ` are not applied to the - // request. - // - // .. attention:: - // - // This field is deprecated. Please use :ref:`vh_rate_limits ` - google.protobuf.BoolValue include_vh_rate_limits = 14 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Specifies a list of hash policies to use for ring hash load balancing. Each - // hash policy is evaluated individually and the combined result is used to - // route the request. The method of combination is deterministic such that - // identical lists of hash policies will produce the same hash. Since a hash - // policy examines specific parts of a request, it can fail to produce a hash - // (i.e. if the hashed header is not present). If (and only if) all configured - // hash policies fail to generate a hash, no hash will be produced for - // the route. In this case, the behavior is the same as if no hash policies - // were specified (i.e. the ring hash load balancer will choose a random - // backend). If a hash policy has the "terminal" attribute set to true, and - // there is already a hash generated, the hash is returned immediately, - // ignoring the rest of the hash policy list. - repeated HashPolicy hash_policy = 15; - - // Indicates that the route has a CORS policy. This field is ignored if related cors policy is - // found in the :ref:`Route.typed_per_filter_config` or - // :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config`. - // - // .. attention:: - // - // This option has been deprecated. Please use - // :ref:`Route.typed_per_filter_config` or - // :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` - // to configure the CORS HTTP filter. - CorsPolicy cors = 17 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Deprecated by :ref:`grpc_timeout_header_max ` - // If present, and the request is a gRPC request, use the - // `grpc-timeout header `_, - // or its default value (infinity) instead of - // :ref:`timeout `, but limit the applied timeout - // to the maximum value specified here. If configured as 0, the maximum allowed timeout for - // gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used - // and gRPC requests time out like any other requests using - // :ref:`timeout ` or its default. - // This can be used to prevent unexpected upstream request timeouts due to potentially long - // time gaps between gRPC request and response in gRPC streaming mode. - // - // .. note:: - // - // If a timeout is specified using :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, it takes - // precedence over `grpc-timeout header `_, when - // both are present. See also - // :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms`, - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms`, and the - // :ref:`retry overview `. - google.protobuf.Duration max_grpc_timeout = 23 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Deprecated by :ref:`grpc_timeout_header_offset `. - // If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting - // the provided duration from the header. This is useful in allowing Envoy to set its global - // timeout to be less than that of the deadline imposed by the calling client, which makes it more - // likely that Envoy will handle the timeout instead of having the call canceled by the client. - // The offset will only be applied if the provided grpc_timeout is greater than the offset. This - // ensures that the offset will only ever decrease the timeout and never set it to 0 (meaning - // infinity). - google.protobuf.Duration grpc_timeout_offset = 28 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - repeated UpgradeConfig upgrade_configs = 25; - - // If present, Envoy will try to follow an upstream redirect response instead of proxying the - // response back to the downstream. An upstream redirect response is defined - // by :ref:`redirect_response_codes - // `. - InternalRedirectPolicy internal_redirect_policy = 34; - - InternalRedirectAction internal_redirect_action = 26 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // An internal redirect is handled, iff the number of previous internal redirects that a - // downstream request has encountered is lower than this value, and - // :ref:`internal_redirect_action ` - // is set to :ref:`HANDLE_INTERNAL_REDIRECT - // ` - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or has - // :ref:`internal_redirect_action ` - // set to - // :ref:`PASS_THROUGH_INTERNAL_REDIRECT - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - google.protobuf.UInt32Value max_internal_redirects = 31 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Indicates that the route has a hedge policy. Note that if this is set, - // it'll take precedence over the virtual host level hedge policy entirely - // (e.g., policies are not merged, the most internal one becomes the enforced policy). - HedgePolicy hedge_policy = 27; - - // Specifies the maximum stream duration for this route. - MaxStreamDuration max_stream_duration = 36; -} - -// HTTP retry :ref:`architecture overview `. -// [#next-free-field: 14] -message RetryPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RetryPolicy"; - - enum ResetHeaderFormat { - SECONDS = 0; - UNIX_TIMESTAMP = 1; - } - - message RetryPriority { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RetryPolicy.RetryPriority"; - - reserved 2; - - reserved "config"; - - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // [#extension-category: envoy.retry_priorities] - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - message RetryHostPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RetryPolicy.RetryHostPredicate"; - - reserved 2; - - reserved "config"; - - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // [#extension-category: envoy.retry_host_predicates] - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - message RetryBackOff { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RetryPolicy.RetryBackOff"; - - // Specifies the base interval between retries. This parameter is required and must be greater - // than zero. Values less than 1 ms are rounded up to 1 ms. - // See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion of Envoy's - // back-off algorithm. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {} - }]; - - // Specifies the maximum interval between retries. This parameter is optional, but must be - // greater than or equal to the ``base_interval`` if set. The default is 10 times the - // ``base_interval``. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion - // of Envoy's back-off algorithm. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; - } - - message ResetHeader { - // The name of the reset header. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The format of the reset header. - ResetHeaderFormat format = 2 [(validate.rules).enum = {defined_only: true}]; - } - - // A retry back-off strategy that applies when the upstream server rate limits - // the request. - // - // Given this configuration: - // - // .. code-block:: yaml - // - // rate_limited_retry_back_off: - // reset_headers: - // - name: Retry-After - // format: SECONDS - // - name: X-RateLimit-Reset - // format: UNIX_TIMESTAMP - // max_interval: "300s" - // - // The following algorithm will apply: - // - // 1. If the response contains the header ``Retry-After`` its value must be on - // the form ``120`` (an integer that represents the number of seconds to - // wait before retrying). If so, this value is used as the back-off interval. - // 2. Otherwise, if the response contains the header ``X-RateLimit-Reset`` its - // value must be on the form ``1595320702`` (an integer that represents the - // point in time at which to retry, as a Unix timestamp in seconds). If so, - // the current time is subtracted from this value and the result is used as - // the back-off interval. - // 3. Otherwise, Envoy will use the default - // :ref:`exponential back-off ` - // strategy. - // - // No matter which format is used, if the resulting back-off interval exceeds - // ``max_interval`` it is discarded and the next header in ``reset_headers`` - // is tried. If a request timeout is configured for the route it will further - // limit how long the request will be allowed to run. - // - // To prevent many clients retrying at the same point in time jitter is added - // to the back-off interval, so the resulting interval is decided by taking: - // ``random(interval, interval * 1.5)``. - // - // .. attention:: - // - // Configuring ``rate_limited_retry_back_off`` will not by itself cause a request - // to be retried. You will still need to configure the right retry policy to match - // the responses from the upstream server. - message RateLimitedRetryBackOff { - // Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) - // to match against the response. Headers are tried in order, and matched case - // insensitive. The first header to be parsed successfully is used. If no headers - // match the default exponential back-off is used instead. - repeated ResetHeader reset_headers = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Specifies the maximum back off interval that Envoy will allow. If a reset - // header contains an interval longer than this then it will be discarded and - // the next header will be tried. - // - // Defaults to 300 seconds. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {}}]; - } - - // Specifies the conditions under which retry takes place. These are the same - // conditions documented for :ref:`config_http_filters_router_x-envoy-retry-on` and - // :ref:`config_http_filters_router_x-envoy-retry-grpc-on`. - string retry_on = 1; - - // Specifies the allowed number of retries. This parameter is optional and - // defaults to 1. These are the same conditions documented for - // :ref:`config_http_filters_router_x-envoy-max-retries`. - google.protobuf.UInt32Value num_retries = 2 - [(udpa.annotations.field_migrate).rename = "max_retries"]; - - // Specifies a non-zero upstream timeout per retry attempt (including the initial attempt). This - // parameter is optional. The same conditions documented for - // :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` apply. - // - // .. note:: - // - // If left unspecified, Envoy will use the global - // :ref:`route timeout ` for the request. - // Consequently, when using a :ref:`5xx ` based - // retry policy, a request that times out will not be retried as the total timeout budget - // would have been exhausted. - google.protobuf.Duration per_try_timeout = 3; - - // Specifies an upstream idle timeout per retry attempt (including the initial attempt). This - // parameter is optional and if absent there is no per-try idle timeout. The semantics of the per- - // try idle timeout are similar to the - // :ref:`route idle timeout ` and - // :ref:`stream idle timeout - // ` - // both enforced by the HTTP connection manager. The difference is that this idle timeout - // is enforced by the router for each individual attempt and thus after all previous filters have - // run, as opposed to *before* all previous filters run for the other idle timeouts. This timeout - // is useful in cases in which total request timeout is bounded by a number of retries and a - // :ref:`per_try_timeout `, but - // there is a desire to ensure each try is making incremental progress. Note also that similar - // to :ref:`per_try_timeout `, - // this idle timeout does not start until after both the entire request has been received by the - // router *and* a connection pool connection has been obtained. Unlike - // :ref:`per_try_timeout `, - // the idle timer continues once the response starts streaming back to the downstream client. - // This ensures that response data continues to make progress without using one of the HTTP - // connection manager idle timeouts. - google.protobuf.Duration per_try_idle_timeout = 13; - - // Specifies an implementation of a RetryPriority which is used to determine the - // distribution of load across priorities used for retries. Refer to - // :ref:`retry plugin configuration ` for more details. - RetryPriority retry_priority = 4; - - // Specifies a collection of RetryHostPredicates that will be consulted when selecting a host - // for retries. If any of the predicates reject the host, host selection will be reattempted. - // Refer to :ref:`retry plugin configuration ` for more - // details. - repeated RetryHostPredicate retry_host_predicate = 5; - - // Retry options predicates that will be applied prior to retrying a request. These predicates - // allow customizing request behavior between retries. - // [#comment: add [#extension-category: envoy.retry_options_predicates] when there are built-in extensions] - repeated core.v3.TypedExtensionConfig retry_options_predicates = 12; - - // The maximum number of times host selection will be reattempted before giving up, at which - // point the host that was last selected will be routed to. If unspecified, this will default to - // retrying once. - int64 host_selection_retry_max_attempts = 6; - - // HTTP status codes that should trigger a retry in addition to those specified by retry_on. - repeated uint32 retriable_status_codes = 7; - - // Specifies parameters that control exponential retry back off. This parameter is optional, in which case the - // default base interval is 25 milliseconds or, if set, the current value of the - // ``upstream.base_retry_backoff_ms`` runtime parameter. The default maximum interval is 10 times - // the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` - // describes Envoy's back-off algorithm. - RetryBackOff retry_back_off = 8; - - // Specifies parameters that control a retry back-off strategy that is used - // when the request is rate limited by the upstream server. The server may - // return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to - // provide feedback to the client on how long to wait before retrying. If - // configured, this back-off strategy will be used instead of the - // default exponential back off strategy (configured using ``retry_back_off``) - // whenever a response includes the matching headers. - RateLimitedRetryBackOff rate_limited_retry_back_off = 11; - - // HTTP response headers that trigger a retry if present in the response. A retry will be - // triggered if any of the header matches match the upstream response headers. - // The field is only consulted if 'retriable-headers' retry policy is active. - repeated HeaderMatcher retriable_headers = 9; - - // HTTP headers which must be present in the request for retries to be attempted. - repeated HeaderMatcher retriable_request_headers = 10; -} - -// HTTP request hedging :ref:`architecture overview `. -message HedgePolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.HedgePolicy"; - - // Specifies the number of initial requests that should be sent upstream. - // Must be at least 1. - // - // Defaults to 1. - // [#not-implemented-hide:] - google.protobuf.UInt32Value initial_requests = 1 [(validate.rules).uint32 = {gte: 1}]; - - // Specifies a probability that an additional upstream request should be sent - // on top of what is specified by initial_requests. - // - // Defaults to 0. - // [#not-implemented-hide:] - type.v3.FractionalPercent additional_request_chance = 2; - - // Indicates that a hedged request should be sent when the per-try timeout is hit. - // This means that a retry will be issued without resetting the original request, leaving multiple upstream requests in flight. - // The first request to complete successfully will be the one returned to the caller. - // - // * At any time, a successful response (i.e. not triggering any of the retry-on conditions) would be returned to the client. - // * Before per-try timeout, an error response (per retry-on conditions) would be retried immediately or returned to the client - // if there are no more retries left. - // * After per-try timeout, an error response would be discarded, as a retry in the form of a hedged request is already in progress. - // - // .. note:: - // - // For this to have effect, you must have a :ref:`RetryPolicy ` that retries at least - // one error code and specifies a maximum number of retries. - // - // Defaults to ``false``. - bool hedge_on_per_try_timeout = 3; -} - -// [#next-free-field: 10] -message RedirectAction { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RedirectAction"; - - enum RedirectResponseCode { - // Moved Permanently HTTP Status Code - 301. - MOVED_PERMANENTLY = 0; - - // Found HTTP Status Code - 302. - FOUND = 1; - - // See Other HTTP Status Code - 303. - SEE_OTHER = 2; - - // Temporary Redirect HTTP Status Code - 307. - TEMPORARY_REDIRECT = 3; - - // Permanent Redirect HTTP Status Code - 308. - PERMANENT_REDIRECT = 4; - } - - // When the scheme redirection take place, the following rules apply: - // 1. If the source URI scheme is ``http`` and the port is explicitly - // set to ``:80``, the port will be removed after the redirection - // 2. If the source URI scheme is ``https`` and the port is explicitly - // set to ``:443``, the port will be removed after the redirection - oneof scheme_rewrite_specifier { - // The scheme portion of the URL will be swapped with "https". - bool https_redirect = 4; - - // The scheme portion of the URL will be swapped with this value. - string scheme_redirect = 7; - } - - // The host portion of the URL will be swapped with this value. - string host_redirect = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // The port value of the URL will be swapped with this value. - uint32 port_redirect = 8; - - oneof path_rewrite_specifier { - // The path portion of the URL will be swapped with this value. - // Please note that query string in path_redirect will override the - // request's query string and will not be stripped. - // - // For example, let's say we have the following routes: - // - // - match: { path: "/old-path-1" } - // redirect: { path_redirect: "/new-path-1" } - // - match: { path: "/old-path-2" } - // redirect: { path_redirect: "/new-path-2", strip-query: "true" } - // - match: { path: "/old-path-3" } - // redirect: { path_redirect: "/new-path-3?foo=1", strip_query: "true" } - // - // 1. if request uri is "/old-path-1?bar=1", users will be redirected to "/new-path-1?bar=1" - // 2. if request uri is "/old-path-2?bar=1", users will be redirected to "/new-path-2" - // 3. if request uri is "/old-path-3?bar=1", users will be redirected to "/new-path-3?foo=1" - string path_redirect = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during redirection, the matched prefix (or path) - // should be swapped with this value. This option allows redirect URLs be dynamically created - // based on the request. - // - // .. attention:: - // - // Pay attention to the use of trailing slashes as mentioned in - // :ref:`RouteAction's prefix_rewrite `. - string prefix_rewrite = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Indicates that during redirect, portions of the path that match the - // pattern should be rewritten, even allowing the substitution of capture - // groups from the pattern into the new path as specified by the rewrite - // substitution string. This is useful to allow application paths to be - // rewritten in a way that is aware of segments with variable content like - // identifiers. - // - // Examples using Google's `RE2 `_ engine: - // - // * The path pattern ``^/service/([^/]+)(/.*)$`` paired with a substitution - // string of ``\2/instance/\1`` would transform ``/service/foo/v1/api`` - // into ``/v1/api/instance/foo``. - // - // * The pattern ``one`` paired with a substitution string of ``two`` would - // transform ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/two/zzz``. - // - // * The pattern ``^(.*?)one(.*)$`` paired with a substitution string of - // ``\1two\2`` would replace only the first occurrence of ``one``, - // transforming path ``/xxx/one/yyy/one/zzz`` into ``/xxx/two/yyy/one/zzz``. - // - // * The pattern ``(?i)/xxx/`` paired with a substitution string of ``/yyy/`` - // would do a case-insensitive match and transform path ``/aaa/XxX/bbb`` to - // ``/aaa/yyy/bbb``. - type.matcher.v3.RegexMatchAndSubstitute regex_rewrite = 9; - } - - // The HTTP status code to use in the redirect response. The default response - // code is MOVED_PERMANENTLY (301). - RedirectResponseCode response_code = 3 [(validate.rules).enum = {defined_only: true}]; - - // Indicates that during redirection, the query portion of the URL will - // be removed. Default value is false. - bool strip_query = 6; -} - -message DirectResponseAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.DirectResponseAction"; - - // Specifies the HTTP response status to be returned. - uint32 status = 1 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // Specifies the content of the response body. If this setting is omitted, - // no body is included in the generated response. - // - // .. note:: - // - // Headers can be specified using ``response_headers_to_add`` in the enclosing - // :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or - // :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`. - core.v3.DataSource body = 2; - - // Specifies a format string for the response body. If present, the contents of - // ``body_format`` will be formatted and used as the response body, where the - // contents of ``body`` (may be empty) will be passed as the variable ``%LOCAL_REPLY_BODY%``. - // If neither are provided, no body is included in the generated response. - core.v3.SubstitutionFormatString body_format = 3; -} - -// [#not-implemented-hide:] -message NonForwardingAction { -} - -message Decorator { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.Decorator"; - - // The operation name associated with the request matched to this route. If tracing is - // enabled, this information will be used as the span name reported for this request. - // - // .. note:: - // - // For ingress (inbound) requests, or egress (outbound) responses, this value may be overridden - // by the :ref:`x-envoy-decorator-operation - // ` header. - string operation = 1 [(validate.rules).string = {min_len: 1}]; - - // Whether the decorated details should be propagated to the other party. The default is ``true``. - google.protobuf.BoolValue propagate = 2; -} - -// [#next-free-field: 7] -message Tracing { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.Tracing"; - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_enabled' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - type.v3.FractionalPercent client_sampling = 1; - - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.v3.FractionalPercent random_sampling = 2; - - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.v3.FractionalPercent overall_sampling = 3; - - // A list of custom tags with unique tag name to create tags for the active span. - // It will take effect after merging with the :ref:`corresponding configuration - // ` - // configured in the HTTP connection manager. If two tags with the same name are configured - // each in the HTTP connection manager and the route level, the one configured here takes - // priority. - repeated type.tracing.v3.CustomTag custom_tags = 4; - - // The operation name of the span which will be used for tracing. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - // - // This field will take precedence over and make following settings ineffective: - // - // * :ref:`route decorator `. - // * :ref:`x-envoy-decorator-operation `. - // * :ref:`HCM tracing operation - // `. - string operation = 5; - - // The operation name of the upstream span which will be used for tracing. - // This only takes effect when ``spawn_upstream_span`` is set to true and the upstream - // span is created. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - // - // This field will take precedence over and make following settings ineffective: - // - // * :ref:`HCM tracing upstream operation - // ` - string upstream_operation = 6; -} - -// A virtual cluster is a way of specifying a regex matching rule against -// certain important endpoints such that statistics are generated explicitly for -// the matched requests. The reason this is useful is that when doing -// prefix/path matching Envoy does not always know what the application -// considers to be an endpoint. Thus, it’s impossible for Envoy to generically -// emit per endpoint statistics. However, often systems have highly critical -// endpoints that they wish to get “perfect” statistics on. Virtual cluster -// statistics are perfect in the sense that they are emitted on the downstream -// side such that they include network level failures. -// -// Documentation for :ref:`virtual cluster statistics `. -// -// .. note:: -// -// Virtual clusters are a useful tool, but we do not recommend setting up a virtual cluster for -// every application endpoint. This is both not easily maintainable and as well the matching and -// statistics output are not free. -message VirtualCluster { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.VirtualCluster"; - - reserved 1, 3; - - reserved "pattern", "method"; - - // Specifies a list of header matchers to use for matching requests. Each specified header must - // match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and - // method, respectively. - repeated HeaderMatcher headers = 4; - - // Specifies the name of the virtual cluster. The virtual cluster name as well - // as the virtual host name are used when emitting statistics. The statistics are emitted by the - // router filter and are documented :ref:`here `. - string name = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Global rate limiting :ref:`architecture overview `. -// Also applies to Local rate limiting :ref:`using descriptors `. -// [#next-free-field: 7] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RateLimit"; - - // [#next-free-field: 13] - message Action { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action"; - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("source_cluster", "") - // - // is derived from the :option:`--service-cluster` option. - message SourceCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action.SourceCluster"; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("destination_cluster", "") - // - // Once a request matches against a route table rule, a routed cluster is determined by one of - // the following :ref:`route table configuration ` - // settings: - // - // * :ref:`cluster ` indicates the upstream cluster - // to route to. - // * :ref:`weighted_clusters ` - // chooses a cluster randomly from a set of clusters with attributed weight. - // * :ref:`cluster_header ` indicates which - // header in the request contains the target cluster. - message DestinationCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action.DestinationCluster"; - } - - // The following descriptor entry is appended when a header contains a key that matches the - // ``header_name``: - // - // .. code-block:: cpp - // - // ("", "") - message RequestHeaders { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action.RequestHeaders"; - - // The header name to be queried from the request headers. The header’s - // value is used to populate the value of the descriptor entry for the - // descriptor_key. - string header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The key to use in the descriptor entry. - string descriptor_key = 2 [(validate.rules).string = {min_len: 1}]; - - // Controls the behavior when the specified header is not present in the request. - // - // If set to ``false`` (default): - // - // * Envoy does **NOT** call the rate limiting service for this descriptor. - // * Useful if the header is optional and you prefer to skip rate limiting when it's absent. - // - // If set to ``true``: - // - // * Envoy calls the rate limiting service but omits this descriptor if the header is missing. - // * Useful if you want Envoy to enforce rate limiting even when the header is not present. - // - bool skip_if_absent = 3; - } - - // The following descriptor entry is appended when a query parameter contains a key that matches the - // ``query_parameter_name``: - // - // .. code-block:: cpp - // - // ("", "") - message QueryParameters { - // The name of the query parameter to use for rate limiting. Value of this query parameter is used to populate - // the value of the descriptor entry for the descriptor_key. - string query_parameter_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The key to use when creating the rate limit descriptor entry. This descriptor key will be used to identify the - // rate limit rule in the rate limiting service. - string descriptor_key = 2 [(validate.rules).string = {min_len: 1}]; - - // Controls the behavior when the specified query parameter is not present in the request. - // - // If set to ``false`` (default): - // - // * Envoy does **NOT** call the rate limiting service for this descriptor. - // * Useful if the query parameter is optional and you prefer to skip rate limiting when it's absent. - // - // If set to ``true``: - // - // * Envoy calls the rate limiting service but omits this descriptor if the query parameter is missing. - // * Useful if you want Envoy to enforce rate limiting even when the query parameter is not present. - // - bool skip_if_absent = 3; - } - - // The following descriptor entry is appended to the descriptor and is populated using the - // trusted address from :ref:`x-forwarded-for `: - // - // .. code-block:: cpp - // - // ("remote_address", "") - message RemoteAddress { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action.RemoteAddress"; - } - - // The following descriptor entry is appended to the descriptor and is populated using the - // masked address from :ref:`x-forwarded-for `: - // - // .. code-block:: cpp - // - // ("masked_remote_address", "") - message MaskedRemoteAddress { - // Length of prefix mask len for IPv4 (e.g. 0, 32). - // - // Defaults to 32 when unset. - // - // For example, trusted address from x-forwarded-for is ``192.168.1.1``, - // the descriptor entry is ("masked_remote_address", "192.168.1.1/32"); - // if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24"). - google.protobuf.UInt32Value v4_prefix_mask_len = 1 [(validate.rules).uint32 = {lte: 32}]; - - // Length of prefix mask len for IPv6 (e.g. 0, 128). - // - // Defaults to 128 when unset. - // - // For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``, - // the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128"); - // if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64"). - google.protobuf.UInt32Value v6_prefix_mask_len = 2 [(validate.rules).uint32 = {lte: 128}]; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("generic_key", "") - message GenericKey { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action.GenericKey"; - - // Descriptor value of entry. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - // - // .. note:: - // - // Formatter parsing is controlled by the runtime feature flag - // ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` - // (disabled by default). - // - // When enabled: The format string can contain multiple valid substitution - // fields. If multiple substitution fields are present, their results will be concatenated - // to form the final descriptor value. If it contains no substitution fields, the value - // will be used as is. If the final concatenated result is empty and ``default_value`` is set, - // the ``default_value`` will be used. If ``default_value`` is not set and the result is - // empty, this descriptor will be skipped and not included in the rate limit call. - // - // When disabled (default): The descriptor_value is used as a literal string without any formatter - // parsing or substitution. - // - // For example, ``static_value`` will be used as is since there are no substitution fields. - // ``%REQ(:method)%`` will be replaced with the HTTP method, and - // ``%REQ(:method)%%REQ(:path)%`` will be replaced with the concatenation of the HTTP method and path. - // ``%CEL(request.headers['user-id'])%`` will use CEL to extract the user ID from request headers. - // - string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; - - // An optional value to use if the final concatenated ``descriptor_value`` result is empty. - // Only applicable when formatter parsing is enabled by the runtime feature flag - // ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default). - string default_value = 3; - - // An optional key to use in the descriptor entry. If not set it defaults - // to 'generic_key' as the descriptor key. - string descriptor_key = 2; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("header_match", "") - // [#next-free-field: 6] - message HeaderValueMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.RateLimit.Action.HeaderValueMatch"; - - // Descriptor value of entry. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - // - // .. note:: - // - // Formatter parsing is controlled by the runtime feature flag - // ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` - // (disabled by default). - // - // When enabled: The format string can contain multiple valid substitution - // fields. If multiple substitution fields are present, their results will be concatenated - // to form the final descriptor value. If it contains no substitution fields, the value - // will be used as is. All substitution fields will be evaluated and their results - // concatenated. If the final concatenated result is empty and ``default_value`` is set, - // the ``default_value`` will be used. If ``default_value`` is not set and the result is - // empty, this descriptor will be skipped and not included in the rate limit call. - // - // When disabled (default): The descriptor_value is used as a literal string without any formatter - // parsing or substitution. - // - // For example, ``static_value`` will be used as is since there are no substitution fields. - // ``%REQ(:method)%`` will be replaced with the HTTP method, and - // ``%REQ(:method)%%REQ(:path)%`` will be replaced with the concatenation of the HTTP method and path. - // ``%CEL(request.headers['user-id'])%`` will use CEL to extract the user ID from request headers. - // - string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; - - // An optional value to use if the final concatenated ``descriptor_value`` result is empty. - // Only applicable when formatter parsing is enabled by the runtime feature flag - // ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default). - string default_value = 5; - - // The key to use in the descriptor entry. - // - // Defaults to ``header_match``. - string descriptor_key = 4; - - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - google.protobuf.BoolValue expect_match = 2; - - // Specifies a set of headers that the rate limit action should match - // on. The action will check the request's headers against all the - // specified headers in the config. A match will happen if all the - // headers in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - repeated HeaderMatcher headers = 3 [(validate.rules).repeated = {min_items: 1}]; - } - - // The following descriptor entry is appended when the - // :ref:`dynamic metadata ` contains a key value: - // - // .. code-block:: cpp - // - // ("", "") - // - // .. attention:: - // This action has been deprecated in favor of the :ref:`metadata ` action - message DynamicMetaData { - // The key to use in the descriptor entry. - string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; - - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the dynamic metadata is of type string. - type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}]; - - // An optional value to use if ``metadata_key`` is empty. If not set and - // no value is present under the metadata_key then no descriptor is generated. - string default_value = 3; - } - - // The following descriptor entry is appended when the metadata contains a key value: - // - // .. code-block:: cpp - // - // ("", "") - // [#next-free-field: 6] - message MetaData { - enum Source { - // Query :ref:`dynamic metadata ` - DYNAMIC = 0; - - // Query :ref:`route entry metadata ` - ROUTE_ENTRY = 1; - } - - // The key to use in the descriptor entry. - string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; - - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the metadata is of type string. - type.metadata.v3.MetadataKey metadata_key = 2 [(validate.rules).message = {required: true}]; - - // An optional value to use if ``metadata_key`` is empty. If not set and - // no value is present under the metadata_key then ``skip_if_absent`` is followed to - // skip calling the rate limiting service or skip the descriptor. - string default_value = 3; - - // Source of metadata - Source source = 4 [(validate.rules).enum = {defined_only: true}]; - - // Controls the behavior when the specified ``metadata_key`` is empty and ``default_value`` is not set. - // - // If set to ``false`` (default): - // - // * Envoy does **NOT** call the rate limiting service for this descriptor. - // * Useful if the metadata is optional and you prefer to skip rate limiting when it's absent. - // - // If set to ``true``: - // - // * Envoy calls the rate limiting service but omits this descriptor if the ``metadata_key`` is empty and - // ``default_value`` is missing. - // * Useful if you want Envoy to enforce rate limiting even when the metadata is not present. - // - bool skip_if_absent = 5; - } - - // The following descriptor entry is appended to the descriptor: - // - // .. code-block:: cpp - // - // ("query_match", "") - // [#next-free-field: 6] - message QueryParameterValueMatch { - // Descriptor value of entry. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - // - // .. note:: - // - // Formatter parsing is controlled by the runtime feature flag - // ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` - // (disabled by default). - // - // When enabled: The format string can contain multiple valid substitution - // fields. If multiple substitution fields are present, their results will be concatenated - // to form the final descriptor value. If it contains no substitution fields, the value - // will be used as is. All substitution fields will be evaluated and their results - // concatenated. If the final concatenated result is empty and ``default_value`` is set, - // the ``default_value`` will be used. If ``default_value`` is not set and the result is - // empty, this descriptor will be skipped and not included in the rate limit call. - // - // When disabled (default): The descriptor_value is used as a literal string without any formatter - // parsing or substitution. - // - // For example, ``static_value`` will be used as is since there are no substitution fields. - // ``%REQ(:method)%`` will be replaced with the HTTP method, and - // ``%REQ(:method)%%REQ(:path)%`` will be replaced with the concatenation of the HTTP method and path. - // ``%CEL(request.headers['user-id'])%`` will use CEL to extract the user ID from request headers. - // - string descriptor_value = 1 [(validate.rules).string = {min_len: 1}]; - - // An optional value to use if the final concatenated ``descriptor_value`` result is empty. - // Only applicable when formatter parsing is enabled by the runtime feature flag - // ``envoy.reloadable_features.enable_formatter_for_ratelimit_action_descriptor_value`` (disabled by default). - string default_value = 5; - - // The key to use in the descriptor entry. - // - // Defaults to ``query_match``. - string descriptor_key = 4; - - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - google.protobuf.BoolValue expect_match = 2; - - // Specifies a set of query parameters that the rate limit action should match - // on. The action will check the request's query parameters against all the - // specified query parameters in the config. A match will happen if all the - // query parameters in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - repeated QueryParameterMatcher query_parameters = 3 - [(validate.rules).repeated = {min_items: 1}]; - } - - oneof action_specifier { - option (validate.required) = true; - - // Rate limit on source cluster. - SourceCluster source_cluster = 1; - - // Rate limit on destination cluster. - DestinationCluster destination_cluster = 2; - - // Rate limit on request headers. - RequestHeaders request_headers = 3; - - // Rate limit on query parameters. - QueryParameters query_parameters = 12; - - // Rate limit on remote address. - RemoteAddress remote_address = 4; - - // Rate limit on a generic key. - GenericKey generic_key = 5; - - // Rate limit on the existence of request headers. - HeaderValueMatch header_value_match = 6; - - // Rate limit on dynamic metadata. - // - // .. attention:: - // This field has been deprecated in favor of the :ref:`metadata ` field - DynamicMetaData dynamic_metadata = 7 [ - deprecated = true, - (envoy.annotations.deprecated_at_minor_version) = "3.0", - (envoy.annotations.disallowed_by_default) = true - ]; - - // Rate limit on metadata. - MetaData metadata = 8; - - // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. - // - // :ref:`HTTP matching input functions ` are - // permitted as descriptor extensions. The input functions are only - // looked up if there is no rate limit descriptor extension matching - // the type URL. - // - // [#extension-category: envoy.rate_limit_descriptors] - core.v3.TypedExtensionConfig extension = 9; - - // Rate limit on masked remote address. - MaskedRemoteAddress masked_remote_address = 10; - - // Rate limit on the existence of query parameters. - QueryParameterValueMatch query_parameter_value_match = 11; - } - } - - message Override { - // Fetches the override from the dynamic metadata. - message DynamicMetadata { - // Metadata struct that defines the key and path to retrieve the struct value. - // The value must be a struct containing an integer "requests_per_unit" property - // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` - type.metadata.v3.MetadataKey metadata_key = 1 [(validate.rules).message = {required: true}]; - } - - oneof override_specifier { - option (validate.required) = true; - - // Limit override from dynamic metadata. - DynamicMetadata dynamic_metadata = 1; - } - } - - message HitsAddend { - // Fixed number of hits to add to the rate limit descriptor. - // - // One of the ``number`` or ``format`` fields should be set but not both. - google.protobuf.UInt64Value number = 1 [(validate.rules).uint64 = {lte: 1000000000}]; - - // Substitution format string to extract the number of hits to add to the rate limit descriptor. - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here. - // - // .. note:: - // - // The format string must contains only single valid substitution field. If the format string - // not meets the requirement, the configuration will be rejected. - // - // The substitution field should generates a non-negative number or string representation of - // a non-negative number. The value of the non-negative number should be less than or equal - // to 1000000000 like the ``number`` field. If the output of the substitution field not meet - // the requirement, this will be treated as an error and the current descriptor will be ignored. - // - // For example, the ``%BYTES_RECEIVED%`` format string will be replaced with the number of bytes - // received in the request. - // - // One of the ``number`` or ``format`` fields should be set but not both. - string format = 2 [(validate.rules).string = {prefix: "%" suffix: "%" ignore_empty: true}]; - } - - // Refers to the stage set in the filter. The rate limit configuration only - // applies to filters with the same stage number. The default stage number is - // 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - // - // .. note:: - // This is not supported if the rate limit action is configured in the ``typed_per_filter_config`` like - // :ref:`VirtualHost.typed_per_filter_config` or - // :ref:`Route.typed_per_filter_config`, etc. - google.protobuf.UInt32Value stage = 1 [(validate.rules).uint32 = {lte: 10}]; - - // The key to be set in runtime to disable this rate limit configuration. - // - // .. note:: - // This is not supported if the rate limit action is configured in the ``typed_per_filter_config`` like - // :ref:`VirtualHost.typed_per_filter_config` or - // :ref:`Route.typed_per_filter_config`, etc. - string disable_key = 2; - - // A list of actions that are to be applied for this rate limit configuration. - // Order matters as the actions are processed sequentially and the descriptor - // is composed by appending descriptor entries in that sequence. If an action - // cannot append a descriptor entry, no descriptor is generated for the - // configuration. See :ref:`composing actions - // ` for additional documentation. - repeated Action actions = 3 [(validate.rules).repeated = {min_items: 1}]; - - // An optional limit override to be appended to the descriptor produced by this - // rate limit configuration. If the override value is invalid or cannot be resolved - // from metadata, no override is provided. See :ref:`rate limit override - // ` for more information. - // - // .. note:: - // This is not supported if the rate limit action is configured in the ``typed_per_filter_config`` like - // :ref:`VirtualHost.typed_per_filter_config` or - // :ref:`Route.typed_per_filter_config`, etc. - Override limit = 4; - - // An optional hits addend to be appended to the descriptor produced by this rate limit - // configuration. - // - // .. note:: - // This is only supported if the rate limit action is configured in the ``typed_per_filter_config`` like - // :ref:`VirtualHost.typed_per_filter_config` or - // :ref:`Route.typed_per_filter_config`, etc. - HitsAddend hits_addend = 5; - - // If true, the rate limit request will be applied when the stream completes. The default value is false. - // This is useful when the rate limit budget needs to reflect the response context that is not available - // on the request path. - // - // For example, let's say the upstream service calculates the usage statistics and returns them in the response body - // and we want to utilize these numbers to apply the rate limit action for the subsequent requests. - // Combined with another filter that can set the desired addend based on the response (e.g. Lua filter), - // this can be used to subtract the usage statistics from the rate limit budget. - // - // A rate limit applied on the stream completion is "fire-and-forget" by nature, and rate limit is not enforced by this config. - // In other words, the current request won't be blocked when this is true, but the budget will be updated for the subsequent - // requests based on the action with this field set to true. Users should ensure that the rate limit is enforced by the actions - // applied on the request path, i.e. the ones with this field set to false. - // - // Currently, this is only supported by the HTTP global rate filter. - bool apply_on_stream_done = 6; -} - -// .. attention:: -// -// Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host`` -// header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. -// -// .. attention:: -// -// To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both -// HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., -// -// .. code-block:: json -// -// { -// "name": ":method", -// "string_match": { -// "exact": "POST" -// } -// } -// -// .. attention:: -// In the absence of any header match specifier, match will default to :ref:`present_match -// `. i.e, a request that has the :ref:`name -// ` header will match, regardless of the header's -// value. -// -// [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] -// [#next-free-field: 15] -message HeaderMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.HeaderMatcher"; - - reserved 2, 3, 5; - - reserved "regex_match"; - - // Specifies the name of the header in the request. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Specifies how the header match will be performed to route the request. - oneof header_match_specifier { - // If specified, header match will be performed based on the value of the header. - // - // .. attention:: - // - // This field is deprecated. Please use :ref:`string_match `. - string exact_match = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // If specified, this regex string is a regular expression rule which implies the entire request - // header value must match the regex. The rule will not match if only a subsequence of the - // request header value matches the regex. - // - // .. attention:: - // - // This field is deprecated. Please use :ref:`string_match `. - type.matcher.v3.RegexMatcher safe_regex_match = 11 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting of - // an optional plus or minus sign followed by a sequence of digits. The rule will not match if - // the header value does not represent an integer. Match will fail for empty values, floating - // point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9, - // ``-1somestring`` - type.v3.Int64Range range_match = 6; - - // If specified as true, header match will be performed based on whether the header is in the - // request. If specified as false, header match will be performed based on whether the header is absent. - bool present_match = 7; - - // If specified, header match will be performed based on the prefix of the header value. - // - // .. note:: - // - // Empty prefix is not allowed. Please use ``present_match`` instead. - // - // .. attention:: - // - // This field is deprecated. Please use :ref:`string_match `. - // - // Examples: - // - // * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``. - string prefix_match = 9 [ - deprecated = true, - (validate.rules).string = {min_len: 1}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If specified, header match will be performed based on the suffix of the header value. - // - // .. note:: - // - // Empty suffix is not allowed. Please use ``present_match`` instead. - // - // .. attention:: - // - // This field is deprecated. Please use :ref:`string_match `. - // - // Examples: - // - // * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``. - string suffix_match = 10 [ - deprecated = true, - (validate.rules).string = {min_len: 1}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If specified, header match will be performed based on whether the header value contains - // the given value or not. - // - // .. note:: - // - // Empty contains match is not allowed. Please use ``present_match`` instead. - // - // .. attention:: - // - // This field is deprecated. Please use :ref:`string_match `. - // - // Examples: - // - // * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``. - string contains_match = 12 [ - deprecated = true, - (validate.rules).string = {min_len: 1}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If specified, header match will be performed based on the string match of the header value. - type.matcher.v3.StringMatcher string_match = 13; - } - - // If specified, the match result will be inverted before checking. - // - // Defaults to ``false``. - // - // Examples: - // - // * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted. - // * The range [-10,0) will match the value -1, so it will not match when inverted. - bool invert_match = 8; - - // If specified, for any header match rule, if the header match rule specified header - // does not exist, this header value will be treated as empty. - // - // Defaults to ``false``. - // - // Examples: - // - // * The header match rule specified header "header1" to range match of [0, 10], - // :ref:`invert_match ` - // is set to true and :ref:`treat_missing_header_as_empty ` - // is set to true; The "header1" header is not present. The match rule will - // treat the "header1" as an empty header. The empty header does not match the range, - // so it will match when inverted. - // * The header match rule specified header "header2" to range match of [0, 10], - // :ref:`invert_match ` - // is set to true and :ref:`treat_missing_header_as_empty ` - // is set to false; The "header2" header is not present and the header - // matcher rule for "header2" will be ignored so it will not match. - // * The header match rule specified header "header3" to a string regex match - // ``^$`` which means an empty string, and - // :ref:`treat_missing_header_as_empty ` - // is set to true; The "header3" header is not present. - // The match rule will treat the "header3" header as an empty header so it will match. - // * The header match rule specified header "header4" to a string regex match - // ``^$`` which means an empty string, and - // :ref:`treat_missing_header_as_empty ` - // is set to false; The "header4" header is not present. - // The match rule for "header4" will be ignored so it will not match. - bool treat_missing_header_as_empty = 14; -} - -// Query parameter matching treats the query string of a request's :path header -// as an ampersand-separated list of keys and/or key=value elements. -// [#next-free-field: 7] -message QueryParameterMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.route.QueryParameterMatcher"; - - reserved 3, 4; - - reserved "value", "regex"; - - // Specifies the name of a key that must be present in the requested - // ``path``'s query string. - string name = 1 [(validate.rules).string = {min_len: 1 max_bytes: 1024}]; - - oneof query_parameter_match_specifier { - // Specifies whether a query parameter value should match against a string. - type.matcher.v3.StringMatcher string_match = 5 [(validate.rules).message = {required: true}]; - - // Specifies whether a query parameter should be present. - bool present_match = 6; - } -} - -// Cookie matching inspects individual name/value pairs parsed from the ``Cookie`` header. -message CookieMatcher { - // Specifies the cookie name to evaluate. - string name = 1 [(validate.rules).string = {min_len: 1 max_bytes: 1024}]; - - // Match the cookie value using :ref:`StringMatcher - // ` semantics. - type.matcher.v3.StringMatcher string_match = 2 [(validate.rules).message = {required: true}]; - - // Invert the match result. If the cookie is not present, the match result is false, so - // ``invert_match`` will cause the matcher to succeed when the cookie is absent. - bool invert_match = 3; -} - -// HTTP Internal Redirect :ref:`architecture overview `. -// [#next-free-field: 6] -message InternalRedirectPolicy { - // An internal redirect is not handled, unless the number of previous internal redirects that a - // downstream request has encountered is lower than this value. - // In the case where a downstream request is bounced among multiple routes by internal redirect, - // the first route that hits this threshold, or does not set :ref:`internal_redirect_policy - // ` - // will pass the redirect back to downstream. - // - // If not specified, at most one redirect will be followed. - google.protobuf.UInt32Value max_internal_redirects = 1; - - // Defines what upstream response codes are allowed to trigger internal redirect. If unspecified, - // only 302 will be treated as internal redirect. - // Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored. - repeated uint32 redirect_response_codes = 2 [(validate.rules).repeated = {max_items: 5}]; - - // Specifies a list of predicates that are queried when an upstream response is deemed - // to trigger an internal redirect by all other criteria. Any predicate in the list can reject - // the redirect, causing the response to be proxied to downstream. - // [#extension-category: envoy.internal_redirect_predicates] - repeated core.v3.TypedExtensionConfig predicates = 3; - - // Allow internal redirect to follow a target URI with a different scheme than the value of - // x-forwarded-proto. The default is ``false``. - bool allow_cross_scheme_redirect = 4; - - // Specifies a list of headers, by name, to copy from the internal redirect into the subsequent - // request. If a header is specified here but not present in the redirect, it will be cleared in - // the subsequent request. - repeated string response_headers_to_copy = 5 [(validate.rules).repeated = { - unique: true - items {string {well_known_regex: HTTP_HEADER_NAME strict: false}} - }]; -} - -// A simple wrapper for an HTTP filter config. This is intended to be used as a wrapper for the -// map value in -// :ref:`VirtualHost.typed_per_filter_config`, -// :ref:`Route.typed_per_filter_config`, -// or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` -// to add additional flags to the filter. -message FilterConfig { - // The filter config. - google.protobuf.Any config = 1; - - // If true, the filter is optional, meaning that if the client does - // not support the specified filter, it may ignore the map entry rather - // than rejecting the config. - bool is_optional = 2; - - // If true, the filter is disabled in the route or virtual host and the ``config`` field is ignored. - // See :ref:`route based filter chain ` - // for more details. - // - // .. note:: - // - // This field will take effect when the request arrive and filter chain is created for the request. - // If initial route is selected for the request and a filter is disabled in the initial route, then - // the filter will not be added to the filter chain. - // And if the request is mutated later and re-match to another route, the disabled filter by the - // initial route will not be added back to the filter chain because the filter chain is already - // created and it is too late to change the chain. - // - bool disabled = 3; -} diff --git a/src/main/proto/envoy/config/route/v3/scoped_route.proto b/src/main/proto/envoy/config/route/v3/scoped_route.proto deleted file mode 100644 index ff4cc68..0000000 --- a/src/main/proto/envoy/config/route/v3/scoped_route.proto +++ /dev/null @@ -1,133 +0,0 @@ -syntax = "proto3"; - -package envoy.config.route.v3; - -import "envoy/config/route/v3/route.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.route.v3"; -option java_outer_classname = "ScopedRouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/route/v3;routev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP scoped routing configuration] -// * Routing :ref:`architecture overview ` - -// Specifies a routing scope, which associates a -// :ref:`Key` to a -// :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. -// The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically -// via RDS (:ref:`route_configuration_name`) -// or specified inline (:ref:`route_configuration`). -// -// The HTTP connection manager builds up a table consisting of these Key to -// RouteConfiguration mappings, and looks up the RouteConfiguration to use per -// request according to the algorithm specified in the -// :ref:`scope_key_builder` -// assigned to the HttpConnectionManager. -// -// For example, with the following configurations (in YAML): -// -// HttpConnectionManager config: -// -// .. code:: -// -// ... -// scoped_routes: -// name: foo-scoped-routes -// scope_key_builder: -// fragments: -// - header_value_extractor: -// name: X-Route-Selector -// element_separator: "," -// element: -// separator: = -// key: vip -// -// ScopedRouteConfiguration resources (specified statically via -// :ref:`scoped_route_configurations_list` -// or obtained dynamically via SRDS): -// -// .. code:: -// -// (1) -// name: route-scope1 -// route_configuration_name: route-config1 -// key: -// fragments: -// - string_key: 172.10.10.20 -// -// (2) -// name: route-scope2 -// route_configuration_name: route-config2 -// key: -// fragments: -// - string_key: 172.20.20.30 -// -// A request from a client such as: -// -// .. code:: -// -// GET / HTTP/1.1 -// Host: foo.com -// X-Route-Selector: vip=172.10.10.20 -// -// would result in the routing table defined by the ``route-config1`` -// RouteConfiguration being assigned to the HTTP request/stream. -// -// [#next-free-field: 6] -message ScopedRouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ScopedRouteConfiguration"; - - // Specifies a key which is matched against the output of the - // :ref:`scope_key_builder` - // specified in the HttpConnectionManager. The matching is done per HTTP - // request and is dependent on the order of the fragments contained in the - // Key. - message Key { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ScopedRouteConfiguration.Key"; - - message Fragment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ScopedRouteConfiguration.Key.Fragment"; - - oneof type { - option (validate.required) = true; - - // A string to match against. - string string_key = 1; - } - } - - // The ordered set of fragments to match against. The order must match the - // fragments in the corresponding - // :ref:`scope_key_builder`. - repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Whether the RouteConfiguration should be loaded on demand. - bool on_demand = 4; - - // The name assigned to the routing scope. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an - // RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated - // with this scope. - string route_configuration_name = 2 - [(udpa.annotations.field_migrate).oneof_promotion = "route_config"]; - - // The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope. - RouteConfiguration route_configuration = 5 - [(udpa.annotations.field_migrate).oneof_promotion = "route_config"]; - - // The key to match against. - Key key = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/tap/v3/common.proto b/src/main/proto/envoy/config/tap/v3/common.proto deleted file mode 100644 index ecdb5fa..0000000 --- a/src/main/proto/envoy/config/tap/v3/common.proto +++ /dev/null @@ -1,321 +0,0 @@ -syntax = "proto3"; - -package envoy.config.tap.v3; - -import "envoy/config/common/matcher/v3/matcher.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/config/route/v3/route_components.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.tap.v3"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap common configuration] - -// Tap configuration. -message TapConfig { - // [#comment:TODO(mattklein123): Rate limiting] - - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.TapConfig"; - - // The match configuration. If the configuration matches the data source being tapped, a tap will - // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. - MatchPredicate match_config = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The match configuration. If the configuration matches the data source being tapped, a tap will - // occur, with the result written to the configured output. - // Exactly one of :ref:`match ` and - // :ref:`match_config ` must be set. If both - // are set, the :ref:`match ` will be used. - common.matcher.v3.MatchPredicate match = 4; - - // The tap output configuration. If a match configuration matches a data source being tapped, - // a tap will occur and the data will be written to the configured output. - OutputConfig output_config = 2 [(validate.rules).message = {required: true}]; - - // [#not-implemented-hide:] Specify if Tap matching is enabled. The % of requests\connections for - // which the tap matching is enabled. When not enabled, the request\connection will not be - // recorded. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - core.v3.RuntimeFractionalPercent tap_enabled = 3; -} - -// Tap match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 11] -message MatchPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.MatchPredicate"; - - // A set of match configurations used for logical operations. - message MatchSet { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.MatchPredicate.MatchSet"; - - // The list of rules that make up the set. - repeated MatchPredicate rules = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - MatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // HTTP request headers match configuration. - HttpHeadersMatch http_request_headers_match = 5; - - // HTTP request trailers match configuration. - HttpHeadersMatch http_request_trailers_match = 6; - - // HTTP response headers match configuration. - HttpHeadersMatch http_response_headers_match = 7; - - // HTTP response trailers match configuration. - HttpHeadersMatch http_response_trailers_match = 8; - - // HTTP request generic body match configuration. - HttpGenericBodyMatch http_request_generic_body_match = 9; - - // HTTP response generic body match configuration. - HttpGenericBodyMatch http_response_generic_body_match = 10; - } -} - -// HTTP headers match configuration. -message HttpHeadersMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.HttpHeadersMatch"; - - // HTTP headers to match. - repeated route.v3.HeaderMatcher headers = 1; -} - -// HTTP generic body match configuration. -// List of text strings and hex strings to be located in HTTP body. -// All specified strings must be found in the HTTP body for positive match. -// The search may be limited to specified number of bytes from the body start. -// -// .. attention:: -// -// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. -// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified -// to scan only part of the http body. -message HttpGenericBodyMatch { - message GenericTextMatch { - oneof rule { - option (validate.required) = true; - - // Text string to be located in HTTP body. - string string_match = 1 [(validate.rules).string = {min_len: 1}]; - - // Sequence of bytes to be located in HTTP body. - bytes binary_match = 2 [(validate.rules).bytes = {min_len: 1}]; - } - } - - // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). - uint32 bytes_limit = 1; - - // List of patterns to match. - repeated GenericTextMatch patterns = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Tap output configuration. -// [#next-free-field: 6] -message OutputConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.OutputConfig"; - - // Output sinks for tap data. Currently a single sink is allowed in the list. Once multiple - // sink types are supported this constraint will be relaxed. - repeated OutputSink sinks = 1 [(validate.rules).repeated = {min_items: 1 max_items: 1}]; - - // For buffered tapping, the maximum amount of received body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - google.protobuf.UInt32Value max_buffered_rx_bytes = 2; - - // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - google.protobuf.UInt32Value max_buffered_tx_bytes = 3; - - // Indicates whether taps produce a single buffered message per tap, or multiple streamed - // messages per tap in the emitted :ref:`TraceWrapper - // ` messages. Note that streamed tapping does not - // mean that no buffering takes place. Buffering may be required if data is processed before a - // match can be determined. See the HTTP tap filter :ref:`streaming - // ` documentation for more information. - bool streaming = 4; - - // Tapped messages will be sent on each read/write event for streamed tapping by default. - // But this behavior could be controlled by setting this field. - // If set then the tapped messages will be send once the threshold is reached. - // This could be used to avoid high frequent sending. - google.protobuf.UInt32Value min_streamed_sent_bytes = 5; -} - -// Tap output sink configuration. -// [#next-free-field: 7] -message OutputSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.OutputSink"; - - // Output format. All output is in the form of one or more :ref:`TraceWrapper - // ` messages. This enumeration indicates - // how those messages are written. Note that not all sinks support all output formats. See - // individual sink documentation for more information. - enum Format { - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_bytes - // ` field. This means that body data will be - // base64 encoded as per the `proto3 JSON mappings - // `_. - JSON_BODY_AS_BYTES = 0; - - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_string - // ` field. This means that body data will be - // string encoded as per the `proto3 JSON mappings - // `_. This format type is - // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the - // user wishes to view it directly without being forced to base64 decode the body. - JSON_BODY_AS_STRING = 1; - - // Binary proto format. Note that binary proto is not self-delimiting. If a sink writes - // multiple binary messages without any length information the data stream will not be - // useful. However, for certain sinks that are self-delimiting (e.g., one message per file) - // this output format makes consumption simpler. - PROTO_BINARY = 2; - - // Messages are written as a sequence tuples, where each tuple is the message length encoded - // as a `protobuf 32-bit varint - // `_ - // followed by the binary message. The messages can be read back using the language specific - // protobuf coded stream implementation to obtain the message length and the message. - PROTO_BINARY_LENGTH_DELIMITED = 3; - - // Text proto format. - PROTO_TEXT = 4; - } - - // Sink output format. - Format format = 1 [(validate.rules).enum = {defined_only: true}]; - - oneof output_sink_type { - option (validate.required) = true; - - // Tap output will be streamed out the :http:post:`/tap` admin endpoint. - // - // .. attention:: - // - // It is only allowed to specify the streaming admin output sink if the tap is being - // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has - // been configured to receive tap configuration from some other source (e.g., static - // file, XDS, etc.) configuring the streaming admin output type will fail. - StreamingAdminSink streaming_admin = 2; - - // Tap output will be written to a file per tap sink. - FilePerTapSink file_per_tap = 3; - - // [#not-implemented-hide:] - // GrpcService to stream data to. The format argument must be PROTO_BINARY. - // [#comment: TODO(samflattery): remove cleanup in uber_per_filter.cc once implemented] - StreamingGrpcSink streaming_grpc = 4; - - // Tap output will be buffered in a single block before flushing to the :http:post:`/tap` admin endpoint - // - // .. attention:: - // - // It is only allowed to specify the buffered admin output sink if the tap is being - // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has - // been configured to receive tap configuration from some other source (e.g., static - // file, XDS, etc.) configuring the buffered admin output type will fail. - BufferedAdminSink buffered_admin = 5; - - // Tap output filter will be defined by an extension type - core.v3.TypedExtensionConfig custom_sink = 6; - } -} - -// Streaming admin sink configuration. -message StreamingAdminSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.StreamingAdminSink"; -} - -// BufferedAdminSink configures a tap output to collect traces without returning them until -// one of multiple criteria are satisfied. -// Similar to StreamingAdminSink, it is only allowed to specify the buffered admin output -// sink if the tap is being configured from the ``/tap`` admin endpoint. -message BufferedAdminSink { - // Stop collecting traces when the specified number are collected. - // If other criteria for ending collection are reached first, this value will not be used. - uint64 max_traces = 1 [(validate.rules).uint64 = {gt: 0}]; - - // Acts as a fallback to prevent the client from waiting for long periods of time. - // After timeout has occurred, a buffer flush will be triggered, returning the traces buffered so far. - // This may result in returning fewer traces than were requested, and in the case that no traces are - // buffered during this time, no traces will be returned. - // Specifying 0 for the timeout value (or not specifying a value at all) indicates an infinite timeout. - google.protobuf.Duration timeout = 2; -} - -// The file per tap sink outputs a discrete file for every tapped stream. -message FilePerTapSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.FilePerTapSink"; - - // Path prefix. The output file will be of the form _.pb, where is an - // identifier distinguishing the recorded trace for stream instances (the Envoy - // connection ID, HTTP stream ID, etc.). - string path_prefix = 1 [(validate.rules).string = {min_len: 1}]; -} - -// [#not-implemented-hide:] Streaming gRPC sink configuration sends the taps to an external gRPC -// server. -message StreamingGrpcSink { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.StreamingGrpcSink"; - - // Opaque identifier, that will be sent back to the streaming grpc server. - string tap_id = 1; - - // The gRPC server that hosts the Tap Sink Service. - core.v3.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/trace/v2/datadog.proto b/src/main/proto/envoy/config/trace/v2/datadog.proto deleted file mode 100644 index 3034eec..0000000 --- a/src/main/proto/envoy/config/trace/v2/datadog.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "DatadogProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Datadog tracer] - -// Configuration for the Datadog tracer. -// [#extension: envoy.tracers.datadog] -message DatadogConfig { - // The cluster to use for submitting traces to the Datadog agent. - string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The name used for the service when traces are generated by envoy. - string service_name = 2 [(validate.rules).string = {min_bytes: 1}]; -} diff --git a/src/main/proto/envoy/config/trace/v2/dynamic_ot.proto b/src/main/proto/envoy/config/trace/v2/dynamic_ot.proto deleted file mode 100644 index 928b096..0000000 --- a/src/main/proto/envoy/config/trace/v2/dynamic_ot.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "DynamicOtProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Dynamically loadable OpenTracing tracer] - -// DynamicOtConfig is used to dynamically load a tracer from a shared library -// that implements the `OpenTracing dynamic loading API -// `_. -// [#extension: envoy.tracers.dynamic_ot] -message DynamicOtConfig { - // Dynamic library implementing the `OpenTracing API - // `_. - string library = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The configuration to use when creating a tracer from the given dynamic - // library. - google.protobuf.Struct config = 2; -} diff --git a/src/main/proto/envoy/config/trace/v2/http_tracer.proto b/src/main/proto/envoy/config/trace/v2/http_tracer.proto deleted file mode 100644 index 23fec5a..0000000 --- a/src/main/proto/envoy/config/trace/v2/http_tracer.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "HttpTracerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tracing] -// Tracing :ref:`architecture overview `. - -// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy. -// -// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one -// supported. -// -// .. attention:: -// -// Use of this message type has been deprecated in favor of direct use of -// :ref:`Tracing.Http `. -message Tracing { - // Configuration for an HTTP tracer provider used by Envoy. - // - // The configuration is defined by the - // :ref:`HttpConnectionManager.Tracing ` - // :ref:`provider ` - // field. - message Http { - // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. Built-in trace drivers: - // - // - *envoy.tracers.lightstep* - // - *envoy.tracers.zipkin* - // - *envoy.tracers.dynamic_ot* - // - *envoy.tracers.datadog* - // - *envoy.tracers.xray* - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Trace driver specific configuration which depends on the driver being instantiated. - // See the trace drivers for examples: - // - // - :ref:`LightstepConfig ` - // - :ref:`ZipkinConfig ` - // - :ref:`DynamicOtConfig ` - // - :ref:`DatadogConfig ` - // - :ref:`AWS X-Ray ` - oneof config_type { - google.protobuf.Struct config = 2 [deprecated = true]; - - google.protobuf.Any typed_config = 3; - } - } - - // Provides configuration for the HTTP tracer. - Http http = 1; -} diff --git a/src/main/proto/envoy/config/trace/v2/lightstep.proto b/src/main/proto/envoy/config/trace/v2/lightstep.proto deleted file mode 100644 index db866c8..0000000 --- a/src/main/proto/envoy/config/trace/v2/lightstep.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "LightstepProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: LightStep tracer] - -// Configuration for the LightStep tracer. -// [#extension: envoy.tracers.lightstep] -message LightstepConfig { - // Available propagation modes - enum PropagationMode { - // Propagate trace context in the single header x-ot-span-context. - ENVOY = 0; - - // Propagate trace context using LightStep's native format. - LIGHTSTEP = 1; - - // Propagate trace context using the b3 format. - B3 = 2; - - // Propagation trace context using the w3 trace-context standard. - TRACE_CONTEXT = 3; - } - - // The cluster manager cluster that hosts the LightStep collectors. - string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // File containing the access token to the `LightStep - // `_ API. - string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}]; - - // Propagation modes to use by LightStep's tracer. - repeated PropagationMode propagation_modes = 3 - [(validate.rules).repeated = {items {enum {defined_only: true}}}]; -} diff --git a/src/main/proto/envoy/config/trace/v2/service.proto b/src/main/proto/envoy/config/trace/v2/service.proto deleted file mode 100644 index 85477cc..0000000 --- a/src/main/proto/envoy/config/trace/v2/service.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import "envoy/api/v2/core/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "ServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Trace Service] - -// Configuration structure. -message TraceServiceConfig { - // The upstream gRPC cluster that hosts the metrics service. - api.v2.core.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/trace/v2/trace.proto b/src/main/proto/envoy/config/trace/v2/trace.proto deleted file mode 100644 index 479da8b..0000000 --- a/src/main/proto/envoy/config/trace/v2/trace.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import public "envoy/config/trace/v2/datadog.proto"; -import public "envoy/config/trace/v2/dynamic_ot.proto"; -import public "envoy/config/trace/v2/http_tracer.proto"; -import public "envoy/config/trace/v2/lightstep.proto"; -import public "envoy/config/trace/v2/service.proto"; -import public "envoy/config/trace/v2/zipkin.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "TraceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; diff --git a/src/main/proto/envoy/config/trace/v2/zipkin.proto b/src/main/proto/envoy/config/trace/v2/zipkin.proto deleted file mode 100644 index d052c71..0000000 --- a/src/main/proto/envoy/config/trace/v2/zipkin.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2"; -option java_outer_classname = "ZipkinProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2;tracev2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Zipkin tracer] - -// Configuration for the Zipkin tracer. -// [#extension: envoy.tracers.zipkin] -// [#next-free-field: 6] -message ZipkinConfig { - // Available Zipkin collector endpoint versions. - enum CollectorEndpointVersion { - // Zipkin API v1, JSON over HTTP. - // [#comment: The default implementation of Zipkin client before this field is added was only v1 - // and the way user configure this was by not explicitly specifying the version. Consequently, - // before this is added, the corresponding Zipkin collector expected to receive v1 payload. - // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when - // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field, - // since in Zipkin realm this v1 version is considered to be not preferable anymore.] - HTTP_JSON_V1 = 0 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // Zipkin API v2, JSON over HTTP. - HTTP_JSON = 1; - - // Zipkin API v2, protobuf over HTTP. - HTTP_PROTO = 2; - - // [#not-implemented-hide:] - GRPC = 3; - } - - // The cluster manager cluster that hosts the Zipkin collectors. Note that the - // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster - // resources `. - string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The API endpoint of the Zipkin service where the spans will be sent. When - // using a standard Zipkin installation, the API endpoint is typically - // /api/v1/spans, which is the default value. - string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}]; - - // Determines whether a 128bit trace id will be used when creating a new - // trace instance. The default value is false, which will result in a 64 bit trace id being used. - bool trace_id_128bit = 3; - - // Determines whether client and server spans will share the same span context. - // The default value is true. - google.protobuf.BoolValue shared_span_context = 4; - - // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be - // used. - CollectorEndpointVersion collector_endpoint_version = 5; -} diff --git a/src/main/proto/envoy/config/trace/v2alpha/xray.proto b/src/main/proto/envoy/config/trace/v2alpha/xray.proto deleted file mode 100644 index 2ce5ed1..0000000 --- a/src/main/proto/envoy/config/trace/v2alpha/xray.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v2alpha; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v2alpha"; -option java_outer_classname = "XrayProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: AWS X-Ray Tracer Configuration] -// Configuration for AWS X-Ray tracer - -message XRayConfig { - // The UDP endpoint of the X-Ray Daemon where the spans will be sent. - // If this value is not set, the default value of 127.0.0.1:2000 will be used. - api.v2.core.SocketAddress daemon_endpoint = 1; - - // The name of the X-Ray segment. - string segment_name = 2 [(validate.rules).string = {min_len: 1}]; - - // The location of a local custom sampling rules JSON file. - // For an example of the sampling rules see: - // `X-Ray SDK documentation - // `_ - api.v2.core.DataSource sampling_rule_manifest = 3; -} diff --git a/src/main/proto/envoy/config/trace/v3/datadog.proto b/src/main/proto/envoy/config/trace/v3/datadog.proto deleted file mode 100644 index 5359ec7..0000000 --- a/src/main/proto/envoy/config/trace/v3/datadog.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "DatadogProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.datadog.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Datadog tracer] - -// Configuration for the Remote Configuration feature. -message DatadogRemoteConfig { - // Frequency at which new configuration updates are queried. - // If no value is provided, the default value is delegated to the Datadog tracing library. - google.protobuf.Duration polling_interval = 1; -} - -// Configuration for the Datadog tracer. -// [#extension: envoy.tracers.datadog] -message DatadogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v2.DatadogConfig"; - - // The cluster to use for submitting traces to the Datadog agent. - string collector_cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // The name used for the service when traces are generated by envoy. - string service_name = 2 [(validate.rules).string = {min_len: 1}]; - - // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors - // that require a specific hostname. Defaults to :ref:`collector_cluster ` above. - string collector_hostname = 3; - - // Enables and configures remote configuration. - // Remote Configuration allows to configure the tracer from Datadog's user interface. - // This feature can drastically increase the number of connections to the Datadog Agent. - // Each tracer regularly polls for configuration updates, and the number of tracers is the product - // of the number of listeners and worker threads. - DatadogRemoteConfig remote_config = 4; -} diff --git a/src/main/proto/envoy/config/trace/v3/dynamic_ot.proto b/src/main/proto/envoy/config/trace/v3/dynamic_ot.proto deleted file mode 100644 index 40fe852..0000000 --- a/src/main/proto/envoy/config/trace/v3/dynamic_ot.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "google/protobuf/struct.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "DynamicOtProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.tracers.dynamic_ot.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamically loadable OpenTracing tracer] - -// DynamicOtConfig was used to dynamically load a tracer from a shared library -// that implements the `OpenTracing dynamic loading API -// `_. -// [#not-implemented-hide:] -message DynamicOtConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v2.DynamicOtConfig"; - - // Dynamic library implementing the `OpenTracing API - // `_. - string library = 1 [ - deprecated = true, - (validate.rules).string = {min_len: 1}, - (envoy.annotations.deprecated_at_minor_version) = "3.0", - (envoy.annotations.disallowed_by_default) = true - ]; - - // The configuration to use when creating a tracer from the given dynamic - // library. - google.protobuf.Struct config = 2 [ - deprecated = true, - (envoy.annotations.deprecated_at_minor_version) = "3.0", - (envoy.annotations.disallowed_by_default) = true - ]; -} diff --git a/src/main/proto/envoy/config/trace/v3/http_tracer.proto b/src/main/proto/envoy/config/trace/v3/http_tracer.proto deleted file mode 100644 index 8bd5151..0000000 --- a/src/main/proto/envoy/config/trace/v3/http_tracer.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "HttpTracerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tracing] -// Tracing :ref:`architecture overview `. - -// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy. -// -// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one -// supported. -// -// .. attention:: -// -// Use of this message type has been deprecated in favor of direct use of -// :ref:`Tracing.Http `. -message Tracing { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.Tracing"; - - // Configuration for an HTTP tracer provider used by Envoy. - // - // The configuration is defined by the - // :ref:`HttpConnectionManager.Tracing ` - // :ref:`provider ` - // field. - message Http { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v2.Tracing.Http"; - - reserved 2; - - reserved "config"; - - // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. - // See the :ref:`extensions listed in typed_config below ` for the default list of the HTTP trace driver. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Trace driver specific configuration which must be set according to the driver being instantiated. - // [#extension-category: envoy.tracers] - oneof config_type { - google.protobuf.Any typed_config = 3; - } - } - - // Provides configuration for the HTTP tracer. - Http http = 1; -} diff --git a/src/main/proto/envoy/config/trace/v3/lightstep.proto b/src/main/proto/envoy/config/trace/v3/lightstep.proto deleted file mode 100644 index 96dbbed..0000000 --- a/src/main/proto/envoy/config/trace/v3/lightstep.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "envoy/config/core/v3/base.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "LightstepProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.tracers.lightstep.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: LightStep tracer] - -// Configuration for the LightStep tracer. -// [#extension: envoy.tracers.lightstep] -// [#not-implemented-hide:] -message LightstepConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v2.LightstepConfig"; - - // Available propagation modes - enum PropagationMode { - // Propagate trace context in the single header x-ot-span-context. - ENVOY = 0; - - // Propagate trace context using LightStep's native format. - LIGHTSTEP = 1; - - // Propagate trace context using the b3 format. - B3 = 2; - - // Propagation trace context using the w3 trace-context standard. - TRACE_CONTEXT = 3; - } - - // The cluster manager cluster that hosts the LightStep collectors. - string collector_cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // File containing the access token to the `LightStep - // `_ API. - string access_token_file = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Access token to the `LightStep `_ API. - core.v3.DataSource access_token = 4; - - // Propagation modes to use by LightStep's tracer. - repeated PropagationMode propagation_modes = 3 - [(validate.rules).repeated = {items {enum {defined_only: true}}}]; -} diff --git a/src/main/proto/envoy/config/trace/v3/opentelemetry.proto b/src/main/proto/envoy/config/trace/v3/opentelemetry.proto deleted file mode 100644 index 5260d9b..0000000 --- a/src/main/proto/envoy/config/trace/v3/opentelemetry.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/config/core/v3/http_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "OpentelemetryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: OpenTelemetry tracer] - -// Configuration for the OpenTelemetry tracer. -// [#extension: envoy.tracers.opentelemetry] -// [#next-free-field: 7] -message OpenTelemetryConfig { - // The upstream gRPC cluster that will receive OTLP traces. - // Note that the tracer drops traces if the server does not read data fast enough. - // This field can be left empty to disable reporting traces to the gRPC service. - // Only one of ``grpc_service``, ``http_service`` may be used. - core.v3.GrpcService grpc_service = 1 - [(udpa.annotations.field_migrate).oneof_promotion = "otlp_exporter"]; - - // The upstream HTTP cluster that will receive OTLP traces. - // This field can be left empty to disable reporting traces to the HTTP service. - // Only one of ``grpc_service``, ``http_service`` may be used. - // - // .. note:: - // - // Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service - // does not support the :ref:`format specifier ` as used for - // :ref:`HTTP access logging `. - // The values configured are added as HTTP headers on the OTLP export request - // without any formatting applied. - core.v3.HttpService http_service = 3 - [(udpa.annotations.field_migrate).oneof_promotion = "otlp_exporter"]; - - // The name for the service. This will be populated in the ResourceSpan Resource attributes. - // If it is not provided, it will default to "unknown_service:envoy". - string service_name = 2; - - // An ordered list of resource detectors - // [#extension-category: envoy.tracers.opentelemetry.resource_detectors] - repeated core.v3.TypedExtensionConfig resource_detectors = 4; - - // Specifies the sampler to be used by the OpenTelemetry tracer. - // The configured sampler implements the Sampler interface defined by the OpenTelemetry specification. - // This field can be left empty. In this case, the default Envoy sampling decision is used. - // - // See: `OpenTelemetry sampler specification `_ - // [#extension-category: envoy.tracers.opentelemetry.samplers] - core.v3.TypedExtensionConfig sampler = 5; - - // Envoy caches the span in memory when the OpenTelemetry backend service is temporarily unavailable. - // This field specifies the maximum number of spans that can be cached. If not specified, the - // default is 1024. - google.protobuf.UInt32Value max_cache_size = 6; -} diff --git a/src/main/proto/envoy/config/trace/v3/service.proto b/src/main/proto/envoy/config/trace/v3/service.proto deleted file mode 100644 index 4cb8c44..0000000 --- a/src/main/proto/envoy/config/trace/v3/service.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "envoy/config/core/v3/grpc_service.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "ServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Trace Service] - -// Configuration structure. -message TraceServiceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v2.TraceServiceConfig"; - - // The upstream gRPC cluster that hosts the metrics service. - core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/trace/v3/skywalking.proto b/src/main/proto/envoy/config/trace/v3/skywalking.proto deleted file mode 100644 index 57872a0..0000000 --- a/src/main/proto/envoy/config/trace/v3/skywalking.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "envoy/config/core/v3/grpc_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "SkywalkingProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.tracers.skywalking.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SkyWalking tracer] - -// Configuration for the SkyWalking tracer. Please note that if SkyWalking tracer is used as the -// provider of tracing, then -// :ref:`spawn_upstream_span ` -// in the tracing config must be set to true to get the correct topology and tracing data. Moreover, SkyWalking -// Tracer does not support SkyWalking extension header (``sw8-x``) temporarily. -// [#extension: envoy.tracers.skywalking] -message SkyWalkingConfig { - // SkyWalking collector service. - core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; - - ClientConfig client_config = 2; -} - -// Client config for SkyWalking tracer. -message ClientConfig { - // Service name for SkyWalking tracer. If this field is empty, then local service cluster name - // that configured by :ref:`Bootstrap node ` - // message's :ref:`cluster ` field or command line - // option :option:`--service-cluster` will be used. If both this field and local service cluster - // name are empty, ``EnvoyProxy`` is used as the service name by default. - string service_name = 1; - - // Service instance name for SkyWalking tracer. If this field is empty, then local service node - // that configured by :ref:`Bootstrap node ` - // message's :ref:`id ` field or command line option - // :option:`--service-node` will be used. If both this field and local service node are empty, - // ``EnvoyProxy`` is used as the instance name by default. - string instance_name = 2; - - // Authentication token config for SkyWalking. SkyWalking can use token authentication to secure - // that monitoring application data can be trusted. In current version, Token is considered as a - // simple string. - // [#comment:TODO(wbpcode): Get backend token through the SDS API.] - oneof backend_token_specifier { - // Inline authentication token string. - string backend_token = 3 [(udpa.annotations.sensitive) = true]; - } - - // Envoy caches the segment in memory when the SkyWalking backend service is temporarily unavailable. - // This field specifies the maximum number of segments that can be cached. If not specified, the - // default is 1024. - google.protobuf.UInt32Value max_cache_size = 4; -} diff --git a/src/main/proto/envoy/config/trace/v3/trace.proto b/src/main/proto/envoy/config/trace/v3/trace.proto deleted file mode 100644 index 296c6bd..0000000 --- a/src/main/proto/envoy/config/trace/v3/trace.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import public "envoy/config/trace/v3/datadog.proto"; -import public "envoy/config/trace/v3/dynamic_ot.proto"; -import public "envoy/config/trace/v3/http_tracer.proto"; -import public "envoy/config/trace/v3/lightstep.proto"; -import public "envoy/config/trace/v3/opentelemetry.proto"; -import public "envoy/config/trace/v3/service.proto"; -import public "envoy/config/trace/v3/zipkin.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "TraceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; diff --git a/src/main/proto/envoy/config/trace/v3/xray.proto b/src/main/proto/envoy/config/trace/v3/xray.proto deleted file mode 100644 index 3ddd7a6..0000000 --- a/src/main/proto/envoy/config/trace/v3/xray.proto +++ /dev/null @@ -1,115 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "XrayProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.xray.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: AWS X-Ray Tracer Configuration] -// Configuration for AWS X-Ray tracer -// -// The X-Ray tracer will automatically attach :ref:`custom_tags ` as annotations to the span. (See: `Annotations `_.) -// -// AWS X-Ray trace annotations are also created by the tracing subsystem automatically based on metadata provided during creation of a span. -// -// An example X-Ray trace span that is generated by the envoy trace subsystem is as follows: -// -// .. code-block:: json -// -// { -// "Id": "1-6698980d-e829ae270ab34b69b488b098", -// "Duration": 0.016, -// "LimitExceeded": false, -// "Segments": -// [ -// { -// "Id": "15d65e5ced8dfe76", -// "Document": -// { -// "id": "15d65e5ced8dfe76", -// "name": "envoy-example", -// "start_time": 1721276429.410355, -// "trace_id": "1-6698980d-e829ae270ab34b69b488b098", -// "end_time": 1721276429.426068, -// "fault": true, -// "http": -// { -// "request": -// { -// "url": "http://example/path", -// "method": "GET", -// "user_agent": "curl/8.5.0", -// "client_ip": "127.0.0.1", -// "x_forwarded_for": false -// }, -// "response": -// { -// "status": 503, -// "content_length": 216 -// } -// }, -// "aws": {}, -// "annotations": -// { -// "response_flags": "UF", -// "component": "proxy", -// "upstream_cluster": "upstream_cluster", -// "annotation_from_custom_tag": "example", -// "http.protocol": "HTTP/1.1", -// "request_size": "0", -// "downstream_cluster": "-", -// "direction": "ingress", -// "upstream_cluster.name": "upstream_cluster" -// } -// } -// } -// ] -// } -// - -// [#extension: envoy.tracers.xray] -message XRayConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.trace.v2alpha.XRayConfig"; - - message SegmentFields { - // The type of AWS resource, e.g. "AWS::AppMesh::Proxy". - string origin = 1; - - // AWS resource metadata dictionary. - // See: `X-Ray Segment Document documentation `__ - google.protobuf.Struct aws = 2; - } - - // The UDP endpoint of the X-Ray Daemon where the spans will be sent. - // If this value is not set, the default value of 127.0.0.1:2000 will be used. - core.v3.SocketAddress daemon_endpoint = 1; - - // The name of the X-Ray segment. - string segment_name = 2 [(validate.rules).string = {min_len: 1}]; - - // The location of a local custom sampling rules JSON file. - // For an example of the sampling rules see: - // `X-Ray SDK documentation - // `_ - core.v3.DataSource sampling_rule_manifest = 3; - - // Optional custom fields to be added to each trace segment. - // see: `X-Ray Segment Document documentation - // `__ - SegmentFields segment_fields = 4; -} diff --git a/src/main/proto/envoy/config/trace/v3/zipkin.proto b/src/main/proto/envoy/config/trace/v3/zipkin.proto deleted file mode 100644 index 2364983..0000000 --- a/src/main/proto/envoy/config/trace/v3/zipkin.proto +++ /dev/null @@ -1,176 +0,0 @@ -syntax = "proto3"; - -package envoy.config.trace.v3; - -import "envoy/config/core/v3/http_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.config.trace.v3"; -option java_outer_classname = "ZipkinProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/trace/v3;tracev3"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.zipkin.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Zipkin tracer] - -// Configuration for the Zipkin tracer. -// [#extension: envoy.tracers.zipkin] -// [#next-free-field: 10] -message ZipkinConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.ZipkinConfig"; - - // Available trace context options for handling different trace header formats. - enum TraceContextOption { - // Use B3 headers only (default behavior). - USE_B3 = 0; - - // Enable B3 and W3C dual header support: - // - For downstream: Extract from B3 headers first, fallback to W3C traceparent if B3 is unavailable. - // - For upstream: Inject both B3 and W3C traceparent headers. - // When this option is NOT set, only B3 headers are used for both extraction and injection. - USE_B3_WITH_W3C_PROPAGATION = 1; - } - - // Available Zipkin collector endpoint versions. - enum CollectorEndpointVersion { - // Zipkin API v1, JSON over HTTP. - // [#comment: The default implementation of Zipkin client before this field is added was only v1 - // and the way user configure this was by not explicitly specifying the version. Consequently, - // before this is added, the corresponding Zipkin collector expected to receive v1 payload. - // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when - // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field, - // since in Zipkin realm this v1 version is considered to be not preferable anymore.] - DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 - [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; - - // Zipkin API v2, JSON over HTTP. - HTTP_JSON = 1; - - // Zipkin API v2, protobuf over HTTP. - HTTP_PROTO = 2; - - // [#not-implemented-hide:] - GRPC = 3; - } - - // The cluster manager cluster that hosts the Zipkin collectors. - // - // .. note:: - // This field will be deprecated in future releases in favor of - // :ref:`collector_service `. - // - // Either this field or ``collector_service`` must be specified. - string collector_cluster = 1; - - // The API endpoint of the Zipkin service where the spans will be sent. When - // using a standard Zipkin installation. - // - // .. note:: - // This field will be deprecated in future releases in favor of - // :ref:`collector_service `. - // - // Required when using ``collector_cluster``. - string collector_endpoint = 2; - - // Determines whether a 128bit trace id will be used when creating a new - // trace instance. The default value is false, which will result in a 64 bit trace id being used. - bool trace_id_128bit = 3; - - // Determines whether client and server spans will share the same span context. - // The default value is true. - google.protobuf.BoolValue shared_span_context = 4; - - // Determines the selected collector endpoint version. - CollectorEndpointVersion collector_endpoint_version = 5; - - // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors - // that require a specific hostname. Defaults to :ref:`collector_cluster ` above. - // - // .. note:: - // This field will be deprecated in future releases in favor of - // :ref:`collector_service `. - string collector_hostname = 6; - - // If this is set to true, then Envoy will be treated as an independent hop in trace chain. A complete span pair will be created for a single - // request. Server span will be created for the downstream request and client span will be created for the related upstream request. - // This should be set to true in the following cases: - // - // * The Envoy Proxy is used as gateway or ingress. - // * The Envoy Proxy is used as sidecar but inbound traffic capturing or outbound traffic capturing is disabled. - // * Any case that the :ref:`start_child_span of router ` is set to true. - // - // .. attention:: - // - // If this is set to true, then the - // :ref:`start_child_span of router ` - // SHOULD be set to true also to ensure the correctness of trace chain. - // - // Both this field and ``start_child_span`` are deprecated by the - // :ref:`spawn_upstream_span `. - // Please use that ``spawn_upstream_span`` field to control the span creation. - bool split_spans_for_request = 7 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Determines which trace context format to use for trace header extraction and propagation. - // This controls both downstream request header extraction and upstream request header injection. - // Here is the spec for W3C trace headers: https://www.w3.org/TR/trace-context/ - // The default value is USE_B3 to maintain backward compatibility. - TraceContextOption trace_context_option = 8; - - // HTTP service configuration for the Zipkin collector. - // When specified, this configuration takes precedence over the legacy fields: - // collector_cluster, collector_endpoint, and collector_hostname. - // This provides a complete HTTP service configuration including cluster, URI, timeout, and headers. - // If not specified, the legacy fields above will be used for backward compatibility. - // - // Required fields when using collector_service: - // - // * ``http_uri.cluster`` - Must be specified and non-empty - // * ``http_uri.uri`` - Must be specified and non-empty - // * ``http_uri.timeout`` - Optional - // - // Full URI Support with Automatic Parsing: - // - // The ``uri`` field supports both path-only and full URI formats: - // - // .. code-block:: yaml - // - // tracing: - // provider: - // name: envoy.tracers.zipkin - // typed_config: - // "@type": type.googleapis.com/envoy.config.trace.v3.ZipkinConfig - // collector_service: - // http_uri: - // # Full URI format - hostname and path are extracted automatically - // uri: "https://zipkin-collector.example.com/api/v2/spans" - // cluster: zipkin - // timeout: 5s - // request_headers_to_add: - // - header: - // key: "X-Custom-Token" - // value: "your-custom-token" - // - header: - // key: "X-Service-ID" - // value: "your-service-id" - // - // URI Parsing Behavior: - // - // * Full URI: ``"https://zipkin-collector.example.com/api/v2/spans"`` - // - // * Hostname: ``zipkin-collector.example.com`` (sets HTTP ``Host`` header) - // * Path: ``/api/v2/spans`` (sets HTTP request path) - // - // * Path only: ``"/api/v2/spans"`` - // - // * Hostname: Uses cluster name as fallback - // * Path: ``/api/v2/spans`` - core.v3.HttpService collector_service = 9; -} diff --git a/src/main/proto/envoy/config/transport_socket/alts/v2alpha/alts.proto b/src/main/proto/envoy/config/transport_socket/alts/v2alpha/alts.proto deleted file mode 100644 index 6ad5428..0000000 --- a/src/main/proto/envoy/config/transport_socket/alts/v2alpha/alts.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.config.transport_socket.alts.v2alpha; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.transport_socket.alts.v2alpha"; -option java_outer_classname = "AltsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/transport_socket/alts/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.alts.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: ALTS] -// [#extension: envoy.transport_sockets.alts] - -// Configuration for ALTS transport socket. This provides Google's ALTS protocol to Envoy. -// https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ -message Alts { - // The location of a handshaker service, this is usually 169.254.169.254:8080 - // on GCE. - string handshaker_service = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The acceptable service accounts from peer, peers not in the list will be rejected in the - // handshake validation step. If empty, no validation will be performed. - repeated string peer_service_accounts = 2; -} diff --git a/src/main/proto/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto b/src/main/proto/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto deleted file mode 100644 index 40efb3a..0000000 --- a/src/main/proto/envoy/config/transport_socket/raw_buffer/v2/raw_buffer.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.config.transport_socket.raw_buffer.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.transport_socket.raw_buffer.v2"; -option java_outer_classname = "RawBufferProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/transport_socket/raw_buffer/v2;raw_bufferv2"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.raw_buffer.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Raw Buffer] -// [#extension: envoy.transport_sockets.raw_buffer] - -// Configuration for raw buffer transport socket. -message RawBuffer { -} diff --git a/src/main/proto/envoy/config/transport_socket/tap/v2alpha/tap.proto b/src/main/proto/envoy/config/transport_socket/tap/v2alpha/tap.proto deleted file mode 100644 index 42b1107..0000000 --- a/src/main/proto/envoy/config/transport_socket/tap/v2alpha/tap.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.config.transport_socket.tap.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/config/common/tap/v2alpha/common.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.transport_socket.tap.v2alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/transport_socket/tap/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = - "envoy.extensions.transport_sockets.tap.v3"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tap] -// [#extension: envoy.transport_sockets.tap] - -// Configuration for tap transport socket. This wraps another transport socket, providing the -// ability to interpose and record in plain text any traffic that is surfaced to Envoy. -message Tap { - // Common configuration for the tap transport socket. - common.tap.v2alpha.CommonExtensionConfig common_config = 1 - [(validate.rules).message = {required: true}]; - - // The underlying transport socket being wrapped. - api.v2.core.TransportSocket transport_socket = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/config/upstream/local_address_selector/v3/default_local_address_selector.proto b/src/main/proto/envoy/config/upstream/local_address_selector/v3/default_local_address_selector.proto deleted file mode 100644 index 852689d..0000000 --- a/src/main/proto/envoy/config/upstream/local_address_selector/v3/default_local_address_selector.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.config.upstream.local_address_selector.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.config.upstream.local_address_selector.v3"; -option java_outer_classname = "DefaultLocalAddressSelectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/upstream/local_address_selector/v3;local_address_selectorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Default Local Address Selector] -// [#extension: envoy.upstream.local_address_selector.default_local_address_selector] - -// Default implementation of a local address selector. This implementation is -// used if :ref:`local_address_selector -// ` is not -// specified. -// This implementation supports the specification of only one address in -// :ref:`extra_source_addresses -// ` which -// is appended to the address specified in the -// :ref:`source_address ` -// field. The extra address should have a different IP version than the address in the -// ``source_address`` field. The address which has the same IP -// version with the target host's address IP version will be used as bind address. -// If there is no same IP version address found, the address in the ``source_address`` field will -// be returned. -message DefaultLocalAddressSelector { -} diff --git a/src/main/proto/envoy/data/accesslog/v2/accesslog.proto b/src/main/proto/envoy/data/accesslog/v2/accesslog.proto deleted file mode 100644 index 272445d..0000000 --- a/src/main/proto/envoy/data/accesslog/v2/accesslog.proto +++ /dev/null @@ -1,379 +0,0 @@ -syntax = "proto3"; - -package envoy.data.accesslog.v2; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.accesslog.v2"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/accesslog/v2;accesslogv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC access logs] -// Envoy access logs describe incoming interaction with Envoy over a fixed -// period of time, and typically cover a single request/response exchange, -// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). -// Access logs contain fields defined in protocol-specific protobuf messages. -// -// Except where explicitly declared otherwise, all fields describe -// *downstream* interaction between Envoy and a connected client. -// Fields describing *upstream* interaction will explicitly include ``upstream`` -// in their name. - -message TCPAccessLogEntry { - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - // Properties of the TCP connection. - ConnectionProperties connection_properties = 2; -} - -message HTTPAccessLogEntry { - // HTTP version - enum HTTPVersion { - PROTOCOL_UNSPECIFIED = 0; - HTTP10 = 1; - HTTP11 = 2; - HTTP2 = 3; - HTTP3 = 4; - } - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - HTTPVersion protocol_version = 2; - - // Description of the incoming HTTP request. - HTTPRequestProperties request = 3; - - // Description of the outgoing HTTP response. - HTTPResponseProperties response = 4; -} - -// Defines fields for a connection -message ConnectionProperties { - // Number of bytes received from downstream. - uint64 received_bytes = 1; - - // Number of bytes sent to downstream. - uint64 sent_bytes = 2; -} - -// Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] -message AccessLogCommon { - // [#not-implemented-hide:] - // This field indicates the rate at which this log entry was sampled. - // Valid range is (0.0, 1.0]. - double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; - - // This field is the remote/origin address on which the request from the user was received. - // Note: This may not be the physical peer. E.g, if the remote address is inferred from for - // example the x-forwarder-for header, proxy protocol, etc. - api.v2.core.Address downstream_remote_address = 2; - - // This field is the local/destination address on which the request from the user was received. - api.v2.core.Address downstream_local_address = 3; - - // If the connection is secure,S this field will contain TLS properties. - TLSProperties tls_properties = 4; - - // The time that Envoy started servicing this request. This is effectively the time that the first - // downstream byte is received. - google.protobuf.Timestamp start_time = 5; - - // Interval between the first downstream byte received and the last - // downstream byte received (i.e. time it takes to receive a request). - google.protobuf.Duration time_to_last_rx_byte = 6; - - // Interval between the first downstream byte received and the first upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_upstream_tx_byte = 7; - - // Interval between the first downstream byte received and the last upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_last_upstream_tx_byte = 8; - - // Interval between the first downstream byte received and the first upstream - // byte received (i.e. time it takes to start receiving a response). - google.protobuf.Duration time_to_first_upstream_rx_byte = 9; - - // Interval between the first downstream byte received and the last upstream - // byte received (i.e. time it takes to receive a complete response). - google.protobuf.Duration time_to_last_upstream_rx_byte = 10; - - // Interval between the first downstream byte received and the first downstream byte sent. - // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field - // due to filters. Additionally, the same caveats apply as documented in - // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_downstream_tx_byte = 11; - - // Interval between the first downstream byte received and the last downstream byte sent. - // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta - // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate - // time. In the current implementation it does not include kernel socket buffer time. In the - // current implementation it also does not include send window buffering inside the HTTP/2 codec. - // In the future it is likely that work will be done to make this duration more accurate. - google.protobuf.Duration time_to_last_downstream_tx_byte = 12; - - // The upstream remote/destination address that handles this exchange. This does not include - // retries. - api.v2.core.Address upstream_remote_address = 13; - - // The upstream local/origin address that handles this exchange. This does not include retries. - api.v2.core.Address upstream_local_address = 14; - - // The upstream cluster that *upstream_remote_address* belongs to. - string upstream_cluster = 15; - - // Flags indicating occurrences during request/response processing. - ResponseFlags response_flags = 16; - - // All metadata encountered during request processing, including endpoint - // selection. - // - // This can be used to associate IDs attached to the various configurations - // used to process this request with the access log entry. For example, a - // route created from a higher level forwarding rule with some ID can place - // that ID in this field and cross reference later. It can also be used to - // determine if a canary endpoint was used or not. - api.v2.core.Metadata metadata = 17; - - // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured - // upstream transport socket. Common TLS failures are in - // :ref:`TLS trouble shooting `. - string upstream_transport_failure_reason = 18; - - // The name of the route - string route_name = 19; - - // This field is the downstream direct remote address on which the request from the user was - // received. Note: This is always the physical peer, even if the remote address is inferred from - // for example the x-forwarder-for header, proxy protocol, etc. - api.v2.core.Address downstream_direct_remote_address = 20; - - // Map of filter state in stream info that have been configured to be logged. If the filter - // state serialized to any message other than `google.protobuf.Any` it will be packed into - // `google.protobuf.Any`. - map filter_state_objects = 21; -} - -// Flags indicating occurrences during request/response processing. -// [#next-free-field: 20] -message ResponseFlags { - message Unauthorized { - // Reasons why the request was unauthorized - enum Reason { - REASON_UNSPECIFIED = 0; - - // The request was denied by the external authorization service. - EXTERNAL_SERVICE = 1; - } - - Reason reason = 1; - } - - // Indicates local server healthcheck failed. - bool failed_local_healthcheck = 1; - - // Indicates there was no healthy upstream. - bool no_healthy_upstream = 2; - - // Indicates an there was an upstream request timeout. - bool upstream_request_timeout = 3; - - // Indicates local codec level reset was sent on the stream. - bool local_reset = 4; - - // Indicates remote codec level reset was received on the stream. - bool upstream_remote_reset = 5; - - // Indicates there was a local reset by a connection pool due to an initial connection failure. - bool upstream_connection_failure = 6; - - // Indicates the stream was reset due to an upstream connection termination. - bool upstream_connection_termination = 7; - - // Indicates the stream was reset because of a resource overflow. - bool upstream_overflow = 8; - - // Indicates no route was found for the request. - bool no_route_found = 9; - - // Indicates that the request was delayed before proxying. - bool delay_injected = 10; - - // Indicates that the request was aborted with an injected error code. - bool fault_injected = 11; - - // Indicates that the request was rate-limited locally. - bool rate_limited = 12; - - // Indicates if the request was deemed unauthorized and the reason for it. - Unauthorized unauthorized_details = 13; - - // Indicates that the request was rejected because there was an error in rate limit service. - bool rate_limit_service_error = 14; - - // Indicates the stream was reset due to a downstream connection termination. - bool downstream_connection_termination = 15; - - // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. - bool upstream_retry_limit_exceeded = 16; - - // Indicates that the stream idle timeout was hit, resulting in a downstream 408. - bool stream_idle_timeout = 17; - - // Indicates that the request was rejected because an envoy request header failed strict - // validation. - bool invalid_envoy_request_headers = 18; - - // Indicates there was an HTTP protocol error on the downstream request. - bool downstream_protocol_error = 19; -} - -// Properties of a negotiated TLS connection. -// [#next-free-field: 7] -message TLSProperties { - enum TLSVersion { - VERSION_UNSPECIFIED = 0; - TLSv1 = 1; - TLSv1_1 = 2; - TLSv1_2 = 3; - TLSv1_3 = 4; - } - - message CertificateProperties { - message SubjectAltName { - oneof san { - string uri = 1; - - // [#not-implemented-hide:] - string dns = 2; - } - } - - // SANs present in the certificate. - repeated SubjectAltName subject_alt_name = 1; - - // The subject field of the certificate. - string subject = 2; - } - - // Version of TLS that was negotiated. - TLSVersion tls_version = 1; - - // TLS cipher suite negotiated during handshake. The value is a - // four-digit hex code defined by the IANA TLS Cipher Suite Registry - // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). - // - // Here it is expressed as an integer. - google.protobuf.UInt32Value tls_cipher_suite = 2; - - // SNI hostname from handshake. - string tls_sni_hostname = 3; - - // Properties of the local certificate used to negotiate TLS. - CertificateProperties local_certificate_properties = 4; - - // Properties of the peer certificate used to negotiate TLS. - CertificateProperties peer_certificate_properties = 5; - - // The TLS session ID. - string tls_session_id = 6; -} - -// [#next-free-field: 14] -message HTTPRequestProperties { - // The request method (RFC 7231/2616). - api.v2.core.RequestMethod request_method = 1 [(validate.rules).enum = {defined_only: true}]; - - // The scheme portion of the incoming request URI. - string scheme = 2; - - // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. - string authority = 3; - - // The port of the incoming request URI - // (unused currently, as port is composed onto authority). - google.protobuf.UInt32Value port = 4; - - // The path portion from the incoming request URI. - string path = 5; - - // Value of the ``User-Agent`` request header. - string user_agent = 6; - - // Value of the ``Referer`` request header. - string referer = 7; - - // Value of the ``X-Forwarded-For`` request header. - string forwarded_for = 8; - - // Value of the ``X-Request-Id`` request header - // - // This header is used by Envoy to uniquely identify a request. - // It will be generated for all external requests and internal requests that - // do not already have a request ID. - string request_id = 9; - - // Value of the ``X-Envoy-Original-Path`` request header. - string original_path = 10; - - // Size of the HTTP request headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_headers_bytes = 11; - - // Size of the HTTP request body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_body_bytes = 12; - - // Map of additional headers that have been configured to be logged. - map request_headers = 13; -} - -// [#next-free-field: 7] -message HTTPResponseProperties { - // The HTTP response code returned by Envoy. - google.protobuf.UInt32Value response_code = 1; - - // Size of the HTTP response headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_headers_bytes = 2; - - // Size of the HTTP response body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_body_bytes = 3; - - // Map of additional headers configured to be logged. - map response_headers = 4; - - // Map of trailers configured to be logged. - map response_trailers = 5; - - // The HTTP response code details. - string response_code_details = 6; -} diff --git a/src/main/proto/envoy/data/accesslog/v3/accesslog.proto b/src/main/proto/envoy/data/accesslog/v3/accesslog.proto deleted file mode 100644 index da029b7..0000000 --- a/src/main/proto/envoy/data/accesslog/v3/accesslog.proto +++ /dev/null @@ -1,547 +0,0 @@ -syntax = "proto3"; - -package envoy.data.accesslog.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.accesslog.v3"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/accesslog/v3;accesslogv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC access logs] -// Envoy access logs describe incoming interaction with Envoy over a fixed -// period of time, and typically cover a single request/response exchange, -// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). -// Access logs contain fields defined in protocol-specific protobuf messages. -// -// Except where explicitly declared otherwise, all fields describe -// *downstream* interaction between Envoy and a connected client. -// Fields describing *upstream* interaction will explicitly include ``upstream`` -// in their name. - -enum AccessLogType { - NotSet = 0; - TcpUpstreamConnected = 1; - TcpPeriodic = 2; - TcpConnectionEnd = 3; - DownstreamStart = 4; - DownstreamPeriodic = 5; - DownstreamEnd = 6; - UpstreamPoolReady = 7; - UpstreamPeriodic = 8; - UpstreamEnd = 9; - DownstreamTunnelSuccessfullyEstablished = 10; - UdpTunnelUpstreamConnected = 11; - UdpPeriodic = 12; - UdpSessionEnd = 13; -} - -message TCPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.TCPAccessLogEntry"; - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - // Properties of the TCP connection. - ConnectionProperties connection_properties = 2; -} - -message HTTPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.HTTPAccessLogEntry"; - - // HTTP version - enum HTTPVersion { - PROTOCOL_UNSPECIFIED = 0; - HTTP10 = 1; - HTTP11 = 2; - HTTP2 = 3; - HTTP3 = 4; - } - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - HTTPVersion protocol_version = 2; - - // Description of the incoming HTTP request. - HTTPRequestProperties request = 3; - - // Description of the outgoing HTTP response. - HTTPResponseProperties response = 4; -} - -// Defines fields for a connection -message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.ConnectionProperties"; - - // Number of bytes received from downstream. - uint64 received_bytes = 1; - - // Number of bytes sent to downstream. - uint64 sent_bytes = 2; -} - -// Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 34] -message AccessLogCommon { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.AccessLogCommon"; - - // [#not-implemented-hide:] - // This field indicates the rate at which this log entry was sampled. - // Valid range is (0.0, 1.0]. - double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; - - // This field is the remote/origin address on which the request from the user was received. - // - // .. note:: - // This may not be the actual peer address. For example, it might be derived from headers like ``x-forwarded-for``, - // the proxy protocol, or similar sources. - config.core.v3.Address downstream_remote_address = 2; - - // This field is the local/destination address on which the request from the user was received. - config.core.v3.Address downstream_local_address = 3; - - // If the connection is secure, this field will contain TLS properties. - TLSProperties tls_properties = 4; - - // The time that Envoy started servicing this request. This is effectively the time that the first - // downstream byte is received. - google.protobuf.Timestamp start_time = 5; - - // Interval between the first downstream byte received and the last - // downstream byte received (i.e. time it takes to receive a request). - google.protobuf.Duration time_to_last_rx_byte = 6; - - // Interval between the first downstream byte received and the first upstream byte sent. There may - // be considerable delta between ``time_to_last_rx_byte`` and this value due to filters. - // Additionally, the same caveats apply as documented in ``time_to_last_downstream_tx_byte`` about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_upstream_tx_byte = 7; - - // Interval between the first downstream byte received and the last upstream byte sent. There may - // by considerable delta between ``time_to_last_rx_byte`` and this value due to filters. - // Additionally, the same caveats apply as documented in ``time_to_last_downstream_tx_byte`` about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_last_upstream_tx_byte = 8; - - // Interval between the first downstream byte received and the first upstream - // byte received (i.e. time it takes to start receiving a response). - google.protobuf.Duration time_to_first_upstream_rx_byte = 9; - - // Interval between the first downstream byte received and the last upstream - // byte received (i.e. time it takes to receive a complete response). - google.protobuf.Duration time_to_last_upstream_rx_byte = 10; - - // Interval between the first downstream byte received and the first downstream byte sent. - // There may be a considerable delta between the ``time_to_first_upstream_rx_byte`` and this field - // due to filters. Additionally, the same caveats apply as documented in - // ``time_to_last_downstream_tx_byte`` about not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_downstream_tx_byte = 11; - - // Interval between the first downstream byte received and the last downstream byte sent. - // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta - // between ``time_to_last_upstream_rx_byte`` and this field. Note also that this is an approximate - // time. In the current implementation it does not include kernel socket buffer time. In the - // current implementation it also does not include send window buffering inside the HTTP/2 codec. - // In the future it is likely that work will be done to make this duration more accurate. - google.protobuf.Duration time_to_last_downstream_tx_byte = 12; - - // The upstream remote/destination address that handles this exchange. This does not include - // retries. - config.core.v3.Address upstream_remote_address = 13; - - // The upstream local/origin address that handles this exchange. This does not include retries. - config.core.v3.Address upstream_local_address = 14; - - // The upstream cluster that ``upstream_remote_address`` belongs to. - string upstream_cluster = 15; - - // Flags indicating occurrences during request/response processing. - ResponseFlags response_flags = 16; - - // All metadata encountered during request processing, including endpoint - // selection. - // - // This can be used to associate IDs attached to the various configurations - // used to process this request with the access log entry. For example, a - // route created from a higher level forwarding rule with some ID can place - // that ID in this field and cross reference later. It can also be used to - // determine if a canary endpoint was used or not. - config.core.v3.Metadata metadata = 17; - - // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured - // upstream transport socket. Common TLS failures are in - // :ref:`TLS troubleshooting `. - string upstream_transport_failure_reason = 18; - - // The name of the route - string route_name = 19; - - // This field is the downstream direct remote address on which the request from the user was - // received. Note: This is always the physical peer, even if the remote address is inferred from - // for example the x-forwarder-for header, proxy protocol, etc. - config.core.v3.Address downstream_direct_remote_address = 20; - - // Map of filter state in stream info that have been configured to be logged. If the filter - // state serialized to any message other than ``google.protobuf.Any`` it will be packed into - // ``google.protobuf.Any``. - map filter_state_objects = 21; - - // A list of custom tags, which annotate logs with additional information. - // To configure this value, see the documentation for - // :ref:`custom_tags `. - map custom_tags = 22; - - // For HTTP: Total duration in milliseconds of the request from the start time to the last byte out. - // For TCP: Total duration in milliseconds of the downstream connection. - // This is the total duration of the request (i.e., when the request's ActiveStream is destroyed) - // and may be longer than ``time_to_last_downstream_tx_byte``. - google.protobuf.Duration duration = 23; - - // For HTTP: Number of times the request is attempted upstream. Note that the field is omitted when the request was never attempted upstream. - // For TCP: Number of times the connection request is attempted upstream. Note that the field is omitted when the connect request was never attempted upstream. - uint32 upstream_request_attempt_count = 24; - - // Connection termination details may provide additional information about why the connection was terminated by Envoy for L4 reasons. - string connection_termination_details = 25; - - // Optional unique id of stream (TCP connection, long-live HTTP2 stream, HTTP request) for logging and tracing. - // This could be any format string that could be used to identify one stream. - string stream_id = 26; - - // Indicates whether this log entry is the final entry (flushed after the stream completed) or an intermediate entry - // (flushed periodically during the stream). - // - // For long-lived streams (e.g., TCP connections or long-lived HTTP/2 streams), there may be multiple intermediate - // entries and only one final entry. - // - // If needed, a unique identifier (see :ref:`stream_id `) - // can be used to correlate all intermediate and final log entries for the same stream. - // - // .. attention:: - // - // This field is deprecated in favor of ``access_log_type``, which provides a clearer indication of the log entry - // type. - bool intermediate_log_entry = 27 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // If downstream connection in listener failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured downstream - // transport socket. Common TLS failures are in :ref:`TLS troubleshooting `. - string downstream_transport_failure_reason = 28; - - // For HTTP: Total number of bytes sent to the downstream by the http stream. - // For TCP: Total number of bytes sent to the downstream by the :ref:`TCP Proxy `. - uint64 downstream_wire_bytes_sent = 29; - - // For HTTP: Total number of bytes received from the downstream by the http stream. Envoy over counts sizes of received HTTP/1.1 pipelined requests by adding up bytes of requests in the pipeline to the one currently being processed. - // For TCP: Total number of bytes received from the downstream by the :ref:`TCP Proxy `. - uint64 downstream_wire_bytes_received = 30; - - // For HTTP: Total number of bytes sent to the upstream by the http stream. This value accumulates during upstream retries. - // For TCP: Total number of bytes sent to the upstream by the :ref:`TCP Proxy `. - uint64 upstream_wire_bytes_sent = 31; - - // For HTTP: Total number of bytes received from the upstream by the http stream. - // For TCP: Total number of bytes sent to the upstream by the :ref:`TCP Proxy `. - uint64 upstream_wire_bytes_received = 32; - - // The type of the access log, which indicates when the log was recorded. - // See :ref:`ACCESS_LOG_TYPE ` for the available values. - // In case the access log was recorded by a flow which does not correspond to one of the supported - // values, then the default value will be ``NotSet``. - // For more information about how access log behaves and when it is being recorded, - // please refer to :ref:`access logging `. - AccessLogType access_log_type = 33; -} - -// Flags indicating occurrences during request/response processing. -// [#next-free-field: 29] -message ResponseFlags { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.ResponseFlags"; - - message Unauthorized { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.ResponseFlags.Unauthorized"; - - // Reasons why the request was unauthorized - enum Reason { - REASON_UNSPECIFIED = 0; - - // The request was denied by the external authorization service. - EXTERNAL_SERVICE = 1; - } - - Reason reason = 1; - } - - // Indicates local server healthcheck failed. - bool failed_local_healthcheck = 1; - - // Indicates there was no healthy upstream. - bool no_healthy_upstream = 2; - - // Indicates there was an upstream request timeout. - bool upstream_request_timeout = 3; - - // Indicates local codec level reset was sent on the stream. - bool local_reset = 4; - - // Indicates remote codec level reset was received on the stream. - bool upstream_remote_reset = 5; - - // Indicates there was a local reset by a connection pool due to an initial connection failure. - bool upstream_connection_failure = 6; - - // Indicates the stream was reset due to an upstream connection termination. - bool upstream_connection_termination = 7; - - // Indicates the stream was reset because of a resource overflow. - bool upstream_overflow = 8; - - // Indicates no route was found for the request. - bool no_route_found = 9; - - // Indicates that the request was delayed before proxying. - bool delay_injected = 10; - - // Indicates that the request was aborted with an injected error code. - bool fault_injected = 11; - - // Indicates that the request was rate-limited locally. - bool rate_limited = 12; - - // Indicates if the request was deemed unauthorized and the reason for it. - Unauthorized unauthorized_details = 13; - - // Indicates that the request was rejected because there was an error in rate limit service. - bool rate_limit_service_error = 14; - - // Indicates the stream was reset due to a downstream connection termination. - bool downstream_connection_termination = 15; - - // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. - bool upstream_retry_limit_exceeded = 16; - - // Indicates that the stream idle timeout was hit, resulting in a downstream 408. - bool stream_idle_timeout = 17; - - // Indicates that the request was rejected because an envoy request header failed strict - // validation. - bool invalid_envoy_request_headers = 18; - - // Indicates there was an HTTP protocol error on the downstream request. - bool downstream_protocol_error = 19; - - // Indicates there was a max stream duration reached on the upstream request. - bool upstream_max_stream_duration_reached = 20; - - // Indicates the response was served from a cache filter. - bool response_from_cache_filter = 21; - - // Indicates that a filter configuration is not available. - bool no_filter_config_found = 22; - - // Indicates that the request or connection exceeded the downstream connection duration. - bool duration_timeout = 23; - - // Indicates there was an HTTP protocol error in the upstream response. - bool upstream_protocol_error = 24; - - // Indicates no cluster was found for the request. - bool no_cluster_found = 25; - - // Indicates overload manager terminated the request. - bool overload_manager = 26; - - // Indicates a DNS resolution failed. - bool dns_resolution_failure = 27; - - // Indicates a downstream remote codec level reset was received on the stream - bool downstream_remote_reset = 28; -} - -// Properties of a negotiated TLS connection. -// [#next-free-field: 8] -message TLSProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.TLSProperties"; - - enum TLSVersion { - VERSION_UNSPECIFIED = 0; - TLSv1 = 1; - TLSv1_1 = 2; - TLSv1_2 = 3; - TLSv1_3 = 4; - } - - message CertificateProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.TLSProperties.CertificateProperties"; - - message SubjectAltName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.TLSProperties.CertificateProperties.SubjectAltName"; - - oneof san { - string uri = 1; - - // [#not-implemented-hide:] - string dns = 2; - } - } - - // SANs present in the certificate. - repeated SubjectAltName subject_alt_name = 1; - - // The subject field of the certificate. - string subject = 2; - - // The issuer field of the certificate. - string issuer = 3; - } - - // Version of TLS that was negotiated. - TLSVersion tls_version = 1; - - // TLS cipher suite negotiated during handshake. The value is a - // four-digit hex code defined by the IANA TLS Cipher Suite Registry - // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). - // - // Here it is expressed as an integer. - google.protobuf.UInt32Value tls_cipher_suite = 2; - - // SNI hostname from handshake. - string tls_sni_hostname = 3; - - // Properties of the local certificate used to negotiate TLS. - CertificateProperties local_certificate_properties = 4; - - // Properties of the peer certificate used to negotiate TLS. - CertificateProperties peer_certificate_properties = 5; - - // The TLS session ID. - string tls_session_id = 6; - - // The ``JA3`` fingerprint when ``JA3`` fingerprinting is enabled. - string ja3_fingerprint = 7; -} - -// [#next-free-field: 16] -message HTTPRequestProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.HTTPRequestProperties"; - - // The request method (RFC 7231/2616). - config.core.v3.RequestMethod request_method = 1 [(validate.rules).enum = {defined_only: true}]; - - // The scheme portion of the incoming request URI. - string scheme = 2; - - // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. - string authority = 3; - - // The port of the incoming request URI - // (unused currently, as port is composed onto authority). - google.protobuf.UInt32Value port = 4; - - // The path portion from the incoming request URI. - string path = 5; - - // Value of the ``User-Agent`` request header. - string user_agent = 6; - - // Value of the ``Referer`` request header. - string referer = 7; - - // Value of the ``X-Forwarded-For`` request header. - string forwarded_for = 8; - - // Value of the ``X-Request-Id`` request header - // - // This header is used by Envoy to uniquely identify a request. - // It will be generated for all external requests and internal requests that - // do not already have a request ID. - string request_id = 9; - - // Value of the ``x-envoy-original-path`` request header. - string original_path = 10; - - // Size of the HTTP request headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_headers_bytes = 11; - - // Size of the HTTP request body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_body_bytes = 12; - - // Map of additional headers that have been configured to be logged. - map request_headers = 13; - - // Number of header bytes sent to the upstream by the http stream, including protocol overhead. - // - // This value accumulates during upstream retries. - uint64 upstream_header_bytes_sent = 14; - - // Number of header bytes received from the downstream by the http stream, including protocol overhead. - uint64 downstream_header_bytes_received = 15; -} - -// [#next-free-field: 9] -message HTTPResponseProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v2.HTTPResponseProperties"; - - // The HTTP response code returned by Envoy. - google.protobuf.UInt32Value response_code = 1; - - // Size of the HTTP response headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include protocol overhead or overhead from framing or encoding at other networking layers. - uint64 response_headers_bytes = 2; - - // Size of the HTTP response body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_body_bytes = 3; - - // Map of additional headers configured to be logged. - map response_headers = 4; - - // Map of trailers configured to be logged. - map response_trailers = 5; - - // The HTTP response code details. - string response_code_details = 6; - - // Number of header bytes received from the upstream by the http stream, including protocol overhead. - uint64 upstream_header_bytes_received = 7; - - // Number of header bytes sent to the downstream by the http stream, including protocol overhead. - uint64 downstream_header_bytes_sent = 8; -} diff --git a/src/main/proto/envoy/data/cluster/v2alpha/outlier_detection_event.proto b/src/main/proto/envoy/data/cluster/v2alpha/outlier_detection_event.proto deleted file mode 100644 index 2ede4c4..0000000 --- a/src/main/proto/envoy/data/cluster/v2alpha/outlier_detection_event.proto +++ /dev/null @@ -1,136 +0,0 @@ -syntax = "proto3"; - -package envoy.data.cluster.v2alpha; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.cluster.v2alpha"; -option java_outer_classname = "OutlierDetectionEventProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/cluster/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.data.cluster.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Outlier detection logging events] -// :ref:`Outlier detection logging `. - -// Type of ejection that took place -enum OutlierEjectionType { - // In case upstream host returns certain number of consecutive 5xx. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all type of errors are treated as HTTP 5xx errors. - // See :ref:`Cluster outlier detection ` documentation for - // details. - CONSECUTIVE_5XX = 0; - - // In case upstream host returns certain number of consecutive gateway errors - CONSECUTIVE_GATEWAY_FAILURE = 1; - - // Runs over aggregated success rate statistics from every host in cluster - // and selects hosts for which ratio of successful replies deviates from other hosts - // in the cluster. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is *false*, all errors (externally and locally generated) are used to calculate success rate - // statistics. See :ref:`Cluster outlier detection ` - // documentation for details. - SUCCESS_RATE = 2; - - // Consecutive local origin failures: Connection failures, resets, timeouts, etc - // This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is set to *true*. - // See :ref:`Cluster outlier detection ` documentation for - CONSECUTIVE_LOCAL_ORIGIN_FAILURE = 3; - - // Runs over aggregated success rate statistics for local origin failures - // for all hosts in the cluster and selects hosts for which success rate deviates from other - // hosts in the cluster. This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is set to *true*. - // See :ref:`Cluster outlier detection ` documentation for - SUCCESS_RATE_LOCAL_ORIGIN = 4; - - // Runs over aggregated success rate statistics from every host in cluster and selects hosts for - // which ratio of failed replies is above configured value. - FAILURE_PERCENTAGE = 5; - - // Runs over aggregated success rate statistics for local origin failures from every host in - // cluster and selects hosts for which ratio of failed replies is above configured value. - FAILURE_PERCENTAGE_LOCAL_ORIGIN = 6; -} - -// Represents possible action applied to upstream host -enum Action { - // In case host was excluded from service - EJECT = 0; - - // In case host was brought back into service - UNEJECT = 1; -} - -// [#next-free-field: 12] -message OutlierDetectionEvent { - // In case of eject represents type of ejection that took place. - OutlierEjectionType type = 1 [(validate.rules).enum = {defined_only: true}]; - - // Timestamp for event. - google.protobuf.Timestamp timestamp = 2; - - // The time in seconds since the last action (either an ejection or unejection) took place. - google.protobuf.UInt64Value secs_since_last_action = 3; - - // The :ref:`cluster ` that owns the ejected host. - string cluster_name = 4 [(validate.rules).string = {min_bytes: 1}]; - - // The URL of the ejected host. E.g., ``tcp://1.2.3.4:80``. - string upstream_url = 5 [(validate.rules).string = {min_bytes: 1}]; - - // The action that took place. - Action action = 6 [(validate.rules).enum = {defined_only: true}]; - - // If ``action`` is ``eject``, specifies the number of times the host has been ejected (local to - // that Envoy and gets reset if the host gets removed from the upstream cluster for any reason and - // then re-added). - uint32 num_ejections = 7; - - // If ``action`` is ``eject``, specifies if the ejection was enforced. ``true`` means the host was - // ejected. ``false`` means the event was logged but the host was not actually ejected. - bool enforced = 8; - - oneof event { - option (validate.required) = true; - - OutlierEjectSuccessRate eject_success_rate_event = 9; - - OutlierEjectConsecutive eject_consecutive_event = 10; - - OutlierEjectFailurePercentage eject_failure_percentage_event = 11; - } -} - -message OutlierEjectSuccessRate { - // Host’s success rate at the time of the ejection event on a 0-100 range. - uint32 host_success_rate = 1 [(validate.rules).uint32 = {lte: 100}]; - - // Average success rate of the hosts in the cluster at the time of the ejection event on a 0-100 - // range. - uint32 cluster_average_success_rate = 2 [(validate.rules).uint32 = {lte: 100}]; - - // Success rate ejection threshold at the time of the ejection event. - uint32 cluster_success_rate_ejection_threshold = 3 [(validate.rules).uint32 = {lte: 100}]; -} - -message OutlierEjectConsecutive { -} - -message OutlierEjectFailurePercentage { - // Host's success rate at the time of the ejection event on a 0-100 range. - uint32 host_success_rate = 1 [(validate.rules).uint32 = {lte: 100}]; -} diff --git a/src/main/proto/envoy/data/cluster/v3/outlier_detection_event.proto b/src/main/proto/envoy/data/cluster/v3/outlier_detection_event.proto deleted file mode 100644 index fb5e28f..0000000 --- a/src/main/proto/envoy/data/cluster/v3/outlier_detection_event.proto +++ /dev/null @@ -1,146 +0,0 @@ -syntax = "proto3"; - -package envoy.data.cluster.v3; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.cluster.v3"; -option java_outer_classname = "OutlierDetectionEventProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/cluster/v3;clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Outlier detection logging events] -// :ref:`Outlier detection logging `. - -// Type of ejection that took place -enum OutlierEjectionType { - // In case upstream host returns certain number of consecutive 5xx. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is ``false``, all type of errors are treated as HTTP 5xx errors. - // See :ref:`Cluster outlier detection ` documentation for - // details. - CONSECUTIVE_5XX = 0; - - // In case upstream host returns certain number of consecutive gateway errors - CONSECUTIVE_GATEWAY_FAILURE = 1; - - // Runs over aggregated success rate statistics from every host in cluster - // and selects hosts for which ratio of successful replies deviates from other hosts - // in the cluster. - // If - // :ref:`outlier_detection.split_external_local_origin_errors` - // is ``false``, all errors (externally and locally generated) are used to calculate success rate - // statistics. See :ref:`Cluster outlier detection ` - // documentation for details. - SUCCESS_RATE = 2; - - // Consecutive local origin failures: Connection failures, resets, timeouts, etc - // This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is set to ``true``. - // See :ref:`Cluster outlier detection ` documentation for - CONSECUTIVE_LOCAL_ORIGIN_FAILURE = 3; - - // Runs over aggregated success rate statistics for local origin failures - // for all hosts in the cluster and selects hosts for which success rate deviates from other - // hosts in the cluster. This type of ejection happens only when - // :ref:`outlier_detection.split_external_local_origin_errors` - // is set to ``true``. - // See :ref:`Cluster outlier detection ` documentation for - SUCCESS_RATE_LOCAL_ORIGIN = 4; - - // Runs over aggregated success rate statistics from every host in cluster and selects hosts for - // which ratio of failed replies is above configured value. - FAILURE_PERCENTAGE = 5; - - // Runs over aggregated success rate statistics for local origin failures from every host in - // cluster and selects hosts for which ratio of failed replies is above configured value. - FAILURE_PERCENTAGE_LOCAL_ORIGIN = 6; -} - -// Represents possible action applied to upstream host -enum Action { - // In case host was excluded from service - EJECT = 0; - - // In case host was brought back into service - UNEJECT = 1; -} - -// [#next-free-field: 12] -message OutlierDetectionEvent { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.cluster.v2alpha.OutlierDetectionEvent"; - - // In case of eject represents type of ejection that took place. - OutlierEjectionType type = 1 [(validate.rules).enum = {defined_only: true}]; - - // Timestamp for event. - google.protobuf.Timestamp timestamp = 2; - - // The time in seconds since the last action (either an ejection or unejection) took place. - google.protobuf.UInt64Value secs_since_last_action = 3; - - // The :ref:`cluster ` that owns the ejected host. - string cluster_name = 4 [(validate.rules).string = {min_len: 1}]; - - // The URL of the ejected host. E.g., ``tcp://1.2.3.4:80``. - string upstream_url = 5 [(validate.rules).string = {min_len: 1}]; - - // The action that took place. - Action action = 6 [(validate.rules).enum = {defined_only: true}]; - - // If ``action`` is ``eject``, specifies the number of times the host has been ejected (local to - // that Envoy and gets reset if the host gets removed from the upstream cluster for any reason and - // then re-added). - uint32 num_ejections = 7; - - // If ``action`` is ``eject``, specifies if the ejection was enforced. ``true`` means the host was - // ejected. ``false`` means the event was logged but the host was not actually ejected. - bool enforced = 8; - - oneof event { - option (validate.required) = true; - - OutlierEjectSuccessRate eject_success_rate_event = 9; - - OutlierEjectConsecutive eject_consecutive_event = 10; - - OutlierEjectFailurePercentage eject_failure_percentage_event = 11; - } -} - -message OutlierEjectSuccessRate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.cluster.v2alpha.OutlierEjectSuccessRate"; - - // Host’s success rate at the time of the ejection event on a 0-100 range. - uint32 host_success_rate = 1 [(validate.rules).uint32 = {lte: 100}]; - - // Average success rate of the hosts in the cluster at the time of the ejection event on a 0-100 - // range. - uint32 cluster_average_success_rate = 2 [(validate.rules).uint32 = {lte: 100}]; - - // Success rate ejection threshold at the time of the ejection event. - uint32 cluster_success_rate_ejection_threshold = 3 [(validate.rules).uint32 = {lte: 100}]; -} - -message OutlierEjectConsecutive { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.cluster.v2alpha.OutlierEjectConsecutive"; -} - -message OutlierEjectFailurePercentage { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.cluster.v2alpha.OutlierEjectFailurePercentage"; - - // Host's success rate at the time of the ejection event on a 0-100 range. - uint32 host_success_rate = 1 [(validate.rules).uint32 = {lte: 100}]; -} diff --git a/src/main/proto/envoy/data/core/v2alpha/health_check_event.proto b/src/main/proto/envoy/data/core/v2alpha/health_check_event.proto deleted file mode 100644 index ac6155f..0000000 --- a/src/main/proto/envoy/data/core/v2alpha/health_check_event.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; - -package envoy.data.core.v2alpha; - -import "envoy/api/v2/core/address.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.core.v2alpha"; -option java_outer_classname = "HealthCheckEventProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/core/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Health check logging events] -// :ref:`Health check logging `. - -enum HealthCheckFailureType { - ACTIVE = 0; - PASSIVE = 1; - NETWORK = 2; -} - -enum HealthCheckerType { - HTTP = 0; - TCP = 1; - GRPC = 2; - REDIS = 3; -} - -// [#next-free-field: 10] -message HealthCheckEvent { - HealthCheckerType health_checker_type = 1 [(validate.rules).enum = {defined_only: true}]; - - api.v2.core.Address host = 2; - - string cluster_name = 3 [(validate.rules).string = {min_bytes: 1}]; - - oneof event { - option (validate.required) = true; - - // Host ejection. - HealthCheckEjectUnhealthy eject_unhealthy_event = 4; - - // Host addition. - HealthCheckAddHealthy add_healthy_event = 5; - - // Host failure. - HealthCheckFailure health_check_failure_event = 7; - - // Healthy host became degraded. - DegradedHealthyHost degraded_healthy_host = 8; - - // A degraded host returned to being healthy. - NoLongerDegradedHost no_longer_degraded_host = 9; - } - - // Timestamp for event. - google.protobuf.Timestamp timestamp = 6; -} - -message HealthCheckEjectUnhealthy { - // The type of failure that caused this ejection. - HealthCheckFailureType failure_type = 1 [(validate.rules).enum = {defined_only: true}]; -} - -message HealthCheckAddHealthy { - // Whether this addition is the result of the first ever health check on a host, in which case - // the configured :ref:`healthy threshold ` - // is bypassed and the host is immediately added. - bool first_check = 1; -} - -message HealthCheckFailure { - // The type of failure that caused this event. - HealthCheckFailureType failure_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // Whether this event is the result of the first ever health check on a host. - bool first_check = 2; -} - -message DegradedHealthyHost { -} - -message NoLongerDegradedHost { -} diff --git a/src/main/proto/envoy/data/core/v3/health_check_event.proto b/src/main/proto/envoy/data/core/v3/health_check_event.proto deleted file mode 100644 index 2f8c32d..0000000 --- a/src/main/proto/envoy/data/core/v3/health_check_event.proto +++ /dev/null @@ -1,124 +0,0 @@ -syntax = "proto3"; - -package envoy.data.core.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.core.v3"; -option java_outer_classname = "HealthCheckEventProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Health check logging events] -// :ref:`Health check logging `. - -enum HealthCheckFailureType { - ACTIVE = 0; - PASSIVE = 1; - NETWORK = 2; - NETWORK_TIMEOUT = 3; -} - -enum HealthCheckerType { - HTTP = 0; - TCP = 1; - GRPC = 2; - REDIS = 3; - THRIFT = 4; -} - -// [#next-free-field: 13] -message HealthCheckEvent { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.core.v2alpha.HealthCheckEvent"; - - HealthCheckerType health_checker_type = 1 [(validate.rules).enum = {defined_only: true}]; - - config.core.v3.Address host = 2; - - string cluster_name = 3 [(validate.rules).string = {min_len: 1}]; - - oneof event { - option (validate.required) = true; - - // Host ejection. - HealthCheckEjectUnhealthy eject_unhealthy_event = 4; - - // Host addition. - HealthCheckAddHealthy add_healthy_event = 5; - - // A health check was successful. Note: a host will be considered healthy either if it is - // the first ever health check, or if the healthy threshold is reached. This kind of event - // indicate that a health check was successful, but does not indicates that the host is - // considered healthy. A host is considered healthy if HealthCheckAddHealthy kind of event is sent. - HealthCheckSuccessful successful_health_check_event = 12; - - // Host failure. - HealthCheckFailure health_check_failure_event = 7; - - // Healthy host became degraded. - DegradedHealthyHost degraded_healthy_host = 8; - - // A degraded host returned to being healthy. - NoLongerDegradedHost no_longer_degraded_host = 9; - } - - // Timestamp for event. - google.protobuf.Timestamp timestamp = 6; - - // Host metadata - config.core.v3.Metadata metadata = 10; - - // Host locality - config.core.v3.Locality locality = 11; -} - -message HealthCheckEjectUnhealthy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.core.v2alpha.HealthCheckEjectUnhealthy"; - - // The type of failure that caused this ejection. - HealthCheckFailureType failure_type = 1 [(validate.rules).enum = {defined_only: true}]; -} - -message HealthCheckAddHealthy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.core.v2alpha.HealthCheckAddHealthy"; - - // Whether this addition is the result of the first ever health check on a host, in which case - // the configured :ref:`healthy threshold ` - // is bypassed and the host is immediately added. - bool first_check = 1; -} - -message HealthCheckSuccessful { -} - -message HealthCheckFailure { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.core.v2alpha.HealthCheckFailure"; - - // The type of failure that caused this event. - HealthCheckFailureType failure_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // Whether this event is the result of the first ever health check on a host. - bool first_check = 2; -} - -message DegradedHealthyHost { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.core.v2alpha.DegradedHealthyHost"; -} - -message NoLongerDegradedHost { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.core.v2alpha.NoLongerDegradedHost"; -} diff --git a/src/main/proto/envoy/data/core/v3/tlv_metadata.proto b/src/main/proto/envoy/data/core/v3/tlv_metadata.proto deleted file mode 100644 index caa7989..0000000 --- a/src/main/proto/envoy/data/core/v3/tlv_metadata.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.data.core.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.data.core.v3"; -option java_outer_classname = "TlvMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/core/v3;corev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Proxy Protocol Filter Typed Metadata] -// PROXY protocol filter typed metadata. - -message TlvsMetadata { - // Typed metadata for :ref:`Proxy protocol filter `, that represents a map of TLVs. - // Each entry in the map consists of a key which corresponds to a configured - // :ref:`rule key ` and a value (TLV value in bytes). - // :ref:`Proxy protocol filter ` - // populates both typed and untyped metadata. - map typed_metadata = 1; -} diff --git a/src/main/proto/envoy/data/dns/v2alpha/dns_table.proto b/src/main/proto/envoy/data/dns/v2alpha/dns_table.proto deleted file mode 100644 index 0b8c43d..0000000 --- a/src/main/proto/envoy/data/dns/v2alpha/dns_table.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; - -package envoy.data.dns.v2alpha; - -import "envoy/type/matcher/string.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.dns.v2alpha"; -option java_outer_classname = "DnsTableProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/dns/v2alpha"; -option (udpa.annotations.file_status).work_in_progress = true; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: DNS Filter Table Data] -// :ref:`DNS Filter config overview `. - -// This message contains the configuration for the DNS Filter if populated -// from the control plane -message DnsTable { - // This message contains a list of IP addresses returned for a query for a known name - message AddressList { - // This field contains a well formed IP address that is returned - // in the answer for a name query. The address field can be an - // IPv4 or IPv6 address. Address family detection is done automatically - // when Envoy parses the string. Since this field is repeated, - // Envoy will return one randomly chosen entry from this list in the - // DNS response. The random index will vary per query so that we prevent - // clients pinning on a single address for a configured domain - repeated string address = 1 [(validate.rules).repeated = { - min_items: 1 - items {string {min_len: 3}} - }]; - } - - // This message type is extensible and can contain a list of addresses - // or dictate some other method for resolving the addresses for an - // endpoint - message DnsEndpoint { - oneof endpoint_config { - option (validate.required) = true; - - AddressList address_list = 1; - } - } - - message DnsVirtualDomain { - // The domain name for which Envoy will respond to query requests - string name = 1 [(validate.rules).string = {min_len: 2 well_known_regex: HTTP_HEADER_NAME}]; - - // The configuration containing the method to determine the address - // of this endpoint - DnsEndpoint endpoint = 2; - - // Sets the TTL in dns answers from Envoy returned to the client - google.protobuf.Duration answer_ttl = 3 [(validate.rules).duration = {gt {}}]; - } - - // Control how many times envoy makes an attempt to forward a query to - // an external server - uint32 external_retry_count = 1; - - // Fully qualified domain names for which Envoy will respond to queries - repeated DnsVirtualDomain virtual_domains = 2 [(validate.rules).repeated = {min_items: 1}]; - - // This field serves to help Envoy determine whether it can authoritatively - // answer a query for a name matching a suffix in this list. If the query - // name does not match a suffix in this list, Envoy will forward - // the query to an upstream DNS server - repeated type.matcher.StringMatcher known_suffixes = 3; -} diff --git a/src/main/proto/envoy/data/dns/v3/dns_table.proto b/src/main/proto/envoy/data/dns/v3/dns_table.proto deleted file mode 100644 index 7399318..0000000 --- a/src/main/proto/envoy/data/dns/v3/dns_table.proto +++ /dev/null @@ -1,165 +0,0 @@ -syntax = "proto3"; - -package envoy.data.dns.v3; - -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/duration.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.dns.v3"; -option java_outer_classname = "DnsTableProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/dns/v3;dnsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: DNS Filter Table Data] -// :ref:`DNS Filter config overview `. - -// This message contains the configuration for the DNS Filter if populated -// from the control plane -message DnsTable { - option (udpa.annotations.versioning).previous_message_type = "envoy.data.dns.v2alpha.DnsTable"; - - // This message contains a list of IP addresses returned for a query for a known name - message AddressList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v2alpha.DnsTable.AddressList"; - - // This field contains a well formed IP address that is returned in the answer for a - // name query. The address field can be an IPv4 or IPv6 address. Address family - // detection is done automatically when Envoy parses the string. Since this field is - // repeated, Envoy will return as many entries from this list in the DNS response while - // keeping the response under 512 bytes - repeated string address = 1 [(validate.rules).repeated = { - min_items: 1 - items {string {min_len: 3}} - }]; - } - - // Specify the service protocol using a numeric or string value - message DnsServiceProtocol { - oneof protocol_config { - option (validate.required) = true; - - // Specify the protocol number for the service. Envoy will try to resolve the number to - // the protocol name. For example, 6 will resolve to "tcp". Refer to: - // https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml - // for protocol names and numbers - uint32 number = 1 [(validate.rules).uint32 = {lt: 255}]; - - // Specify the protocol name for the service. - string name = 2 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - } - } - - // Specify the target for a given DNS service - // [#next-free-field: 6] - message DnsServiceTarget { - // Specify the name of the endpoint for the Service. The name is a hostname or a cluster - oneof endpoint_type { - option (validate.required) = true; - - // Use a resolvable hostname as the endpoint for a service. - string host_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - - // Use a cluster name as the endpoint for a service. - string cluster_name = 2 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - } - - // The priority of the service record target - uint32 priority = 3 [(validate.rules).uint32 = {lt: 65536}]; - - // The weight of the service record target - uint32 weight = 4 [(validate.rules).uint32 = {lt: 65536}]; - - // The port to which the service is bound. This value is optional if the target is a - // cluster. Setting port to zero in this case makes the filter use the port value - // from the cluster host - uint32 port = 5 [(validate.rules).uint32 = {lt: 65536}]; - } - - // This message defines a service selection record returned for a service query in a domain - message DnsService { - // The name of the service without the protocol or domain name - string service_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - - // The service protocol. This can be specified as a string or the numeric value of the protocol - DnsServiceProtocol protocol = 2; - - // The service entry time to live. This is independent from the DNS Answer record TTL - google.protobuf.Duration ttl = 3 [(validate.rules).duration = {gte {seconds: 1}}]; - - // The list of targets hosting the service - repeated DnsServiceTarget targets = 4 [(validate.rules).repeated = {min_items: 1}]; - } - - // Define a list of service records for a given service - message DnsServiceList { - repeated DnsService services = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - message DnsEndpoint { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v2alpha.DnsTable.DnsEndpoint"; - - oneof endpoint_config { - option (validate.required) = true; - - // Define a list of addresses to return for the specified endpoint - AddressList address_list = 1; - - // Define a cluster whose addresses are returned for the specified endpoint - string cluster_name = 2; - - // Define a DNS Service List for the specified endpoint - DnsServiceList service_list = 3; - } - } - - message DnsVirtualDomain { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.dns.v2alpha.DnsTable.DnsVirtualDomain"; - - // A domain name for which Envoy will respond to query requests. - // Wildcard records are supported on the first label only, e.g. ``*.example.com`` or ``*.subdomain.example.com``. - // Names such as ``*example.com``, ``subdomain.*.example.com``, ``*subdomain.example.com``, etc - // are not valid wildcard names and asterisk will be interpreted as a literal ``*`` character. - // Wildcard records match subdomains on any levels, e.g. ``*.example.com`` will match - // ``foo.example.com``, ``bar.foo.example.com``, ``baz.bar.foo.example.com``, etc. In case there are multiple - // wildcard records, the longest wildcard match will be used, e.g. if there are wildcard records for - // ``*.example.com`` and ``*.foo.example.com`` and the query is for ``bar.foo.example.com``, the latter will be used. - // Specific records will always take precedence over wildcard records. - string name = 1 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; - - // The configuration containing the method to determine the address of this endpoint - DnsEndpoint endpoint = 2; - - // Sets the TTL in DNS answers from Envoy returned to the client. The default TTL is 300s - google.protobuf.Duration answer_ttl = 3 [(validate.rules).duration = {gte {seconds: 30}}]; - } - - // Control how many times Envoy makes an attempt to forward a query to an external DNS server - uint32 external_retry_count = 1 [(validate.rules).uint32 = {lte: 3}]; - - // Fully qualified domain names for which Envoy will respond to DNS queries. By leaving this - // list empty, Envoy will forward all queries to external resolvers - repeated DnsVirtualDomain virtual_domains = 2; - - // This field is deprecated and no longer used in Envoy. The filter's behavior has changed - // internally to use a different data structure allowing the filter to determine whether a - // query is for known domain without the use of this field. - // - // This field serves to help Envoy determine whether it can authoritatively answer a query - // for a name matching a suffix in this list. If the query name does not match a suffix in - // this list, Envoy will forward the query to an upstream DNS server - repeated type.matcher.v3.StringMatcher known_suffixes = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; -} diff --git a/src/main/proto/envoy/data/tap/v2alpha/common.proto b/src/main/proto/envoy/data/tap/v2alpha/common.proto deleted file mode 100644 index fb07bce..0000000 --- a/src/main/proto/envoy/data/tap/v2alpha/common.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v2alpha; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tap common data] - -// Wrapper for tapped body data. This includes HTTP request/response body, transport socket received -// and transmitted data, etc. -message Body { - oneof body_type { - // Body data as bytes. By default, tap body data will be present in this field, as the proto - // `bytes` type can contain any valid byte. - bytes as_bytes = 1; - - // Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING - // ` sink - // format type is selected. See the documentation for that option for why this is useful. - string as_string = 2; - } - - // Specifies whether body data has been truncated to fit within the specified - // :ref:`max_buffered_rx_bytes - // ` and - // :ref:`max_buffered_tx_bytes - // ` settings. - bool truncated = 3; -} diff --git a/src/main/proto/envoy/data/tap/v2alpha/http.proto b/src/main/proto/envoy/data/tap/v2alpha/http.proto deleted file mode 100644 index 7cb10ff..0000000 --- a/src/main/proto/envoy/data/tap/v2alpha/http.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/data/tap/v2alpha/common.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; -option java_outer_classname = "HttpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP tap data] - -// A fully buffered HTTP trace message. -message HttpBufferedTrace { - // HTTP message wrapper. - message Message { - // Message headers. - repeated api.v2.core.HeaderValue headers = 1; - - // Message body. - Body body = 2; - - // Message trailers. - repeated api.v2.core.HeaderValue trailers = 3; - } - - // Request message. - Message request = 1; - - // Response message. - Message response = 2; -} - -// A streamed HTTP trace segment. Multiple segments make up a full trace. -// [#next-free-field: 8] -message HttpStreamedTraceSegment { - // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used - // for long term stable uniqueness. - uint64 trace_id = 1; - - oneof message_piece { - // Request headers. - api.v2.core.HeaderMap request_headers = 2; - - // Request body chunk. - Body request_body_chunk = 3; - - // Request trailers. - api.v2.core.HeaderMap request_trailers = 4; - - // Response headers. - api.v2.core.HeaderMap response_headers = 5; - - // Response body chunk. - Body response_body_chunk = 6; - - // Response trailers. - api.v2.core.HeaderMap response_trailers = 7; - } -} diff --git a/src/main/proto/envoy/data/tap/v2alpha/transport.proto b/src/main/proto/envoy/data/tap/v2alpha/transport.proto deleted file mode 100644 index 0be758d..0000000 --- a/src/main/proto/envoy/data/tap/v2alpha/transport.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v2alpha; - -import "envoy/api/v2/core/address.proto"; -import "envoy/data/tap/v2alpha/common.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; -option java_outer_classname = "TransportProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Transport tap data] -// Trace format for the tap transport socket extension. This dumps plain text read/write -// sequences on a socket. - -// Connection properties. -message Connection { - // Local address. - api.v2.core.Address local_address = 2; - - // Remote address. - api.v2.core.Address remote_address = 3; -} - -// Event in a socket trace. -message SocketEvent { - // Data read by Envoy from the transport socket. - message Read { - // TODO(htuch): Half-close for reads. - - // Binary data read. - Body data = 1; - } - - // Data written by Envoy to the transport socket. - message Write { - // Binary data written. - Body data = 1; - - // Stream was half closed after this write. - bool end_stream = 2; - } - - // The connection was closed. - message Closed { - // TODO(mattklein123): Close event type. - } - - // Timestamp for event. - google.protobuf.Timestamp timestamp = 1; - - // Read or write with content as bytes string. - oneof event_selector { - Read read = 2; - - Write write = 3; - - Closed closed = 4; - } -} - -// Sequence of read/write events that constitute a buffered trace on a socket. -// [#next-free-field: 6] -message SocketBufferedTrace { - // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used - // for long term stable uniqueness. Matches connection IDs used in Envoy logs. - uint64 trace_id = 1; - - // Connection properties. - Connection connection = 2; - - // Sequence of observed events. - repeated SocketEvent events = 3; - - // Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes - // ` setting. - bool read_truncated = 4; - - // Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes - // ` setting. - bool write_truncated = 5; -} - -// A streamed socket trace segment. Multiple segments make up a full trace. -message SocketStreamedTraceSegment { - // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used - // for long term stable uniqueness. Matches connection IDs used in Envoy logs. - uint64 trace_id = 1; - - oneof message_piece { - // Connection properties. - Connection connection = 2; - - // Socket event. - SocketEvent event = 3; - } -} diff --git a/src/main/proto/envoy/data/tap/v2alpha/wrapper.proto b/src/main/proto/envoy/data/tap/v2alpha/wrapper.proto deleted file mode 100644 index 5cc3e07..0000000 --- a/src/main/proto/envoy/data/tap/v2alpha/wrapper.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v2alpha; - -import "envoy/data/tap/v2alpha/http.proto"; -import "envoy/data/tap/v2alpha/transport.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v2alpha"; -option java_outer_classname = "WrapperProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tap data wrappers] - -// Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for -// sending traces over gRPC APIs or more easily persisting binary messages to files. -message TraceWrapper { - oneof trace { - option (validate.required) = true; - - // An HTTP buffered tap trace. - HttpBufferedTrace http_buffered_trace = 1; - - // An HTTP streamed tap trace segment. - HttpStreamedTraceSegment http_streamed_trace_segment = 2; - - // A socket buffered tap trace. - SocketBufferedTrace socket_buffered_trace = 3; - - // A socket streamed tap trace segment. - SocketStreamedTraceSegment socket_streamed_trace_segment = 4; - } -} diff --git a/src/main/proto/envoy/data/tap/v3/common.proto b/src/main/proto/envoy/data/tap/v3/common.proto deleted file mode 100644 index 7be656a..0000000 --- a/src/main/proto/envoy/data/tap/v3/common.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v3; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v3"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap common data] - -// Wrapper for tapped body data. This includes HTTP request/response body, transport socket received -// and transmitted data, etc. -message Body { - option (udpa.annotations.versioning).previous_message_type = "envoy.data.tap.v2alpha.Body"; - - oneof body_type { - // Body data as bytes. By default, tap body data will be present in this field, as the proto - // ``bytes`` type can contain any valid byte. - bytes as_bytes = 1; - - // Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING - // ` sink - // format type is selected. See the documentation for that option for why this is useful. - string as_string = 2; - } - - // Specifies whether body data has been truncated to fit within the specified - // :ref:`max_buffered_rx_bytes - // ` and - // :ref:`max_buffered_tx_bytes - // ` settings. - bool truncated = 3; -} - -// Connection properties. -message Connection { - option (udpa.annotations.versioning).previous_message_type = "envoy.data.tap.v2alpha.Connection"; - - // Local address. - config.core.v3.Address local_address = 1; - - // Remote address. - config.core.v3.Address remote_address = 2; -} diff --git a/src/main/proto/envoy/data/tap/v3/http.proto b/src/main/proto/envoy/data/tap/v3/http.proto deleted file mode 100644 index 42ba44c..0000000 --- a/src/main/proto/envoy/data/tap/v3/http.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/data/tap/v3/common.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v3"; -option java_outer_classname = "HttpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP tap data] - -// A fully buffered HTTP trace message. -message HttpBufferedTrace { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.HttpBufferedTrace"; - - // HTTP message wrapper. - message Message { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.HttpBufferedTrace.Message"; - - // Message headers. - repeated config.core.v3.HeaderValue headers = 1; - - // Message body. - Body body = 2; - - // Message trailers. - repeated config.core.v3.HeaderValue trailers = 3; - - // The timestamp after receiving the message headers. - google.protobuf.Timestamp headers_received_time = 4; - } - - // Request message. - Message request = 1; - - // Response message. - Message response = 2; - - // downstream connection - Connection downstream_connection = 3; - - // upstream connection - Connection upstream_connection = 4; -} - -// A streamed HTTP trace segment. Multiple segments make up a full trace. -// [#next-free-field: 8] -message HttpStreamedTraceSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.HttpStreamedTraceSegment"; - - // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used - // for long term stable uniqueness. - uint64 trace_id = 1; - - oneof message_piece { - // Request headers. - config.core.v3.HeaderMap request_headers = 2; - - // Request body chunk. - Body request_body_chunk = 3; - - // Request trailers. - config.core.v3.HeaderMap request_trailers = 4; - - // Response headers. - config.core.v3.HeaderMap response_headers = 5; - - // Response body chunk. - Body response_body_chunk = 6; - - // Response trailers. - config.core.v3.HeaderMap response_trailers = 7; - } -} diff --git a/src/main/proto/envoy/data/tap/v3/transport.proto b/src/main/proto/envoy/data/tap/v3/transport.proto deleted file mode 100644 index 5f929bc..0000000 --- a/src/main/proto/envoy/data/tap/v3/transport.proto +++ /dev/null @@ -1,126 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v3; - -import "envoy/data/tap/v3/common.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v3"; -option java_outer_classname = "TransportProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Transport tap data] -// Trace format for the tap transport socket extension. This dumps plain text read/write -// sequences on a socket. - -// Event in a socket trace. -// [#next-free-field: 7] -message SocketEvent { - option (udpa.annotations.versioning).previous_message_type = "envoy.data.tap.v2alpha.SocketEvent"; - - // Data read by Envoy from the transport socket. - message Read { - // TODO(htuch): Half-close for reads. - - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.SocketEvent.Read"; - - // Binary data read. - Body data = 1; - } - - // Data written by Envoy to the transport socket. - message Write { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.SocketEvent.Write"; - - // Binary data written. - Body data = 1; - - // Stream was half closed after this write. - bool end_stream = 2; - } - - // The connection was closed. - message Closed { - // TODO(mattklein123): Close event type. - - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.SocketEvent.Closed"; - } - - // Timestamp for event. - google.protobuf.Timestamp timestamp = 1; - - // Read or write with content as bytes string. - oneof event_selector { - Read read = 2; - - Write write = 3; - - Closed closed = 4; - } - - // Connection information per event - Connection connection = 5; - - // Data sequence number - uint64 seq_num = 6; -} - -// Sequence of read/write events that constitute a buffered trace on a socket. -// [#next-free-field: 6] -message SocketBufferedTrace { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.SocketBufferedTrace"; - - // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used - // for long term stable uniqueness. Matches connection IDs used in Envoy logs. - uint64 trace_id = 1; - - // Connection properties. - Connection connection = 2; - - // Sequence of observed events. - repeated SocketEvent events = 3; - - // Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes - // ` setting. - bool read_truncated = 4; - - // Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes - // ` setting. - bool write_truncated = 5; -} - -// A message for the sequence of observed events -message SocketEvents { - repeated SocketEvent events = 1; -} - -// A streamed socket trace segment. Multiple segments make up a full trace. -message SocketStreamedTraceSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.SocketStreamedTraceSegment"; - - // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used - // for long term stable uniqueness. Matches connection IDs used in Envoy logs. - uint64 trace_id = 1; - - oneof message_piece { - // Connection properties. - Connection connection = 2; - - // Socket event. - SocketEvent event = 3; - - // Sequence of observed events. - SocketEvents events = 4; - } -} diff --git a/src/main/proto/envoy/data/tap/v3/wrapper.proto b/src/main/proto/envoy/data/tap/v3/wrapper.proto deleted file mode 100644 index 983b350..0000000 --- a/src/main/proto/envoy/data/tap/v3/wrapper.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.data.tap.v3; - -import "envoy/data/tap/v3/http.proto"; -import "envoy/data/tap/v3/transport.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.tap.v3"; -option java_outer_classname = "WrapperProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap data wrappers] - -// Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for -// sending traces over gRPC APIs or more easily persisting binary messages to files. -message TraceWrapper { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.tap.v2alpha.TraceWrapper"; - - oneof trace { - option (validate.required) = true; - - // An HTTP buffered tap trace. - HttpBufferedTrace http_buffered_trace = 1; - - // An HTTP streamed tap trace segment. - HttpStreamedTraceSegment http_streamed_trace_segment = 2; - - // A socket buffered tap trace. - SocketBufferedTrace socket_buffered_trace = 3; - - // A socket streamed tap trace segment. - SocketStreamedTraceSegment socket_streamed_trace_segment = 4; - } -} diff --git a/src/main/proto/envoy/extensions/access_loggers/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/access_loggers/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index c169fe2..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.dynamic_modules.v3; - -import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic Modules Access Logger] -// [#extension: envoy.access_loggers.dynamic_modules] - -// Configuration for the Dynamic Modules Access Logger. This logger allows loading shared object -// files via ``dlopen`` to implement custom access logging behavior. -// -// A module can be loaded by multiple access loggers; the module is loaded only once and shared -// across multiple logger instances. -// -// The access logger receives completed request information including request/response headers, -// stream info (timing, upstream info, response codes), and the log context type. -message DynamicModuleAccessLog { - // Specifies the shared-object level configuration. This field is required. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1 - [(validate.rules).message = {required: true}]; - - // The name for this logger configuration. If not specified, defaults to an empty string. - // - // This can be used to distinguish between different logger implementations inside a dynamic - // module. For example, a module can have completely different logger implementations (e.g., - // file logger, gRPC logger, metrics logger). When Envoy receives this configuration, it passes - // the ``logger_name`` to the dynamic module's access logger config init function together with - // the ``logger_config``. That way a module can decide which in-module logger implementation to - // use based on the name at load time. - string logger_name = 2; - - // The configuration for the logger chosen by ``logger_name``. If not specified, an empty - // configuration is passed to the module. - // - // This is passed to the module's access logger initialization function. Together with the - // ``logger_name``, the module can decide which in-module logger implementation to use and - // fine-tune the behavior of the logger. - // - // For example, if a module has two logger implementations, one for file output and one for - // sending to an external service, ``logger_name`` is used to choose either file or external. - // The ``logger_config`` can be used to configure file paths, service endpoints, batching - // parameters, format strings, etc. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the module. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly - // without the wrapper. - // - // .. code-block:: yaml - // - // # Passing a JSON struct configuration - // logger_config: - // "@type": "type.googleapis.com/google.protobuf.Struct" - // value: - // output_path: "/var/log/envoy/access.log" - // format: "json" - // buffer_size: 1000 - // - // # Passing a simple string configuration - // logger_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: "/var/log/envoy/access.log" - // - google.protobuf.Any logger_config = 3; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/file/v3/file.proto b/src/main/proto/envoy/extensions/access_loggers/file/v3/file.proto deleted file mode 100644 index d8ab3c6..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/file/v3/file.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.file.v3; - -import "envoy/config/core/v3/substitution_format_string.proto"; - -import "google/protobuf/struct.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.file.v3"; -option java_outer_classname = "FileProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/file/v3;filev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: File access log] -// [#extension: envoy.access_loggers.file] - -// Custom configuration for an :ref:`AccessLog ` -// that writes log entries directly to a file. Configures the built-in ``envoy.access_loggers.file`` -// AccessLog. -// [#next-free-field: 6] -message FileAccessLog { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v2.FileAccessLog"; - - // A path to a local file to which to write the access log entries. - string path = 1 [(validate.rules).string = {min_len: 1}]; - - oneof access_log_format { - // Access log :ref:`format string`. - // Envoy supports :ref:`custom access log formats ` as well as a - // :ref:`default format `. - // This field is deprecated. - // Please use :ref:`log_format `. - string format = 2 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Access log :ref:`format dictionary`. All values - // are rendered as strings. - // This field is deprecated. - // Please use :ref:`log_format `. - google.protobuf.Struct json_format = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Access log :ref:`format dictionary`. Values are - // rendered as strings, numbers, or boolean values as appropriate. Nested JSON objects may - // be produced by some command operators (e.g.FILTER_STATE or DYNAMIC_METADATA). See the - // documentation for a specific command operator for details. - // This field is deprecated. - // Please use :ref:`log_format `. - google.protobuf.Struct typed_json_format = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Configuration to form access log data and format. - // If not specified, use :ref:`default format `. - config.core.v3.SubstitutionFormatString log_format = 5 - [(validate.rules).message = {required: true}]; - } -} diff --git a/src/main/proto/envoy/extensions/access_loggers/filters/cel/v3/cel.proto b/src/main/proto/envoy/extensions/access_loggers/filters/cel/v3/cel.proto deleted file mode 100644 index 72251c6..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/filters/cel/v3/cel.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.filters.cel.v3; - -import "envoy/config/core/v3/cel.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.filters.cel.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/filters/cel/v3;celv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ExpressionFilter] -// [#extension: envoy.access_loggers.extension_filters.cel] - -// ExpressionFilter is an access logging filter that evaluates configured -// symbolic Common Expression Language expressions to inform the decision -// to generate an access log. -message ExpressionFilter { - // Expression that, when evaluated, will be used to filter access logs. - // Expressions are based on the set of Envoy :ref:`attributes `. - // The provided expression must evaluate to true for logging (expression errors are considered false). - // Examples: - // - // * ``response.code >= 400`` - // * ``(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')`` - string expression = 1; - - // CEL expression configuration that modifies the evaluation behavior of the ``expression`` field. - // If specified, string conversion, concatenation, and manipulation functions may be enabled - // for the filter expression. See :ref:`CelExpressionConfig ` - // for more details. - config.core.v3.CelExpressionConfig cel_config = 2; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/filters/process_ratelimit/v3/process_ratelimit.proto b/src/main/proto/envoy/extensions/access_loggers/filters/process_ratelimit/v3/process_ratelimit.proto deleted file mode 100644 index 6b60a69..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/filters/process_ratelimit/v3/process_ratelimit.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.filters.process_ratelimit.v3; - -import "envoy/config/core/v3/config_source.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.filters.process_ratelimit.v3"; -option java_outer_classname = "ProcessRatelimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/filters/process_ratelimit/v3;process_ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ProcessRateLimiter] -// [#extension: envoy.access_loggers.extension_filters.process_ratelimit] - -// Filters for rate limiting the access log emission using global token buckets per process and shared across all listeners. -message ProcessRateLimitFilter { - // The dynamic config for the token bucket. - DynamicTokenBucket dynamic_config = 1; -} - -message DynamicTokenBucket { - // the key used to find the token bucket in the singleton map. - string resource_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The configuration source for the :ref:`token_bucket `. - // It should stay the same through the process lifetime. - config.core.v3.ConfigSource config_source = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/fluentd/v3/fluentd.proto b/src/main/proto/envoy/extensions/access_loggers/fluentd/v3/fluentd.proto deleted file mode 100644 index dab04fb..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/fluentd/v3/fluentd.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.fluentd.v3; - -import "envoy/config/core/v3/backoff.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.fluentd.v3"; -option java_outer_classname = "FluentdProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/fluentd/v3;fluentdv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Fluentd access log] - -// Configuration for the *envoy.access_loggers.fluentd* :ref:`AccessLog `. -// This access log extension will send the emitted access logs over a TCP connection to an upstream that is accepting -// the Fluentd Forward Protocol as described in: `Fluentd Forward Protocol Specification -// `_. -// [#extension: envoy.access_loggers.fluentd] -// [#next-free-field: 9] -message FluentdAccessLogConfig { - message RetryOptions { - // The number of times the logger will attempt to connect to the upstream during reconnects. - // By default, there is no limit. The logger will attempt to reconnect to the upstream each time - // connecting to the upstream failed or the upstream connection had been closed for any reason. - google.protobuf.UInt32Value max_connect_attempts = 1; - - // Sets the backoff strategy. If this value is not set, the default base backoff interval is 500 - // milliseconds and the default max backoff interval is 5 seconds (10 times the base interval). - config.core.v3.BackoffStrategy backoff_options = 2; - } - - // The upstream cluster to connect to for streaming the Fluentd messages. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // A tag is a string separated with '.' (e.g. log.type) to categorize events. - // See: https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#message-modes - string tag = 2 [(validate.rules).string = {min_len: 1}]; - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 3 [(validate.rules).string = {min_len: 1}]; - - // Interval for flushing access logs to the TCP stream. Logger will flush requests every time - // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to - // 1 second. - google.protobuf.Duration buffer_flush_interval = 4 [(validate.rules).duration = {gt {}}]; - - // Soft size limit in bytes for access log entries buffer. The logger will buffer requests until - // this limit it hit, or every time flush interval is elapsed, whichever comes first. When the buffer - // limit is hit, the logger will immediately flush the buffer contents. Setting it to zero effectively - // disables the batching. Defaults to 16384. - google.protobuf.UInt32Value buffer_size_bytes = 5; - - // A struct that represents the record that is sent for each log entry. - // https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#entry - // Values are rendered as strings, numbers, or boolean values as appropriate. - // Nested JSON objects may be produced by some command operators (e.g. FILTER_STATE or DYNAMIC_METADATA). - // See :ref:`format string` documentation for a specific command operator details. - // - // .. validated-code-block:: yaml - // :type-name: envoy.extensions.access_loggers.fluentd.v3.FluentdAccessLogConfig - // - // record: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // - // The following msgpack record would be created: - // - // .. code-block:: json - // - // { - // "status": 500, - // "message": "My error message" - // } - google.protobuf.Struct record = 6 [(validate.rules).message = {required: true}]; - - // Optional retry, in case upstream connection has failed. If this field is not set, the default values will be applied, - // as specified in the :ref:`RetryOptions ` - // configuration. - RetryOptions retry_options = 7; - - // Specifies a collection of Formatter plugins that can be called from the access log configuration. - // See the formatters extensions documentation for details. - // [#extension-category: envoy.formatter] - repeated config.core.v3.TypedExtensionConfig formatters = 8; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/grpc/v3/als.proto b/src/main/proto/envoy/extensions/access_loggers/grpc/v3/als.proto deleted file mode 100644 index 68d83e9..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/grpc/v3/als.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.grpc.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/type/tracing/v3/custom_tag.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.grpc.v3"; -option java_outer_classname = "AlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/grpc/v3;grpcv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Access Log Service (ALS)] - -// Configuration for the built-in ``envoy.access_loggers.http_grpc`` -// :ref:`AccessLog `. This configuration will -// populate :ref:`StreamAccessLogsMessage.http_logs -// `. -// [#extension: envoy.access_loggers.http_grpc] -message HttpGrpcAccessLogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v2.HttpGrpcAccessLogConfig"; - - CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; - - // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. - repeated string additional_request_headers_to_log = 2; - - // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. - repeated string additional_response_headers_to_log = 3; - - // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. - repeated string additional_response_trailers_to_log = 4; -} - -// Configuration for the built-in ``envoy.access_loggers.tcp_grpc`` type. This configuration will -// populate ``StreamAccessLogsMessage.tcp_logs``. -// [#extension: envoy.access_loggers.tcp_grpc] -message TcpGrpcAccessLogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v2.TcpGrpcAccessLogConfig"; - - CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; -} - -// Common configuration for gRPC access logs. -// [#next-free-field: 9] -message CommonGrpcAccessLogConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.accesslog.v2.CommonGrpcAccessLogConfig"; - - // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier - // `. This allows the - // access log server to differentiate between different access logs coming from the same Envoy. - string log_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The gRPC service for the access log service. - config.core.v3.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; - - // API version for access logs service transport protocol. This describes the access logs service - // gRPC endpoint and version of messages used on the wire. - config.core.v3.ApiVersion transport_api_version = 6 - [(validate.rules).enum = {defined_only: true}]; - - // Interval for flushing access logs to the gRPC stream. Logger will flush requests every time - // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to - // 1 second. - google.protobuf.Duration buffer_flush_interval = 3 [(validate.rules).duration = {gt {}}]; - - // Soft size limit in bytes for access log entries buffer. Logger will buffer requests until - // this limit it hit, or every time flush interval is elapsed, whichever comes first. Setting it - // to zero effectively disables the batching. Defaults to 16384. - google.protobuf.UInt32Value buffer_size_bytes = 4; - - // Additional filter state objects to log in :ref:`filter_state_objects - // `. - // Logger will call ``FilterState::Object::serializeAsProto`` to serialize the filter state object. - repeated string filter_state_objects_to_log = 5; - - // Sets the retry policy when the establishment of a gRPC stream fails. - // If the stream succeeds at least once in establishing itself, - // no retry will be performed no matter what gRPC status is received. - // Note that only :ref:`num_retries ` - // will be used in this configuration. This feature is used only when you are using - // :ref:`Envoy gRPC client `. - config.core.v3.RetryPolicy grpc_stream_retry_policy = 7; - - // A list of custom tags with unique tag name to create tags for the logs. - repeated type.tracing.v3.CustomTag custom_tags = 8; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto b/src/main/proto/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto deleted file mode 100644 index ccb1ac4..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/open_telemetry/v3/logs_service.proto +++ /dev/null @@ -1,101 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.open_telemetry.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/config/core/v3/http_service.proto"; -import "envoy/extensions/access_loggers/grpc/v3/als.proto"; -import "envoy/type/tracing/v3/custom_tag.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "opentelemetry/proto/common/v1/common.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.open_telemetry.v3"; -option java_outer_classname = "LogsServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/open_telemetry/v3;open_telemetryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: OpenTelemetry Access Log] - -// Configuration for the built-in ``envoy.access_loggers.open_telemetry`` -// :ref:`AccessLog `. This configuration will -// populate `opentelemetry.proto.collector.v1.logs.ExportLogsServiceRequest.resource_logs `_. -// In addition, the request start time is set in the dedicated field. -// [#extension: envoy.access_loggers.open_telemetry] -// [#next-free-field: 15] -message OpenTelemetryAccessLogConfig { - // [#comment:TODO(itamarkam): add 'filter_state_objects_to_log' to logs.] - // Deprecated. Use ``grpc_service`` or ``http_service`` instead. - grpc.v3.CommonGrpcAccessLogConfig common_config = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The upstream HTTP cluster that will receive OTLP logs via - // `OTLP/HTTP `_. - // Note: Only one of ``common_config``, ``grpc_service``, or ``http_service`` may be used. - // - // .. note:: - // - // The ``request_headers_to_add`` property in the OTLP HTTP exporter service - // does not support the :ref:`format specifier ` as used for - // :ref:`HTTP access logging `. - // The values configured are added as HTTP headers on the OTLP export request - // without any formatting applied. - config.core.v3.HttpService http_service = 8; - - // The upstream gRPC cluster that will receive OTLP logs. - // Note: Only one of ``common_config``, ``grpc_service``, or ``http_service`` may be used. - // This field is preferred over ``common_config.grpc_service``. - config.core.v3.GrpcService grpc_service = 9; - - // If specified, Envoy will not generate built-in resource labels - // like ``log_name``, ``zone_name``, ``cluster_name``, ``node_name``. - bool disable_builtin_labels = 5; - - // OpenTelemetry `Resource `_ - // attributes are filled with Envoy node info. - // Example: ``resource_attributes { values { key: "region" value { string_value: "cn-north-7" } } }``. - opentelemetry.proto.common.v1.KeyValueList resource_attributes = 4; - - // OpenTelemetry `LogResource `_ - // fields, following `Envoy access logging formatting `_. - // - // See 'body' in the LogResource proto for more details. - // Example: ``body { string_value: "%PROTOCOL%" }``. - opentelemetry.proto.common.v1.AnyValue body = 2; - - // See 'attributes' in the LogResource proto for more details. - // Example: ``attributes { values { key: "user_agent" value { string_value: "%REQ(USER-AGENT)%" } } }``. - opentelemetry.proto.common.v1.KeyValueList attributes = 3; - - // Optional. Additional prefix to use on OpenTelemetry access logger stats. If empty, the stats will be rooted at - // ``access_logs.open_telemetry_access_log.``. If non-empty, stats will be rooted at - // ``access_logs.open_telemetry_access_log..``. - string stat_prefix = 6; - - // Specifies a collection of Formatter plugins that can be called from the access log configuration. - // See the formatters extensions documentation for details. - // [#extension-category: envoy.formatter] - repeated config.core.v3.TypedExtensionConfig formatters = 7; - - string log_name = 10; - - // The interval for flushing access logs to the transport. Default: 1 second. - google.protobuf.Duration buffer_flush_interval = 11; - - // Soft size limit in bytes for the access log buffer. When the buffer exceeds - // this limit, logs will be flushed. Default: 16KB. - google.protobuf.UInt32Value buffer_size_bytes = 12; - - // Additional filter state objects to log as attributes. - repeated string filter_state_objects_to_log = 13; - - // Custom tags to include as log attributes. - repeated type.tracing.v3.CustomTag custom_tags = 14; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/stats/v3/stats.proto b/src/main/proto/envoy/extensions/access_loggers/stats/v3/stats.proto deleted file mode 100644 index bcb1296..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/stats/v3/stats.proto +++ /dev/null @@ -1,102 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.stats.v3; - -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.stats.v3"; -option java_outer_classname = "StatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/stats/v3;statsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Stats logger] -// Configuration for an access logger that emits custom Envoy stats according to its -// configuration. The stats can have tags and values derived from -// :ref:`command operators `. -// [#extension: envoy.access_loggers.stats] -// -// .. warning:: -// It is easy to configure and use this extension in ways that create very -// large numbers of stats in Envoy, which can cause excessive memory or CPU use -// leading to a denial of service in Envoy, or can overwhelm any configured -// stat sinks by sending too many unique metrics. - -message Config { - option (xds.annotations.v3.message_status).work_in_progress = true; - - // Defines a tag on a stat. - message Tag { - // The name of the tag. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The value of the tag, using :ref:`command operators `. - string value_format = 2 [(validate.rules).string = {min_len: 1}]; - } - - // Defines the name and tags of a stat. - message Stat { - // The name of the stat. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The tags for the stat. - repeated Tag tags = 2; - } - - // Configuration for a histogram stat. - message Histogram { - // The histogram units. The units are needed for some stat sinks. - enum Unit { - Unspecified = 0; - - Bytes = 1; - - Microseconds = 2; - - Milliseconds = 3; - - // Values are scaled to range 0-1.0, indicating 0%-100%. Values can be outside this range, - // but must be positive. Values extremely far out of this range may overflow. - Percent = 4; - } - - // The name and tags of this histogram. - Stat stat = 1 [(validate.rules).message = {required: true}]; - - // The units for this histogram. - Unit unit = 2 [(validate.rules).enum = {defined_only: true}]; - - // The format string for the value of this histogram, using :ref:`command operators `. - // This must evaluate to a positive number. - string value_format = 3 [(validate.rules).string = {min_len: 1 prefix: "%" suffix: "%"}]; - } - - // Configuration for a counter stat. - message Counter { - // The name and tags of this counter. - Stat stat = 1 [(validate.rules).message = {required: true}]; - - // The format string for the value to add to this counter, using :ref:`command operators `. - // One of ``value_format`` or ``value_fixed`` must be configured. - string value_format = 2 - [(validate.rules).string = {prefix: "%" suffix: "%" ignore_empty: true}]; - - // A fixed value to add to this counter. - // One of ``value_format`` or ``value_fixed`` must be configured. - google.protobuf.UInt64Value value_fixed = 3 [(validate.rules).uint64 = {gt: 0}]; - } - - // The stat prefix for the generated stats. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The histograms this logger will emit. - repeated Histogram histograms = 3; - - // The counters this logger will emit. - repeated Counter counters = 4; -} diff --git a/src/main/proto/envoy/extensions/access_loggers/stream/v3/stream.proto b/src/main/proto/envoy/extensions/access_loggers/stream/v3/stream.proto deleted file mode 100644 index 9e90a17..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/stream/v3/stream.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.stream.v3; - -import "envoy/config/core/v3/substitution_format_string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.stream.v3"; -option java_outer_classname = "StreamProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/stream/v3;streamv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Standard Streams Access loggers] - -// Custom configuration for an :ref:`AccessLog ` -// that writes log entries directly to the operating system's standard output. -// [#extension: envoy.access_loggers.stdout] -message StdoutAccessLog { - oneof access_log_format { - // Configuration to form access log data and format. - // If not specified, use :ref:`default format `. - config.core.v3.SubstitutionFormatString log_format = 1 - [(validate.rules).message = {required: true}]; - } -} - -// Custom configuration for an :ref:`AccessLog ` -// that writes log entries directly to the operating system's standard error. -// [#extension: envoy.access_loggers.stderr] -message StderrAccessLog { - oneof access_log_format { - // Configuration to form access log data and format. - // If not specified, use :ref:`default format `. - config.core.v3.SubstitutionFormatString log_format = 1 - [(validate.rules).message = {required: true}]; - } -} diff --git a/src/main/proto/envoy/extensions/access_loggers/wasm/v3/wasm.proto b/src/main/proto/envoy/extensions/access_loggers/wasm/v3/wasm.proto deleted file mode 100644 index 8e510db..0000000 --- a/src/main/proto/envoy/extensions/access_loggers/wasm/v3/wasm.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.access_loggers.wasm.v3; - -import "envoy/extensions/wasm/v3/wasm.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.access_loggers.wasm.v3"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/wasm/v3;wasmv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Wasm access log] -// [#extension: envoy.access_loggers.wasm] - -// Custom configuration for an :ref:`AccessLog ` -// that calls into a WASM VM. Configures the built-in ``envoy.access_loggers.wasm`` -// AccessLog. -message WasmAccessLog { - envoy.extensions.wasm.v3.PluginConfig config = 1; -} diff --git a/src/main/proto/envoy/extensions/bootstrap/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/bootstrap/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index a0c406b..0000000 --- a/src/main/proto/envoy/extensions/bootstrap/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.bootstrap.dynamic_modules.v3; - -import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.bootstrap.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/bootstrap/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic Modules Bootstrap Extension] -// [#extension: envoy.bootstrap.dynamic_modules] - -// Configuration for the Dynamic Modules bootstrap extension. This extension allows loading shared -// object files that can be loaded via ``dlopen`` to extend Envoy's bootstrap behavior. -// -// A module can be loaded by multiple bootstrap extensions; the module is loaded only once and shared -// across multiple extensions. -// -// Bootstrap extensions run on the main thread and are initialized when Envoy starts. They can: -// -// * Perform initialization tasks when the server is initialized. -// * Perform per-worker thread initialization when worker threads start. -// * Access server-level resources like the cluster manager and dispatcher. -// -message DynamicModuleBootstrapExtension { - // Specifies the shared-object level configuration. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; - - // The name for this extension configuration. - // - // This can be used to distinguish between different extension implementations inside a dynamic - // module. For example, a module can have completely different extension implementations. When Envoy - // receives this configuration, it passes the ``extension_name`` to the dynamic module's bootstrap - // extension config init function together with the ``extension_config``. That way a module can - // decide which in-module extension implementation to use based on the name at load time. - // - // If not specified, defaults to an empty string. - string extension_name = 2; - - // The configuration for the extension chosen by ``extension_name``. - // - // This is passed to the module's bootstrap extension initialization function. Together with the - // ``extension_name``, the module can decide which in-module extension implementation to use and - // fine-tune the behavior of the extension. - // - // For example, if a module has two extension implementations, one for configuration loading and - // one for metric initialization, ``extension_name`` is used to choose the implementation. The - // ``extension_config`` can be used to configure the specific behavior of each implementation. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the module. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly - // without the wrapper. - // - // .. code-block:: yaml - // - // # Passing a string value - // extension_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: hello - // - // # Passing raw bytes - // extension_config: - // "@type": "type.googleapis.com/google.protobuf.BytesValue" - // value: aGVsbG8= # echo -n "hello" | base64 - // - google.protobuf.Any extension_config = 3; -} diff --git a/src/main/proto/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto b/src/main/proto/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto deleted file mode 100644 index bdb52f4..0000000 --- a/src/main/proto/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.bootstrap.internal_listener.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.bootstrap.internal_listener.v3"; -option java_outer_classname = "InternalListenerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/bootstrap/internal_listener/v3;internal_listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Internal Listener] -// Internal Listener :ref:`overview `. -// [#extension: envoy.bootstrap.internal_listener] - -// Configuration for internal listener. -message InternalListener { - // The internal listener client connection buffer size in KiB. - // For example, if ``buffer_size_kb`` is set to 5, then the actual buffer size is - // 5 KiB = 5 * 1024 bytes. - // If the ``buffer_size_kb`` is not specified, the buffer size is set to 1024 KiB. - google.protobuf.UInt32Value buffer_size_kb = 1 [(validate.rules).uint32 = {lte: 8192 gte: 1}]; -} diff --git a/src/main/proto/envoy/extensions/bootstrap/reverse_tunnel/downstream_socket_interface/v3/downstream_reverse_connection_socket_interface.proto b/src/main/proto/envoy/extensions/bootstrap/reverse_tunnel/downstream_socket_interface/v3/downstream_reverse_connection_socket_interface.proto deleted file mode 100644 index 72994c0..0000000 --- a/src/main/proto/envoy/extensions/bootstrap/reverse_tunnel/downstream_socket_interface/v3/downstream_reverse_connection_socket_interface.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.bootstrap.reverse_tunnel.downstream_socket_interface.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.bootstrap.reverse_tunnel.downstream_socket_interface.v3"; -option java_outer_classname = "DownstreamReverseConnectionSocketInterfaceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/bootstrap/reverse_tunnel/downstream_socket_interface/v3;downstream_socket_interfacev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Bootstrap settings for downstream reverse connection socket interface] -// [#extension: envoy.bootstrap.reverse_tunnel.downstream_socket_interface] - -// Configuration for the downstream reverse connection socket interface. -// This interface initiates reverse connections to upstream Envoys and provides -// them as socket connections for downstream requests. -message DownstreamReverseConnectionSocketInterface { - // HTTP handshake settings for initiator envoy initiated reverse tunnels. - message HttpHandshakeConfig { - // Request path used when issuing the HTTP reverse-connection handshake. Defaults to - // "/reverse_connections/request". - string request_path = 1; - } - - // Stat prefix to be used for downstream reverse connection socket interface stats. - string stat_prefix = 1; - - // Enable detailed per-host and per-cluster statistics. - // When enabled, emits hidden statistics for individual hosts and clusters. - // Defaults to ``false``. - bool enable_detailed_stats = 2; - - // Optional HTTP handshake configuration. When unset, the initiator envoy uses the defaults - // provided by ``HttpHandshakeConfig``. - HttpHandshakeConfig http_handshake = 3; -} diff --git a/src/main/proto/envoy/extensions/bootstrap/reverse_tunnel/upstream_socket_interface/v3/upstream_reverse_connection_socket_interface.proto b/src/main/proto/envoy/extensions/bootstrap/reverse_tunnel/upstream_socket_interface/v3/upstream_reverse_connection_socket_interface.proto deleted file mode 100644 index d1d3b36..0000000 --- a/src/main/proto/envoy/extensions/bootstrap/reverse_tunnel/upstream_socket_interface/v3/upstream_reverse_connection_socket_interface.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.bootstrap.reverse_tunnel.upstream_socket_interface.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.bootstrap.reverse_tunnel.upstream_socket_interface.v3"; -option java_outer_classname = "UpstreamReverseConnectionSocketInterfaceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/bootstrap/reverse_tunnel/upstream_socket_interface/v3;upstream_socket_interfacev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Upstream reverse connection socket interface] -// [#extension: envoy.bootstrap.reverse_tunnel.upstream_socket_interface] - -// Configuration for the upstream reverse connection socket interface. -message UpstreamReverseConnectionSocketInterface { - // Stat prefix for upstream reverse connection socket interface stats. - string stat_prefix = 1; - - // Number of consecutive ping failures before an idle reverse connection socket is marked dead. - // Defaults to 3 if unset. Must be at least 1. - google.protobuf.UInt32Value ping_failure_threshold = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Enable detailed per-node and per-cluster statistics. - // When enabled, emits hidden statistics for individual nodes and clusters. - // Defaults to false. - bool enable_detailed_stats = 3; - - // Optional configuration for a tunnel reporting extension. When provided, - // the socket interface instantiates a reporter via the configured factory. - // If unset, no reporting is done. - config.core.v3.TypedExtensionConfig reporter_config = 4; -} diff --git a/src/main/proto/envoy/extensions/clusters/aggregate/v3/cluster.proto b/src/main/proto/envoy/extensions/clusters/aggregate/v3/cluster.proto deleted file mode 100644 index d23d767..0000000 --- a/src/main/proto/envoy/extensions/clusters/aggregate/v3/cluster.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.aggregate.v3; - -import "envoy/config/core/v3/config_source.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.aggregate.v3"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/aggregate/v3;aggregatev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Aggregate cluster configuration] - -// Configuration for the aggregate cluster. See the :ref:`architecture overview -// ` for more information. -// [#extension: envoy.clusters.aggregate] -message ClusterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.aggregate.v2alpha.ClusterConfig"; - - // Load balancing clusters in aggregate cluster. Clusters are prioritized based on the order they - // appear in this list. - repeated string clusters = 1 [(validate.rules).repeated = {min_items: 1}]; -} - -// Configures an aggregate cluster whose -// :ref:`ClusterConfig ` -// is to be fetched from a separate xDS resource. -// [#extension: envoy.clusters.aggregate_resource] -// [#not-implemented-hide:] -message AggregateClusterResource { - // Configuration source specifier for the ClusterConfig resource. - // Only the aggregated protocol variants are supported; if configured - // otherwise, the cluster resource will be NACKed. - config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // The name of the ClusterConfig resource to subscribe to. - string resource_name = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/clusters/common/dns/v3/dns.proto b/src/main/proto/envoy/extensions/clusters/common/dns/v3/dns.proto deleted file mode 100644 index db4e31f..0000000 --- a/src/main/proto/envoy/extensions/clusters/common/dns/v3/dns.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.common.dns.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.common.dns.v3"; -option java_outer_classname = "DnsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/common/dns/v3;dnsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: DNS configuration for clusters] - -enum DnsLookupFamily { - UNSPECIFIED = 0; - AUTO = 1; - V4_ONLY = 2; - V6_ONLY = 3; - V4_PREFERRED = 4; - ALL = 5; -} diff --git a/src/main/proto/envoy/extensions/clusters/composite/v3/cluster.proto b/src/main/proto/envoy/extensions/clusters/composite/v3/cluster.proto deleted file mode 100644 index 475f8d1..0000000 --- a/src/main/proto/envoy/extensions/clusters/composite/v3/cluster.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.composite.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.composite.v3"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/composite/v3;compositev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Composite cluster configuration] - -// Configuration for the composite cluster. See the :ref:`architecture overview -// ` for more information. This cluster type enables retry-aware -// cluster selection, allowing different retry attempts to automatically target -// different upstream clusters. Unlike the standard aggregate cluster which uses -// health-based selection, the composite cluster uses the retry attempt count to -// deterministically select which sub-cluster to route to. -// -// When retry attempts exceed the number of configured clusters, requests will fail with no -// host available. -// -// Example configuration: -// -// .. code-block:: yaml -// -// name: composite_cluster -// connect_timeout: 0.25s -// lb_policy: CLUSTER_PROVIDED -// cluster_type: -// name: envoy.clusters.composite -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.clusters.composite.v3.ClusterConfig -// clusters: -// - name: primary_cluster -// - name: secondary_cluster -// - name: fallback_cluster -// -// [#extension: envoy.clusters.composite] -message ClusterConfig { - // Configuration for an individual cluster entry. - message ClusterEntry { - // Name of the cluster. This cluster must be defined elsewhere in the configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - } - - // List of clusters to use for request routing. The first cluster is used for the - // initial request (attempt 1), the second cluster for the first retry (attempt 2), - // and so on. Must contain at least one cluster. When retry attempts exceed the number - // of configured clusters, requests will fail with no host available. - repeated ClusterEntry clusters = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/extensions/clusters/dns/v3/dns_cluster.proto b/src/main/proto/envoy/extensions/clusters/dns/v3/dns_cluster.proto deleted file mode 100644 index 4266541..0000000 --- a/src/main/proto/envoy/extensions/clusters/dns/v3/dns_cluster.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.dns.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/extensions/clusters/common/dns/v3/dns.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.dns.v3"; -option java_outer_classname = "DnsClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dns/v3;dnsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: DNS cluster configuration] - -// Configuration for DNS discovery clusters. -// [#extension: envoy.clusters.dns] - -// [#next-free-field: 10] -message DnsCluster { - message RefreshRate { - // Specifies the base interval between refreshes. This parameter is required and must be greater - // than zero and less than - // :ref:`max_interval `. - google.protobuf.Duration base_interval = 1 [(validate.rules).duration = { - required: true - gt {nanos: 1000000} - }]; - - // Specifies the maximum interval between refreshes. This parameter is optional, but must be - // greater than or equal to the - // :ref:`base_interval ` if set. The default - // is 10 times the :ref:`base_interval `. - google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}]; - } - - // This value is the cluster’s DNS refresh rate. The value configured must be at least 1ms. - // If this setting is not specified, the - // value defaults to 5000ms. - google.protobuf.Duration dns_refresh_rate = 3 [(validate.rules).duration = {gt {nanos: 1000000}}]; - - // This is the cluster’s DNS refresh rate when requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the DNS refresh rate. - RefreshRate dns_failure_refresh_rate = 4; - - // Optional configuration for setting cluster's DNS refresh rate. If the value is set to true, - // cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS - // resolution. - bool respect_dns_ttl = 5; - - // DNS jitter causes the cluster to refresh DNS entries later by a random amount of time to avoid a - // stampede of DNS requests. This value sets the upper bound (exclusive) for the random amount. - // There will be no jitter if this value is omitted. - google.protobuf.Duration dns_jitter = 6 [(validate.rules).duration = {gte {}}]; - - // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, - // or any other DNS resolver types and the related parameters. - // For example, an object of - // :ref:`CaresDnsResolverConfig` - // can be packed into this ``typed_dns_resolver_config``. This configuration replaces the - // :ref:`Cluster.typed_dns_resolver_config` - // configuration which replaces :ref:`Cluster.dns_resolution_config`. - // During the transition period when - // :ref:`DnsCluster.typed_dns_resolver_config`, - // :ref:`Cluster.typed_dns_resolver_config`, - // and :ref:`Cluster.dns_resolution_config` - // exist, Envoy will use - // :ref:`DnsCluster.typed_dns_resolver_config` - // and ignore - // DNS resolver-related fields in :ref:`Cluster` if the cluster is configured via the - // :ref:`Cluster.cluster_type` extension point with the - // :ref:`DnsCluster` extension type. - // Otherwise, see :ref:`Cluster.typed_dns_resolver_config`. - // [#extension-category: envoy.network.dns_resolver] - config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 7; - - // The DNS IP address resolution policy. If this setting is not specified, the - // value defaults to - // :ref:`AUTO`. - common.dns.v3.DnsLookupFamily dns_lookup_family = 8; - - // If true, all returned addresses are considered to be associated with a single endpoint, - // which maps to :ref:`logical DNS discovery ` - // semantics. Otherwise, each address is considered to be a separate endpoint, which maps to - // :ref:`strict DNS discovery ` semantics. - bool all_addresses_in_single_endpoint = 9; -} diff --git a/src/main/proto/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto b/src/main/proto/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto deleted file mode 100644 index 6ad6b9e..0000000 --- a/src/main/proto/envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto +++ /dev/null @@ -1,96 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.dynamic_forward_proxy.v3; - -import "envoy/config/cluster/v3/cluster.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.dynamic_forward_proxy.v3"; -option java_outer_classname = "ClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic forward proxy cluster configuration] - -// Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview -// ` for more information. -// [#extension: envoy.clusters.dynamic_forward_proxy] -message ClusterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.dynamic_forward_proxy.v2alpha.ClusterConfig"; - - oneof cluster_implementation_specifier { - // The DNS cache configuration that the cluster will attach to. Note this configuration must - // match that of associated :ref:`dynamic forward proxy HTTP filter configuration - // `. - common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1; - - // Configuration for sub clusters, when this configuration is enabled, - // Envoy will create an independent sub cluster dynamically for each host:port. - // Most of the configuration of a sub cluster is inherited from the current cluster, - // i.e. health_checks, dns_resolvers and etc. - // And the load_assignment will be set to the only one endpoint, host:port. - // - // Compared to the dns_cache_config, it has the following advantages: - // - // 1. sub clusters will be created with the STRICT_DNS DiscoveryType, - // so that Envoy will use all of the IPs resolved from the host. - // - // 2. each sub cluster is full featured cluster, with lb_policy and health check and etc enabled. - // - SubClustersConfig sub_clusters_config = 4; - } - - // If true allow the cluster configuration to disable the auto_sni and auto_san_validation options - // in the :ref:`cluster's upstream_http_protocol_options - // ` - bool allow_insecure_cluster_options = 2; - - // If true allow HTTP/2 and HTTP/3 connections to be reused for requests to different - // origins than the connection was initially created for. This will only happen when the - // resolved address for the new connection matches the peer address of the connection and - // the TLS certificate is also valid for the new hostname. For example, if a connection - // has previously been established to foo.example.com at IP 1.2.3.4 with a certificate - // that is valid for ``*.example.com``, then this connection could be used for requests to - // bar.example.com if that also resolved to 1.2.3.4. - // - // .. note:: - // By design, this feature will maximize reuse of connections. This means that instead - // opening a new connection when an existing connection reaches the maximum number of - // concurrent streams, requests will instead be sent to the existing connection. - // - // .. note:: - // The coalesced connections might be to upstreams that would not be otherwise - // selected by Envoy. See the section `Connection Reuse in RFC 7540 - // `_ - // - bool allow_coalesced_connections = 3; -} - -// Configuration for sub clusters. Hard code STRICT_DNS cluster type now. -message SubClustersConfig { - // The :ref:`load balancer type ` to use - // when picking a host in a sub cluster. Note that CLUSTER_PROVIDED is not allowed here. - config.cluster.v3.Cluster.LbPolicy lb_policy = 1 [(validate.rules).enum = {defined_only: true}]; - - // The maximum number of sub clusters that the DFP cluster will hold. If not specified defaults to 1024. - google.protobuf.UInt32Value max_sub_clusters = 2 [(validate.rules).uint32 = {gt: 0}]; - - // The TTL for sub clusters that are unused. Sub clusters that have not been used in the configured time - // interval will be purged. If not specified defaults to 5m. - google.protobuf.Duration sub_cluster_ttl = 3 [(validate.rules).duration = {gt {}}]; - - // Sub clusters that should be created & warmed upon creation. This might provide a - // performance improvement, in the form of cache hits, for sub clusters that are going to be - // warmed during steady state and are known at config load time. - repeated config.core.v3.SocketAddress preresolve_clusters = 4; -} diff --git a/src/main/proto/envoy/extensions/clusters/redis/v3/redis_cluster.proto b/src/main/proto/envoy/extensions/clusters/redis/v3/redis_cluster.proto deleted file mode 100644 index ba8f434..0000000 --- a/src/main/proto/envoy/extensions/clusters/redis/v3/redis_cluster.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.redis.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.redis.v3"; -option java_outer_classname = "RedisClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/redis/v3;redisv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Redis Cluster Configuration] -// This cluster adds support for `Redis Cluster `_, as part -// of :ref:`Envoy's support for Redis Cluster `. -// -// Redis Cluster is an extension of Redis which supports sharding and high availability (where a -// shard that loses its primary fails over to a replica, and designates it as the new primary). -// However, as there is no unified frontend or proxy service in front of Redis Cluster, the client -// (in this case Envoy) must locally maintain the state of the Redis Cluster, specifically the -// topology. A random node in the cluster is queried for the topology using the `CLUSTER SLOTS -// command `_. This result is then stored locally, and -// updated at user-configured intervals. -// -// Additionally, if -// :ref:`enable_redirection` -// is true, then moved and ask redirection errors from upstream servers will trigger a topology -// refresh when they exceed a user-configured error threshold. -// -// Example: -// -// .. code-block:: yaml -// -// name: name -// connect_timeout: 0.25s -// dns_lookup_family: V4_ONLY -// hosts: -// - socket_address: -// address: foo.bar.com -// port_value: 22120 -// cluster_type: -// name: envoy.clusters.redis -// typed_config: -// "@type": type.googleapis.com/google.protobuf.Struct -// value: -// cluster_refresh_rate: 30s -// cluster_refresh_timeout: 0.5s -// redirect_refresh_interval: 10s -// redirect_refresh_threshold: 10 -// [#extension: envoy.clusters.redis] - -// [#next-free-field: 7] -message RedisClusterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.redis.RedisClusterConfig"; - - // Interval between successive topology refresh requests. If not set, this defaults to 5s. - google.protobuf.Duration cluster_refresh_rate = 1 [(validate.rules).duration = {gt {}}]; - - // Timeout for topology refresh request. If not set, this defaults to 3s. - google.protobuf.Duration cluster_refresh_timeout = 2 [(validate.rules).duration = {gt {}}]; - - // The minimum interval that must pass after triggering a topology refresh request before a new - // request can possibly be triggered again. Any errors received during one of these - // time intervals are ignored. If not set, this defaults to 5s. - google.protobuf.Duration redirect_refresh_interval = 3; - - // The number of redirection errors that must be received before - // triggering a topology refresh request. If not set, this defaults to 5. - // If this is set to 0, topology refresh after redirect is disabled. - google.protobuf.UInt32Value redirect_refresh_threshold = 4; - - // The number of failures that must be received before triggering a topology refresh request. - // If not set, this defaults to 0, which disables the topology refresh due to failure. - uint32 failure_refresh_threshold = 5; - - // The number of hosts became degraded or unhealthy before triggering a topology refresh request. - // If not set, this defaults to 0, which disables the topology refresh due to degraded or - // unhealthy host. - uint32 host_degraded_refresh_threshold = 6; -} diff --git a/src/main/proto/envoy/extensions/clusters/reverse_connection/v3/reverse_connection.proto b/src/main/proto/envoy/extensions/clusters/reverse_connection/v3/reverse_connection.proto deleted file mode 100644 index 054ac14..0000000 --- a/src/main/proto/envoy/extensions/clusters/reverse_connection/v3/reverse_connection.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.clusters.reverse_connection.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.clusters.reverse_connection.v3"; -option java_outer_classname = "ReverseConnectionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/reverse_connection/v3;reverse_connectionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Reverse connection cluster] -// [#extension: envoy.clusters.reverse_connection] - -// Configuration for a cluster of type REVERSE_CONNECTION. -message ReverseConnectionClusterConfig { - // Time interval after which Envoy removes unused dynamic hosts created for reverse connections. - // Hosts that are not referenced by any connection pool are deleted during cleanup. - // - // If unset, Envoy uses a default of 60s. - google.protobuf.Duration cleanup_interval = 1 [(validate.rules).duration = {gt {}}]; - - // Host identifier format string. - // - // This format string is evaluated against the downstream request context to compute - // the host identifier for selecting the reverse connection endpoint. The format string - // supports Envoy's standard formatter syntax, including: - // - // * ``%REQ(header-name)%``: Extract request header value. - // * ``%DYNAMIC_METADATA(namespace:key)%``: Extract dynamic metadata value. - // * ``%CEL(expression)%``: Evaluate CEL expression. - // * ``%DOWNSTREAM_REMOTE_ADDRESS%``: Downstream connection address. - // * ``%DOWNSTREAM_LOCAL_ADDRESS%``: Downstream local address. - // * Plain text and combinations of the above. - // - // Examples: - // - // * ``%REQ(x-remote-node-id)%``: Use the value of the ``x-remote-node-id`` header. - // * ``%REQ(host):EXTRACT_FIRST_PART%``: Extract the first part of the Host header before a dot. - // * ``%CEL(request.headers['x-node-id'] | orValue('default'))%``: Use CEL with fallback. - // * ``node-%REQ(x-tenant-id)%-%REQ(x-region)%``: Combine multiple values. - // - // If the format string evaluates to an empty value, the request will not be routed. - string host_id_format = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/common/async_files/v3/async_file_manager.proto b/src/main/proto/envoy/extensions/common/async_files/v3/async_file_manager.proto deleted file mode 100644 index bbe531f..0000000 --- a/src/main/proto/envoy/extensions/common/async_files/v3/async_file_manager.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.async_files.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.async_files.v3"; -option java_outer_classname = "AsyncFileManagerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/async_files/v3;async_filesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: AsyncFileManager configuration] - -// Configuration to instantiate or select a singleton ``AsyncFileManager``. -message AsyncFileManagerConfig { - message ThreadPool { - // The number of threads to use. If unset or zero, will default to the number - // of concurrent threads the hardware supports. This default is subject to - // change if performance analysis suggests it. - uint32 thread_count = 1 [(validate.rules).uint32 = {lte: 1024}]; - } - - // An optional identifier for the manager. An empty string is a valid identifier - // for a common, default ``AsyncFileManager``. - // - // Reusing the same id with different configurations in the same envoy instance - // is an error. - string id = 1; - - oneof manager_type { - option (validate.required) = true; - - // Configuration for a thread-pool based async file manager. - ThreadPool thread_pool = 2; - } -} diff --git a/src/main/proto/envoy/extensions/common/aws/v3/credential_provider.proto b/src/main/proto/envoy/extensions/common/aws/v3/credential_provider.proto deleted file mode 100644 index 45ecf9b..0000000 --- a/src/main/proto/envoy/extensions/common/aws/v3/credential_provider.proto +++ /dev/null @@ -1,187 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.aws.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.aws.v3"; -option java_outer_classname = "CredentialProviderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/aws/v3;awsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: AWS common configuration] - -// Configuration for AWS credential provider. This is optional and the credentials are normally -// retrieved from the environment or AWS configuration files by following the default credential -// provider chain. However, this configuration can be used to override the default behavior. -// [#next-free-field: 11] -message AwsCredentialProvider { - // The option to use `AssumeRoleWithWebIdentity `_. - AssumeRoleWithWebIdentityCredentialProvider assume_role_with_web_identity_provider = 1; - - // The option to use an inline credential. If inline credential is provided, no chain will be created and only the inline credential will be used. - InlineCredentialProvider inline_credential = 2; - - // The option to specify parameters for credential retrieval from an envoy data source, such as a file in AWS credential format. - CredentialsFileCredentialProvider credentials_file_provider = 3; - - // Create a custom credential provider chain instead of the default credential provider chain. - // If set to TRUE, the credential provider chain that is created contains only those set in this credential provider message. - // If set to FALSE, the settings provided here will act as modifiers to the default credential provider chain. - // Defaults to FALSE. - // - // This has no effect if inline_credential is provided. - bool custom_credential_provider_chain = 4; - - // The option to use `IAM Roles Anywhere `_. - IAMRolesAnywhereCredentialProvider iam_roles_anywhere_credential_provider = 5; - - // The option to use credentials sourced from standard `AWS configuration files `_. - ConfigCredentialProvider config_credential_provider = 6; - - // The option to use credentials sourced from `container environment variables `_. - ContainerCredentialProvider container_credential_provider = 7; - - // The option to use credentials sourced from `environment variables `_. - EnvironmentCredentialProvider environment_credential_provider = 8; - - // The option to use credentials sourced from an EC2 `Instance Profile `_. - InstanceProfileCredentialProvider instance_profile_credential_provider = 9; - - // The option to use `STS:AssumeRole aka Role Chaining `_. - AssumeRoleCredentialProvider assume_role_credential_provider = 10; -} - -// Configuration to use an inline AWS credential. This is an equivalent to setting the well-known -// environment variables ``AWS_ACCESS_KEY_ID``, ``AWS_SECRET_ACCESS_KEY``, and the optional ``AWS_SESSION_TOKEN``. -message InlineCredentialProvider { - // The AWS access key ID. - string access_key_id = 1 [(validate.rules).string = {min_len: 1}]; - - // The AWS secret access key. - string secret_access_key = 2 - [(validate.rules).string = {min_len: 1}, (udpa.annotations.sensitive) = true]; - - // The AWS session token. This is optional. - string session_token = 3 [(udpa.annotations.sensitive) = true]; -} - -// Configuration to use `AssumeRoleWithWebIdentity `_ -// to retrieve AWS credentials. -message AssumeRoleWithWebIdentityCredentialProvider { - // Data source for a web identity token that is provided by the identity provider to assume the role. - // If a ``watched_directory`` is not provided, one will be automatically inferred from the directory of the token file. This is to ensure - // that if the token file is rotated, the new token will be picked up. This behaviour differs from the standard envoy data source behavior, which does not - // automatically watch the directory of a file data source. - // Even when file rotation occurs, current credentials will continue to be used until they expire, at which point new credentials will be retrieved using the new token. - config.core.v3.DataSource web_identity_token_data_source = 1 - [(udpa.annotations.sensitive) = true]; - - // The ARN of the role to assume. - string role_arn = 2 [(validate.rules).string = {min_len: 1}]; - - // Optional role session name to use in AssumeRoleWithWebIdentity API call. - string role_session_name = 3; -} - -message CredentialsFileCredentialProvider { - // Data source from which to retrieve AWS credentials - // When using this data source, if a ``watched_directory`` is provided, the credential file will be re-read when a file move is detected. - // See :ref:`watched_directory ` for more information about the ``watched_directory`` field. - config.core.v3.DataSource credentials_data_source = 1 [(udpa.annotations.sensitive) = true]; - - // The profile within the credentials_file data source. If not provided, the default profile will be used. - string profile = 2; -} - -// Configuration to use `IAM Roles Anywhere `_ -// to retrieve AWS credentials. -// [#next-free-field: 9] -message IAMRolesAnywhereCredentialProvider { - // The ARN of the role to assume via the IAM Roles Anywhere sessions API. See `Configure Roles `_ for more details. - string role_arn = 1 [(validate.rules).string = {min_len: 1}]; - - // The certificate used for authenticating to the IAM Roles Anywhere service. - // This certificate must match one configured in the IAM Roles Anywhere profile. See `Configure Roles `_ for more details. - config.core.v3.DataSource certificate = 2 [(validate.rules).message = {required: true}]; - - // The optional certificate chain, required when you are using a subordinate certificate authority for certificate issuance. - // A certificate chain can contain a maximum of 5 elements, see `The IAM Roles Anywhere authentication process `_ for more details. - config.core.v3.DataSource certificate_chain = 3; - - // The TLS private key matching the certificate provided. - config.core.v3.DataSource private_key = 4 - [(validate.rules).message = {required: true}, (udpa.annotations.sensitive) = true]; - - // The arn of the IAM Roles Anywhere trust anchor configured in your AWS account. A trust anchor in IAM Roles anywhere establishes - // trust between your certificate authority (CA) and AWS. See `Establish trust `_ for more details. - string trust_anchor_arn = 5 [(validate.rules).string = {min_len: 1}]; - - // The IAM Roles Anywhere profile ARN configured in your AWS account. - string profile_arn = 6 [(validate.rules).string = {min_len: 1}]; - - // An optional role session name, used when identifying the role in subsequent AWS API calls. - string role_session_name = 7; - - // An optional session duration, used when calculating the maximum time before vended credentials expire. This value cannot exceed the value configured - // in the IAM Roles Anywhere profile and the resultant session duration is calculate by the formula `here `_. - // If no session duration is provided here, the session duration is sourced from the IAM Roles Anywhere profile. - google.protobuf.Duration session_duration = 8 [(validate.rules).duration = { - lte {seconds: 43200} - gte {seconds: 900} - }]; -} - -// The Config Credential Provider has no configurable parameters, but listing it in a custom credential provider chain will enable this -// credential provider. -message ConfigCredentialProvider { -} - -// The Container Credential Provider has no configurable parameters, but listing it in a custom credential provider chain will enable this -// credential provider. -message ContainerCredentialProvider { -} - -// The Environment Credential Provider has no configurable parameters, but listing it in a custom credential provider chain will enable this -// credential provider. -message EnvironmentCredentialProvider { -} - -// The Instance Profile Credential Provider has no configurable parameters, but listing it in a custom credential provider chain will enable this -// credential provider. -message InstanceProfileCredentialProvider { -} - -// Configuration to use `AssumeRole `_ for retrieving new credentials, via role chaining. -// [#next-free-field: 6] -message AssumeRoleCredentialProvider { - // The ARN of the role to assume. - string role_arn = 1 [(validate.rules).string = {min_len: 1}]; - - // An optional role session name, used when identifying the role in subsequent AWS API calls. If not provided, the role session name will default - // to the current timestamp. - string role_session_name = 2; - - // Optional string value to use as the externalId - string external_id = 3; - - // An optional duration, in seconds, of the role session. Minimum role duration is 900s (5 minutes) and maximum is 43200s (12 hours). - // If the session duration is not provided, the default will be determined using the `table described here `_. - google.protobuf.Duration session_duration = 4 [(validate.rules).duration = { - lte {seconds: 43200} - gte {seconds: 900} - }]; - - // The credential provider for signing the AssumeRole request. This is optional and if not set, - // it will be retrieved from the procedure described in :ref:`config_http_filters_aws_request_signing`. - // This list of credential providers cannot include an AssumeRole credential provider and if one is provided - // it will be ignored. - AwsCredentialProvider credential_provider = 5; -} diff --git a/src/main/proto/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto b/src/main/proto/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto deleted file mode 100644 index cbd2309..0000000 --- a/src/main/proto/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto +++ /dev/null @@ -1,151 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.dynamic_forward_proxy.v3; - -import "envoy/config/cluster/v3/cluster.proto"; -import "envoy/config/common/key_value/v3/config.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/resolver.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.dynamic_forward_proxy.v3"; -option java_outer_classname = "DnsCacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic forward proxy common configuration] - -// Configuration of circuit breakers for resolver. -message DnsCacheCircuitBreakers { - // The maximum number of pending requests that Envoy will allow to the - // resolver. If not specified, the default is 1024. - google.protobuf.UInt32Value max_pending_requests = 1; -} - -// Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview -// ` for more information. -// [#next-free-field: 16] -message DnsCacheConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig"; - - // The name of the cache. Multiple named caches allow independent dynamic forward proxy - // configurations to operate within a single Envoy process using different configurations. All - // configurations with the same name *must* otherwise have the same settings when referenced - // from different configuration components. Configuration will fail to load if this is not - // the case. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The DNS lookup family to use during resolution. - // - // [#comment:TODO(mattklein123): Figure out how to support IPv4/IPv6 "happy eyeballs" mode. The - // way this might work is a new lookup family which returns both IPv4 and IPv6 addresses, and - // then configures a host to have a primary and fall back address. With this, we could very - // likely build a "happy eyeballs" connection pool which would race the primary / fall back - // address and return the one that wins. This same method could potentially also be used for - // QUIC to TCP fall back.] - config.cluster.v3.Cluster.DnsLookupFamily dns_lookup_family = 2 - [(validate.rules).enum = {defined_only: true}]; - - // The DNS refresh rate for unresolved DNS hosts. If not specified defaults to 60s. - // - // The refresh rate is rounded to the closest millisecond, and must be at least 1ms. - // - // Once a host has been resolved, the refresh rate will be the DNS TTL, capped - // at a minimum of ``dns_min_refresh_rate``. - google.protobuf.Duration dns_refresh_rate = 3 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // The minimum rate that DNS resolution will occur. Per ``dns_refresh_rate``, once a host is - // resolved, the DNS TTL will be used, with a minimum set by ``dns_min_refresh_rate``. - // ``dns_min_refresh_rate`` defaults to 5s and must also be >= 1s. - google.protobuf.Duration dns_min_refresh_rate = 14 - [(validate.rules).duration = {gte {seconds: 1}}]; - - // The TTL for hosts that are unused. Hosts that have not been used in the configured time - // interval will be purged. If not specified defaults to 5m. - // - // .. note: - // - // The TTL is only checked at the time of DNS refresh, as specified by ``dns_refresh_rate``. This - // means that if the configured TTL is shorter than the refresh rate the host may not be removed - // immediately. - // - // .. note: - // - // The TTL has no relation to DNS TTL and is only used to control Envoy's resource usage. - google.protobuf.Duration host_ttl = 4 [(validate.rules).duration = {gt {}}]; - - // The maximum number of hosts that the cache will hold. If not specified defaults to 1024. - // - // .. note: - // - // The implementation is approximate and enforced independently on each worker thread, thus - // it is possible for the maximum hosts in the cache to go slightly above the configured - // value depending on timing. This is similar to how other circuit breakers work. - google.protobuf.UInt32Value max_hosts = 5 [(validate.rules).uint32 = {gt: 0}]; - - // Disable the DNS refresh on failure. If this field is set to true, it will ignore the - // :ref:`typed_dns_resolver_config `. - // If not specified, it defaults to false. By enabling this feature, the failed hosts will now be treated as a cache miss, - // allowing the failed hosts to be resolved on demand. - bool disable_dns_refresh_on_failure = 15; - - // If the DNS failure refresh rate is specified, - // this is used as the cache's DNS refresh rate when DNS requests are failing. If this setting is - // not specified, the failure refresh rate defaults to the dns_refresh_rate. - config.cluster.v3.Cluster.RefreshRate dns_failure_refresh_rate = 6; - - // The config of circuit breakers for resolver. It provides a configurable threshold. - // Envoy will use dns cache circuit breakers with default settings even if this value is not set. - DnsCacheCircuitBreakers dns_cache_circuit_breaker = 7; - - // Always use TCP queries instead of UDP queries for DNS lookups. - // This field is deprecated in favor of ``dns_resolution_config`` - // which aggregates all of the DNS resolver configuration in a single message. - bool use_tcp_for_dns_lookups = 8 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolution configuration which includes the underlying dns resolver addresses and options. - // This field is deprecated in favor of - // :ref:`typed_dns_resolver_config `. - config.core.v3.DnsResolutionConfig dns_resolution_config = 9 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, - // or any other DNS resolver types and the related parameters. - // For example, an object of - // :ref:`CaresDnsResolverConfig ` - // can be packed into this ``typed_dns_resolver_config``. This configuration replaces the - // :ref:`dns_resolution_config ` - // configuration. - // During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exists, - // when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. - // When ``typed_dns_resolver_config`` is missing, the default behavior is in place. - // [#extension-category: envoy.network.dns_resolver] - config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 12; - - // Hostnames that should be preresolved into the cache upon creation. This might provide a - // performance improvement, in the form of cache hits, for hostnames that are going to be - // resolved during steady state and are known at config load time. - repeated config.core.v3.SocketAddress preresolve_hostnames = 10; - - // The timeout used for DNS queries. This timeout is independent of any timeout and retry policy - // used by the underlying DNS implementation (e.g., c-areas and Apple DNS) which are opaque. - // Setting this timeout will ensure that queries succeed or fail within the specified time frame - // and are then retried using the standard refresh rates. Setting it to 0 will disable the Envoy DNS - // query timeout and use the underlying DNS implementation timeout. Defaults to 5s if not set. - google.protobuf.Duration dns_query_timeout = 11 [(validate.rules).duration = {gte {}}]; - - // Configuration to flush the DNS cache to long term storage. - config.common.key_value.v3.KeyValueStoreConfig key_value_config = 13; -} diff --git a/src/main/proto/envoy/extensions/common/matching/v3/extension_matcher.proto b/src/main/proto/envoy/extensions/common/matching/v3/extension_matcher.proto deleted file mode 100644 index 817cd27..0000000 --- a/src/main/proto/envoy/extensions/common/matching/v3/extension_matcher.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.matching.v3; - -import "envoy/config/common/matcher/v3/matcher.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "xds/type/matcher/v3/matcher.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.matching.v3"; -option java_outer_classname = "ExtensionMatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/matching/v3;matchingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Extension matcher] - -// Wrapper around an existing extension that provides an associated matcher. This allows -// decorating an existing extension with a matcher, which can be used to match against -// relevant protocol data. -message ExtensionWithMatcher { - // The associated matcher. This is deprecated in favor of xds_matcher. - config.common.matcher.v3.Matcher matcher = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The associated matcher. - xds.type.matcher.v3.Matcher xds_matcher = 3; - - // The underlying extension config. - config.core.v3.TypedExtensionConfig extension_config = 2 - [(validate.rules).message = {required: true}]; -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -message ExtensionWithMatcherPerRoute { - // Matcher override. - xds.type.matcher.v3.Matcher xds_matcher = 1; -} diff --git a/src/main/proto/envoy/extensions/common/ratelimit/v3/ratelimit.proto b/src/main/proto/envoy/extensions/common/ratelimit/v3/ratelimit.proto deleted file mode 100644 index f9cba6d..0000000 --- a/src/main/proto/envoy/extensions/common/ratelimit/v3/ratelimit.proto +++ /dev/null @@ -1,159 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.ratelimit.v3; - -import "envoy/type/v3/ratelimit_unit.proto"; -import "envoy/type/v3/token_bucket.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.ratelimit.v3"; -option java_outer_classname = "RatelimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/ratelimit/v3;ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common rate limit components] - -// Defines the version of the standard to use for X-RateLimit headers. -enum XRateLimitHeadersRFCVersion { - // X-RateLimit headers disabled. - OFF = 0; - - // Use `draft RFC Version 03 `_ where 3 headers will be added: - // - // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the - // client in the current time-window followed by the description of the - // quota policy. The value is returned by the maximum tokens of the token bucket. - // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the - // current time-window. The value is returned by the remaining tokens in the token bucket. - // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of - // the current time-window. The value is returned by the remaining fill interval of the token bucket. - DRAFT_VERSION_03 = 1; -} - -enum VhRateLimitsOptions { - // Use the virtual host rate limits unless the route has a rate limit policy. - OVERRIDE = 0; - - // Use the virtual host rate limits even if the route has a rate limit policy. - INCLUDE = 1; - - // Ignore the virtual host rate limits even if the route does not have a rate limit policy. - IGNORE = 2; -} - -// A RateLimitDescriptor is a list of hierarchical entries that are used by the service to -// determine the final rate limit key and overall allowed limit. Here are some examples of how -// they might be used for the domain "envoy". -// -// .. code-block:: cpp -// -// ["authenticated": "false"], ["remote_address": "10.0.0.1"] -// -// What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The -// configuration supplies a default limit for the *remote_address* key. If there is a desire to -// raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the -// configuration. -// -// .. code-block:: cpp -// -// ["authenticated": "false"], ["path": "/foo/bar"] -// -// What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if -// configured that way in the service). -// -// .. code-block:: cpp -// -// ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"] -// -// What it does: Limits unauthenticated traffic to a specific path for a specific IP address. -// Like (1) we can raise/block specific IP addresses if we want with an override configuration. -// -// .. code-block:: cpp -// -// ["authenticated": "true"], ["client_id": "foo"] -// -// What it does: Limits all traffic for an authenticated client "foo" -// -// .. code-block:: cpp -// -// ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"] -// -// What it does: Limits traffic to a specific path for an authenticated client "foo" -// -// The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired. -// This enables building complex application scenarios with a generic backend. -// -// Optionally the descriptor can contain a limit override under a "limit" key, that specifies -// the number of requests per unit to use instead of the number configured in the -// rate limiting service. -message RateLimitDescriptor { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ratelimit.RateLimitDescriptor"; - - message Entry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.ratelimit.RateLimitDescriptor.Entry"; - - // Descriptor key. - string key = 1 [(validate.rules).string = {min_len: 1}]; - - // Descriptor value. Blank value is treated as wildcard to create dynamic token buckets for each unique value. - // Blank Values as wild card is currently supported only with envoy server instance level HTTP local rate limiting - // and will not work if HTTP local rate limiting is enabled per connection level. - string value = 2 [(validate.rules).string = {min_len: 0}]; - } - - // Override rate limit to apply to this descriptor instead of the limit - // configured in the rate limit service. See :ref:`rate limit override - // ` for more information. - message RateLimitOverride { - // The number of requests per unit of time. - uint32 requests_per_unit = 1; - - // The unit of time. - type.v3.RateLimitUnit unit = 2 [(validate.rules).enum = {defined_only: true}]; - } - - // Descriptor entries. - repeated Entry entries = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Optional rate limit override to supply to the ratelimit service. - RateLimitOverride limit = 2; - - // Optional hits_addend for the rate limit descriptor. If set the value will override the - // request level hits_addend. - google.protobuf.UInt64Value hits_addend = 3; -} - -// Configuration used to enable local rate limiting. -// -// .. note:: -// The ``LocalRateLimitDescriptor`` is used to configure a local rate limit rule with a token -// bucket algorithm. The ``RateLimitDescriptor`` is used to represent a list of symbols that -// are used to match against the rate limit rule. -// -message LocalRateLimitDescriptor { - // Descriptor entries. - repeated v3.RateLimitDescriptor.Entry entries = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Token Bucket algorithm for local ratelimiting. - type.v3.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; -} - -// Configuration used to enable local cluster level rate limiting where the token buckets -// will be shared across all the Envoy instances in the local cluster. -// A share will be calculated based on the membership of the local cluster dynamically -// and the configuration. When the limiter refilling the token bucket, the share will be -// applied. By default, the token bucket will be shared evenly. -// -// See :ref:`local cluster name -// ` for more context -// about local cluster. -message LocalClusterRateLimit { -} diff --git a/src/main/proto/envoy/extensions/common/tap/v3/common.proto b/src/main/proto/envoy/extensions/common/tap/v3/common.proto deleted file mode 100644 index d9f9e98..0000000 --- a/src/main/proto/envoy/extensions/common/tap/v3/common.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.common.tap.v3; - -import "envoy/config/tap/v3/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.common.tap.v3"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/common/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common tap extension configuration] - -// Common configuration for all tap extensions. -message CommonExtensionConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.tap.v2alpha.CommonExtensionConfig"; - - oneof config_type { - option (validate.required) = true; - - // If specified, the tap filter will be configured via an admin handler. - AdminConfig admin_config = 1; - - // If specified, the tap filter will be configured via a static configuration that cannot be - // changed. - config.tap.v3.TapConfig static_config = 2; - } -} - -// Configuration for the admin handler. See :ref:`here ` for -// more information. -message AdminConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.common.tap.v2alpha.AdminConfig"; - - // Opaque configuration ID. When requests are made to the admin handler, the passed opaque ID is - // matched to the configured filter opaque ID to determine which filter to configure. - string config_id = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/compression/brotli/compressor/v3/brotli.proto b/src/main/proto/envoy/extensions/compression/brotli/compressor/v3/brotli.proto deleted file mode 100644 index 4f9644a..0000000 --- a/src/main/proto/envoy/extensions/compression/brotli/compressor/v3/brotli.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.brotli.compressor.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.brotli.compressor.v3"; -option java_outer_classname = "BrotliProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/brotli/compressor/v3;compressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Brotli Compressor] -// [#extension: envoy.compression.brotli.compressor] - -// [#next-free-field: 7] -message Brotli { - enum EncoderMode { - DEFAULT = 0; - GENERIC = 1; - TEXT = 2; - FONT = 3; - } - - // Value from 0 to 11 that controls the main compression speed-density lever. - // The higher quality, the slower compression. The default value is 3. - google.protobuf.UInt32Value quality = 1 [(validate.rules).uint32 = {lte: 11}]; - - // A value used to tune encoder for specific input. For more information about modes, - // please refer to brotli manual: https://brotli.org/encode.html#aa6f - // This field will be set to "DEFAULT" if not specified. - EncoderMode encoder_mode = 2 [(validate.rules).enum = {defined_only: true}]; - - // Value from 10 to 24 that represents the base two logarithmic of the compressor's window size. - // Larger window results in better compression at the expense of memory usage. The default is 18. - // For more details about this parameter, please refer to brotli manual: - // https://brotli.org/encode.html#a9a8 - google.protobuf.UInt32Value window_bits = 3 [(validate.rules).uint32 = {lte: 24 gte: 10}]; - - // Value from 16 to 24 that represents the base two logarithmic of the compressor's input block - // size. Larger input block results in better compression at the expense of memory usage. The - // default is 24. For more details about this parameter, please refer to brotli manual: - // https://brotli.org/encode.html#a9a8 - google.protobuf.UInt32Value input_block_bits = 4 [(validate.rules).uint32 = {lte: 24 gte: 16}]; - - // Value for compressor's next output buffer. If not set, defaults to 4096. - google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; - - // If true, disables "literal context modeling" format feature. - // This flag is a "decoding-speed vs compression ratio" trade-off. - bool disable_literal_context_modeling = 6; -} diff --git a/src/main/proto/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto b/src/main/proto/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto deleted file mode 100644 index 401c780..0000000 --- a/src/main/proto/envoy/extensions/compression/brotli/decompressor/v3/brotli.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.brotli.decompressor.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.brotli.decompressor.v3"; -option java_outer_classname = "BrotliProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/brotli/decompressor/v3;decompressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Brotli Decompressor] -// [#extension: envoy.compression.brotli.decompressor] - -message Brotli { - // If true, disables "canny" ring buffer allocation strategy. - // Ring buffer is allocated according to window size, despite the real size of the content. - bool disable_ring_buffer_reallocation = 1; - - // Value for decompressor's next output buffer. If not set, defaults to 4096. - google.protobuf.UInt32Value chunk_size = 2 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/src/main/proto/envoy/extensions/compression/gzip/compressor/v3/gzip.proto b/src/main/proto/envoy/extensions/compression/gzip/compressor/v3/gzip.proto deleted file mode 100644 index 33816b8..0000000 --- a/src/main/proto/envoy/extensions/compression/gzip/compressor/v3/gzip.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.gzip.compressor.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.gzip.compressor.v3"; -option java_outer_classname = "GzipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/gzip/compressor/v3;compressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Gzip Compressor] -// [#extension: envoy.compression.gzip.compressor] - -// [#next-free-field: 6] -message Gzip { - // All the values of this enumeration translate directly to zlib's compression strategies. - // For more information about each strategy, please refer to zlib manual. - enum CompressionStrategy { - DEFAULT_STRATEGY = 0; - FILTERED = 1; - HUFFMAN_ONLY = 2; - RLE = 3; - FIXED = 4; - } - - enum CompressionLevel { - option allow_alias = true; - - DEFAULT_COMPRESSION = 0; - BEST_SPEED = 1; - COMPRESSION_LEVEL_1 = 1; - COMPRESSION_LEVEL_2 = 2; - COMPRESSION_LEVEL_3 = 3; - COMPRESSION_LEVEL_4 = 4; - COMPRESSION_LEVEL_5 = 5; - COMPRESSION_LEVEL_6 = 6; - COMPRESSION_LEVEL_7 = 7; - COMPRESSION_LEVEL_8 = 8; - COMPRESSION_LEVEL_9 = 9; - BEST_COMPRESSION = 9; - } - - // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values - // use more memory, but are faster and produce better compression results. The default value is 5. - google.protobuf.UInt32Value memory_level = 1 [(validate.rules).uint32 = {lte: 9 gte: 1}]; - - // A value used for selecting the zlib compression level. This setting will affect speed and - // amount of compression applied to the content. "BEST_COMPRESSION" provides higher compression - // at the cost of higher latency and is equal to "COMPRESSION_LEVEL_9". "BEST_SPEED" provides - // lower compression with minimum impact on response time, the same as "COMPRESSION_LEVEL_1". - // "DEFAULT_COMPRESSION" provides an optimal result between speed and compression. According - // to zlib's manual this level gives the same result as "COMPRESSION_LEVEL_6". - // This field will be set to "DEFAULT_COMPRESSION" if not specified. - CompressionLevel compression_level = 2 [(validate.rules).enum = {defined_only: true}]; - - // A value used for selecting the zlib compression strategy which is directly related to the - // characteristics of the content. Most of the time "DEFAULT_STRATEGY" will be the best choice, - // which is also the default value for the parameter, though there are situations when - // changing this parameter might produce better results. For example, run-length encoding (RLE) - // is typically used when the content is known for having sequences which same data occurs many - // consecutive times. For more information about each strategy, please refer to zlib manual. - CompressionStrategy compression_strategy = 3 [(validate.rules).enum = {defined_only: true}]; - - // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. - // Larger window results in better compression at the expense of memory usage. The default is 12 - // which will produce a 4096 bytes window. For more details about this parameter, please refer to - // zlib manual > deflateInit2. - google.protobuf.UInt32Value window_bits = 4 [(validate.rules).uint32 = {lte: 15 gte: 9}]; - - // Value for Zlib's next output buffer. If not set, defaults to 4096. - // See https://www.zlib.net/manual.html for more details. Also see - // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. - google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/src/main/proto/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto b/src/main/proto/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto deleted file mode 100644 index a338f6e..0000000 --- a/src/main/proto/envoy/extensions/compression/gzip/decompressor/v3/gzip.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.gzip.decompressor.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.gzip.decompressor.v3"; -option java_outer_classname = "GzipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/gzip/decompressor/v3;decompressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Gzip Decompressor] -// [#extension: envoy.compression.gzip.decompressor] - -message Gzip { - // Value from 9 to 15 that represents the base two logarithmic of the decompressor's window size. - // The decompression window size needs to be equal or larger than the compression window size. - // The default window size is 15. - // This is so that the decompressor can decompress a response compressed by a compressor with any compression window size. - // For more details about this parameter, please refer to `zlib manual `_ > inflateInit2. - google.protobuf.UInt32Value window_bits = 1 [(validate.rules).uint32 = {lte: 15 gte: 9}]; - - // Value for zlib's decompressor output buffer. If not set, defaults to 4096. - // See https://www.zlib.net/manual.html for more details. - google.protobuf.UInt32Value chunk_size = 2 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; - - // An upper bound to the number of times the output buffer is allowed to be bigger than the size of - // the accumulated input. This value is used to prevent decompression bombs. If not set, defaults to 100. - // [#comment:TODO(rojkov): Re-design the Decompressor interface to handle compression bombs gracefully instead of this quick solution. - // See https://github.com/envoyproxy/envoy/commit/d4c39e635603e2f23e1e08ddecf5a5fb5a706338 for details.] - google.protobuf.UInt32Value max_inflate_ratio = 3 [(validate.rules).uint32 = {lte: 1032 gte: 1}]; -} diff --git a/src/main/proto/envoy/extensions/compression/zstd/compressor/v3/zstd.proto b/src/main/proto/envoy/extensions/compression/zstd/compressor/v3/zstd.proto deleted file mode 100644 index 407fd8d..0000000 --- a/src/main/proto/envoy/extensions/compression/zstd/compressor/v3/zstd.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.zstd.compressor.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.zstd.compressor.v3"; -option java_outer_classname = "ZstdProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/zstd/compressor/v3;compressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Zstd Compressor] -// [#extension: envoy.compression.zstd.compressor] - -// [#next-free-field: 6] -message Zstd { - // Reference to http://facebook.github.io/zstd/zstd_manual.html - enum Strategy { - DEFAULT = 0; - FAST = 1; - DFAST = 2; - GREEDY = 3; - LAZY = 4; - LAZY2 = 5; - BTLAZY2 = 6; - BTOPT = 7; - BTULTRA = 8; - BTULTRA2 = 9; - } - - // Set compression parameters according to pre-defined compression level table. - // Note that exact compression parameters are dynamically determined, - // depending on both compression level and source content size (when known). - // Value 0 means default, and default level is 3. - // Setting a level does not automatically set all other compression parameters - // to default. Setting this will however eventually dynamically impact the compression - // parameters which have not been manually set. The manually set - // ones will 'stick'. - google.protobuf.UInt32Value compression_level = 1; - - // A 32-bits checksum of content is written at end of frame. If not set, defaults to false. - bool enable_checksum = 2; - - // The higher the value of selected strategy, the more complex it is, - // resulting in stronger and slower compression. - // Special: value 0 means "use default strategy". - Strategy strategy = 3 [(validate.rules).enum = {defined_only: true}]; - - // A dictionary for compression. Zstd offers dictionary compression, which greatly improves - // efficiency on small files and messages. Each dictionary will be generated with a dictionary ID - // that can be used to search the same dictionary during decompression. - // Please refer to `zstd manual `_ - // to train a specific dictionary for compression. - config.core.v3.DataSource dictionary = 4; - - // Value for compressor's next output buffer. If not set, defaults to 4096. - google.protobuf.UInt32Value chunk_size = 5 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/src/main/proto/envoy/extensions/compression/zstd/decompressor/v3/zstd.proto b/src/main/proto/envoy/extensions/compression/zstd/decompressor/v3/zstd.proto deleted file mode 100644 index fc417bc..0000000 --- a/src/main/proto/envoy/extensions/compression/zstd/decompressor/v3/zstd.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.compression.zstd.decompressor.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.compression.zstd.decompressor.v3"; -option java_outer_classname = "ZstdProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/compression/zstd/decompressor/v3;decompressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Zstd Decompressor] -// [#extension: envoy.compression.zstd.decompressor] - -message Zstd { - // Dictionaries for decompression. Zstd offers dictionary compression, which greatly improves - // efficiency on small files and messages. It is necessary to ensure that the dictionary used for - // decompression is the same as the compression dictionary. Multiple dictionaries can be set, and the - // dictionary will be automatically selected for decompression according to the dictionary ID in the - // source content. - // Please refer to `zstd manual `_ - // to train specific dictionaries for decompression. - repeated config.core.v3.DataSource dictionaries = 1; - - // Value for decompressor's next output buffer. If not set, defaults to 4096. - google.protobuf.UInt32Value chunk_size = 2 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/src/main/proto/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto b/src/main/proto/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto deleted file mode 100644 index 5f83eee..0000000 --- a/src/main/proto/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.config.validators.minimum_clusters.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.config.validators.minimum_clusters.v3"; -option java_outer_classname = "MinimumClustersProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/config/validators/minimum_clusters/v3;minimum_clustersv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Minimum Clusters] -// [#extension: envoy.config.validators.minimum_clusters_validator] - -// Validates a CDS config, and ensures that the number of clusters is above the -// set threshold. -message MinimumClustersValidator { - // The minimal clusters threshold. Any CDS config update leading to less than - // this number will be rejected. - // Default value is 0. - uint32 min_clusters_num = 1; -} diff --git a/src/main/proto/envoy/extensions/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index 46d4480..0000000 --- a/src/main/proto/envoy/extensions/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.dynamic_modules.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic Modules Common Configuration] - -// Configuration of a dynamic module. A dynamic module is a shared object file that can be loaded via -// ``dlopen`` by various Envoy extension points. -// -// How a module is loaded is determined by the extension point that uses it. For example, the HTTP -// filter loads the module when Envoy receives a configuration that references the module. If loading -// the module fails, the configuration will be rejected. -// -// A module is uniquely identified by its file path and the file's inode, depending on the platform. -// Notably, if the file path and the content of the file are the same, the shared object will be -// reused. -// -// A module must be compatible with the ABI specified in :repo:`abi.h -// `. Currently, compatibility is only guaranteed by an -// exact version match between the Envoy codebase and the dynamic module SDKs. In the future, after -// the ABI is stabilized, this restriction will be revisited. Until then, Envoy checks the hash of -// the ABI header files to ensure that the dynamic modules are built against the same version of the -// ABI. -message DynamicModuleConfig { - // The name of the dynamic module. - // - // The client is expected to have some configuration indicating where to search for the module. In - // Envoy, the search path can only be configured via the environment variable - // ``ENVOY_DYNAMIC_MODULES_SEARCH_PATH``. The actual search path is - // ``${ENVOY_DYNAMIC_MODULES_SEARCH_PATH}/lib${name}.so``. - // - // .. note:: - // There is some remaining work to make the search path configurable via command line options. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // If true, prevents the module from being unloaded with ``dlclose``. - // - // This is useful for modules that have global state that should not be unloaded. A module is - // closed when no more references to it exist in the process. For example, no HTTP filters are - // using the module (e.g. after configuration update). - // - // Defaults to ``false``. - bool do_not_close = 3; - - // If true, the dynamic module is loaded with the ``RTLD_GLOBAL`` flag. - // - // The dynamic module is loaded with the ``RTLD_LOCAL`` flag by default to avoid symbol conflicts - // when multiple modules are loaded. Set this to ``true`` to load the module with the - // ``RTLD_GLOBAL`` flag. This is useful for modules that need to share symbols with other dynamic - // libraries. For example, a module X may load another shared library Y that depends on some - // symbols defined in module X. In this case, module X must be loaded with the ``RTLD_GLOBAL`` - // flag so that the symbols defined in module X are visible to library Y. - // - // .. warning:: - // Use this option with caution as it may lead to symbol conflicts and undefined behavior if - // multiple modules define the same symbols and are loaded globally. - // - // Defaults to ``false``. - bool load_globally = 4; -} diff --git a/src/main/proto/envoy/extensions/early_data/v3/default_early_data_policy.proto b/src/main/proto/envoy/extensions/early_data/v3/default_early_data_policy.proto deleted file mode 100644 index 0ff42a2..0000000 --- a/src/main/proto/envoy/extensions/early_data/v3/default_early_data_policy.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.early_data.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.early_data.v3"; -option java_outer_classname = "DefaultEarlyDataPolicyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/early_data/v3;early_datav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP request early data policy] - -// [#extension: envoy.route.early_data_policy.default] -// The default rule to allow/disallow a request to be sent as early data. It's an empty config now. Configuring it will disallow any request to be sent over early data. -message DefaultEarlyDataPolicy { -} diff --git a/src/main/proto/envoy/extensions/filters/common/dependency/v3/dependency.proto b/src/main/proto/envoy/extensions/filters/common/dependency/v3/dependency.proto deleted file mode 100644 index 6fd390b..0000000 --- a/src/main/proto/envoy/extensions/filters/common/dependency/v3/dependency.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.common.dependency.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.common.dependency.v3"; -option java_outer_classname = "DependencyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/dependency/v3;dependencyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Filter dependency specification] - -// Dependency specification and string identifier. -message Dependency { - enum DependencyType { - HEADER = 0; - FILTER_STATE_KEY = 1; - DYNAMIC_METADATA = 2; - } - - // The kind of dependency. - DependencyType type = 1; - - // The string identifier for the dependency. - string name = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Dependency specification for a filter. For a filter chain to be valid, any -// dependency that is required must be provided by an earlier filter. -message FilterDependencies { - // A list of dependencies required on the decode path. - repeated Dependency decode_required = 1; - - // A list of dependencies provided on the decode path. - repeated Dependency decode_provided = 2; - - // A list of dependencies required on the encode path. - repeated Dependency encode_required = 3; - - // A list of dependencies provided on the encode path. - repeated Dependency encode_provided = 4; -} - -// Matching requirements for a filter. For a match tree to be used with a filter, the match -// requirements must be satisfied. -// -// This protobuf is provided by the filter implementation as a way to communicate the matching -// requirements to the filter factories, allowing for config rejection if the requirements are -// not satisfied. -message MatchingRequirements { - message DataInputAllowList { - // An explicit list of data inputs that are allowed to be used with this filter. - repeated string type_url = 1; - } - - DataInputAllowList data_input_allow_list = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/common/fault/v3/fault.proto b/src/main/proto/envoy/extensions/filters/common/fault/v3/fault.proto deleted file mode 100644 index ab24f5d..0000000 --- a/src/main/proto/envoy/extensions/filters/common/fault/v3/fault.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.common.fault.v3; - -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.common.fault.v3"; -option java_outer_classname = "FaultProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/fault/v3;faultv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common fault injection types] - -// Delay specification is used to inject latency into the -// HTTP/Mongo operation. -// [#next-free-field: 6] -message FaultDelay { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.fault.v2.FaultDelay"; - - enum FaultDelayType { - // Unused and deprecated. - FIXED = 0; - } - - // Fault delays are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderDelay { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.fault.v2.FaultDelay.HeaderDelay"; - } - - reserved 2, 1; - - reserved "type"; - - oneof fault_delay_secifier { - option (validate.required) = true; - - // Add a fixed delay before forwarding the operation upstream. See - // https://developers.google.com/protocol-buffers/docs/proto3#json for - // the JSON/YAML Duration mapping. For HTTP/Mongo, the specified - // delay will be injected before a new request/operation. - // This is required if type is FIXED. - google.protobuf.Duration fixed_delay = 3 [(validate.rules).duration = {gt {}}]; - - // Fault delays are controlled via an HTTP header (if applicable). - HeaderDelay header_delay = 5; - } - - // The percentage of operations/connections/requests on which the delay will be injected. - type.v3.FractionalPercent percentage = 4; -} - -// Describes a rate limit to be applied. -message FaultRateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.fault.v2.FaultRateLimit"; - - // Describes a fixed/constant rate limit. - message FixedLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.fault.v2.FaultRateLimit.FixedLimit"; - - // The limit supplied in KiB/s. - uint64 limit_kbps = 1 [(validate.rules).uint64 = {gte: 1}]; - } - - // Rate limits are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.fault.v2.FaultRateLimit.HeaderLimit"; - } - - oneof limit_type { - option (validate.required) = true; - - // A fixed rate limit. - FixedLimit fixed_limit = 1; - - // Rate limits are controlled via an HTTP header (if applicable). - HeaderLimit header_limit = 3; - } - - // The percentage of operations/connections/requests on which the rate limit will be injected. - type.v3.FractionalPercent percentage = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto b/src/main/proto/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto deleted file mode 100644 index 714930a..0000000 --- a/src/main/proto/envoy/extensions/filters/common/matcher/action/v3/skip_action.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.common.matcher.action.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.common.matcher.action.v3"; -option java_outer_classname = "SkipActionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/matcher/action/v3;actionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common match actions] - -// Configuration for the SkipFilter match action. When matching results in this action, the -// associated filter will be ignored for all filter callbacks (e.g. ``encodeHeaders``, ``encodeData``, -// etc. for HTTP filters) after the matcher arrives at the match, including the callback that -// caused the match result. For example, when used with a HTTP filter and the match result was -// resolved after receiving the HTTP response headers, the HTTP filter will *not* receive the -// response header callback. -// -// As a result, if this match action is resolved before the first filter callback (e.g. HTTP request -// headers), the filter will be completely skipped. -message SkipFilter { -} diff --git a/src/main/proto/envoy/extensions/filters/common/set_filter_state/v3/value.proto b/src/main/proto/envoy/extensions/filters/common/set_filter_state/v3/value.proto deleted file mode 100644 index 054529c..0000000 --- a/src/main/proto/envoy/extensions/filters/common/set_filter_state/v3/value.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.common.set_filter_state.v3; - -import "envoy/config/core/v3/substitution_format_string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.common.set_filter_state.v3"; -option java_outer_classname = "ValueProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/common/set_filter_state/v3;set_filter_statev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Set-Filter-State filter state value] - -// A filter state key and value pair. -// [#next-free-field: 7] -message FilterStateValue { - enum SharedWithUpstream { - // Object is not shared with the upstream internal connections. - NONE = 0; - - // Object is shared with the upstream internal connection. - ONCE = 1; - - // Object is shared with the upstream internal connection and any internal connection upstream from it. - TRANSITIVE = 2; - } - - oneof key { - option (validate.required) = true; - - // The name under which the filter state object will be stored and can be retrieved. - // - // When using :ref:`well-known filter state keys ` (e.g., - // ``envoy.network.upstream_server_name``, ``envoy.tcp_proxy.cluster``), the object key serves - // dual purpose where it identifies both where the data is stored and which factory creates the - // object. In this case, :ref:`factory_key - // ` - // is not needed. - // - // When using a custom key name which is not from the well-known list, you must also specify - // :ref:`factory_key - // ` - // to indicate which factory should create the object from your value. - // - // Example using a well-known key where ``factory_key`` is not needed: - // - // .. code-block:: yaml - // - // object_key: envoy.tcp_proxy.cluster - // format_string: - // text_format_source: - // inline_string: "my-cluster" - // - // Example using a custom key which requires a ``factory_key``: - // - // .. code-block:: yaml - // - // object_key: my.custom.key - // factory_key: envoy.string - // format_string: - // text_format_source: - // inline_string: "my-value" - // - string object_key = 1 [(validate.rules).string = {min_len: 1}]; - } - - // Specifies which registered factory should be used to create the filter state object from the - // provided value. This field is required when :ref:`object_key - // ` - // is a custom name not found in the :ref:`well-known filter state keys `. - // - // Each well-known key has a factory registered with the same name (e.g., the key - // ``envoy.tcp_proxy.cluster`` has a factory also named ``envoy.tcp_proxy.cluster``). For custom keys, - // use one of the following generic factories: - // - // * ``envoy.string``: Creates a generic string object. Use this for arbitrary string values that - // will be accessed via ``StringAccessor``. - // - // If not specified, defaults to the value of ``object_key``. - string factory_key = 6; - - oneof value { - option (validate.required) = true; - - // Uses the :ref:`format string ` to - // instantiate the filter state object value. - config.core.v3.SubstitutionFormatString format_string = 2; - } - - // If marked as read-only, the filter state key value is locked, and cannot - // be overridden by any filter, including this filter. - bool read_only = 3; - - // Configures the object to be shared with the upstream internal connections. See :ref:`internal upstream - // transport ` for more details on the filter state sharing with - // the internal connections. - SharedWithUpstream shared_with_upstream = 4; - - // Skip the update if the value evaluates to an empty string. - // This option can be used to supply multiple alternatives for the same filter state object key. - bool skip_if_empty = 5; -} diff --git a/src/main/proto/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto b/src/main/proto/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto deleted file mode 100644 index 6ba7477..0000000 --- a/src/main/proto/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.adaptive_concurrency.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/v3/http_status.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.adaptive_concurrency.v3"; -option java_outer_classname = "AdaptiveConcurrencyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/adaptive_concurrency/v3;adaptive_concurrencyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Adaptive Concurrency] -// Adaptive Concurrency Control :ref:`configuration overview -// `. -// [#extension: envoy.filters.http.adaptive_concurrency] - -// Configuration parameters for the gradient controller. -message GradientControllerConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.adaptive_concurrency.v2alpha.GradientControllerConfig"; - - // Parameters controlling the periodic recalculation of the concurrency limit from sampled request - // latencies. - message ConcurrencyLimitCalculationParams { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.adaptive_concurrency.v2alpha.GradientControllerConfig." - "ConcurrencyLimitCalculationParams"; - - // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. - google.protobuf.UInt32Value max_concurrency_limit = 2 [(validate.rules).uint32 = {gt: 0}]; - - // The period of time samples are taken to recalculate the concurrency limit. - google.protobuf.Duration concurrency_update_interval = 3 [(validate.rules).duration = { - required: true - gt {} - }]; - } - - // Parameters controlling the periodic minRTT recalculation. - // [#next-free-field: 7] - message MinimumRTTCalculationParams { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.adaptive_concurrency.v2alpha.GradientControllerConfig." - "MinimumRTTCalculationParams"; - - // The time interval between recalculating the minimum request round-trip time. Has to be - // positive. If set to zero, dynamic sampling of the minRTT is disabled. - google.protobuf.Duration interval = 1 [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // The fixed value for the minRTT. This value is used when minRTT is not sampled dynamically. - // If dynamic sampling of the minRTT is disabled, this field must be set. - google.protobuf.Duration fixed_value = 6 [(validate.rules).duration = {gt {}}]; - - // The number of requests to aggregate/sample during the minRTT recalculation window before - // updating. Defaults to 50. - google.protobuf.UInt32Value request_count = 2 [(validate.rules).uint32 = {gt: 0}]; - - // Randomized time delta that will be introduced to the start of the minRTT calculation window. - // This is represented as a percentage of the interval duration. Defaults to 15%. - // - // Example: If the interval is 10s and the jitter is 15%, the next window will begin - // somewhere in the range (10s - 11.5s). - type.v3.Percent jitter = 3; - - // The concurrency limit set while measuring the minRTT. Defaults to 3. - google.protobuf.UInt32Value min_concurrency = 4 [(validate.rules).uint32 = {gt: 0}]; - - // Amount added to the measured minRTT to add stability to the concurrency limit during natural - // variability in latency. This is expressed as a percentage of the measured value and can be - // adjusted to allow more or less tolerance to the sampled latency values. - // - // Defaults to 25%. - type.v3.Percent buffer = 5; - } - - // The percentile to use when summarizing aggregated samples. Defaults to p50. - type.v3.Percent sample_aggregate_percentile = 1; - - ConcurrencyLimitCalculationParams concurrency_limit_params = 2 - [(validate.rules).message = {required: true}]; - - MinimumRTTCalculationParams min_rtt_calc_params = 3 [(validate.rules).message = {required: true}]; -} - -message AdaptiveConcurrency { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.adaptive_concurrency.v2alpha.AdaptiveConcurrency"; - - oneof concurrency_controller_config { - option (validate.required) = true; - - // Gradient concurrency control will be used. - GradientControllerConfig gradient_controller_config = 1 - [(validate.rules).message = {required: true}]; - } - - // If set to false, the adaptive concurrency filter will operate as a pass-through filter. If the - // message is unspecified, the filter will be enabled. - config.core.v3.RuntimeFeatureFlag enabled = 2; - - // This field allows for a custom HTTP response status code to the downstream client when - // the concurrency limit has been exceeded. - // Defaults to 503 (Service Unavailable). - // - // .. note:: - // If this is set to < 400, 503 will be used instead. - type.v3.HttpStatus concurrency_limit_exceeded_status = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/admission_control/v3/admission_control.proto b/src/main/proto/envoy/extensions/filters/http/admission_control/v3/admission_control.proto deleted file mode 100644 index 83ccab7..0000000 --- a/src/main/proto/envoy/extensions/filters/http/admission_control/v3/admission_control.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.admission_control.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/v3/range.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.admission_control.v3"; -option java_outer_classname = "AdmissionControlProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/admission_control/v3;admission_controlv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Admission Control] -// [#extension: envoy.filters.http.admission_control] - -// [#next-free-field: 8] -message AdmissionControl { - // Default method of specifying what constitutes a successful request. All status codes that - // indicate a successful request must be explicitly specified if not relying on the default - // values. - message SuccessCriteria { - message HttpCriteria { - // Status code ranges that constitute a successful request. Configurable codes are in the - // range [100, 600). - repeated type.v3.Int32Range http_success_status = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - message GrpcCriteria { - // Status codes that constitute a successful request. - // Mappings can be found at: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md. - repeated uint32 grpc_success_status = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // If HTTP criteria are unspecified, all HTTP status codes below 500 are treated as successful - // responses. - // - // .. note:: - // - // The default HTTP codes considered successful by the admission controller are done so due - // to the unlikelihood that sending fewer requests would change their behavior (for example: - // redirects, unauthorized access, or bad requests won't be alleviated by sending less - // traffic). - HttpCriteria http_criteria = 1; - - // GRPC status codes to consider as request successes. If unspecified, defaults to: Ok, - // Cancelled, Unknown, InvalidArgument, NotFound, AlreadyExists, Unauthenticated, - // FailedPrecondition, OutOfRange, PermissionDenied, and Unimplemented. - // - // .. note:: - // - // The default gRPC codes that are considered successful by the admission controller are - // chosen because of the unlikelihood that sending fewer requests will change the behavior. - GrpcCriteria grpc_criteria = 2; - } - - // If set to false, the admission control filter will operate as a pass-through filter. If the - // message is unspecified, the filter will be enabled. - config.core.v3.RuntimeFeatureFlag enabled = 1; - - // Defines how a request is considered a success/failure. - oneof evaluation_criteria { - option (validate.required) = true; - - SuccessCriteria success_criteria = 2; - } - - // The sliding time window over which the success rate is calculated. The window is rounded to the - // nearest second. Defaults to 30s. - google.protobuf.Duration sampling_window = 3; - - // Rejection probability is defined by the formula:: - // - // max(0, (rq_count - rq_success_count / sr_threshold) / (rq_count + 1)) ^ (1 / aggression) - // - // The aggression dictates how heavily the admission controller will throttle requests upon SR - // dropping at or below the threshold. A value of 1 will result in a linear increase in - // rejection probability as SR drops. Any values less than 1.0, will be set to 1.0. If the - // message is unspecified, the aggression is 1.0. See `the admission control documentation - // `_ - // for a diagram illustrating this. - config.core.v3.RuntimeDouble aggression = 4; - - // Dictates the success rate at which the rejection probability is non-zero. As success rate drops - // below this threshold, rejection probability will increase. Any success rate above the threshold - // results in a rejection probability of 0. Defaults to 95%. - config.core.v3.RuntimePercent sr_threshold = 5; - - // If the average RPS of the sampling window is below this threshold, the request - // will not be rejected, even if the success rate is lower than sr_threshold. - // Defaults to 0. - config.core.v3.RuntimeUInt32 rps_threshold = 6; - - // The probability of rejection will never exceed this value, even if the failure rate is rising. - // Defaults to 80%. - config.core.v3.RuntimePercent max_rejection_probability = 7; -} diff --git a/src/main/proto/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto b/src/main/proto/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto deleted file mode 100644 index e3bea6f..0000000 --- a/src/main/proto/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.alternate_protocols_cache.v3; - -import "envoy/config/core/v3/protocol.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.alternate_protocols_cache.v3"; -option java_outer_classname = "AlternateProtocolsCacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/alternate_protocols_cache/v3;alternate_protocols_cachev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Alternate Protocols Cache] - -// Configuration for the alternate protocols cache HTTP filter. -// [#extension: envoy.filters.http.alternate_protocols_cache] -message FilterConfig { - // This field is ignored: the alternate protocols cache filter will use the - // cache for the cluster the request is routed to. - config.core.v3.AlternateProtocolsCacheOptions alternate_protocols_cache_options = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto b/src/main/proto/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto deleted file mode 100644 index 87e05cb..0000000 --- a/src/main/proto/envoy/extensions/filters/http/api_key_auth/v3/api_key_auth.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.api_key_auth.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.api_key_auth.v3"; -option java_outer_classname = "ApiKeyAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/api_key_auth/v3;api_key_authv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: APIKey Auth] -// APIKey Auth :ref:`configuration overview `. -// [#extension: envoy.filters.http.api_key_auth] - -// API Key HTTP authentication. -// -// For example, the following configuration configures the filter to authenticate the clients using -// the API key from the header ``X-API-KEY``. And only the clients with the key ``real-key`` are -// considered as authenticated. The client information is configured to be forwarded -// in the header ``x-client-id``. -// -// .. code-block:: yaml -// -// credentials: -// - key: real-key -// client: user -// key_sources: -// - header: "X-API-KEY" -// forwarding: -// header: "x-client-id" -// hide_credentials: false -// -message ApiKeyAuth { - // The credentials that are used to authenticate the clients. - repeated Credential credentials = 1 [(udpa.annotations.sensitive) = true]; - - // The key sources to fetch the key from the coming request. - repeated KeySource key_sources = 2; - - // Optional configuration to control what information should be propagated to upstream services. - Forwarding forwarding = 3; -} - -// API key auth configuration of per route or per virtual host or per route configuration. -message ApiKeyAuthPerRoute { - // The credentials that are used to authenticate the clients. If this field is non-empty, then the - // credentials in the filter level configuration will be ignored and the credentials in this - // configuration will be used. - repeated Credential credentials = 1 [(udpa.annotations.sensitive) = true]; - - // The key sources to fetch the key from the coming request. If this field is non-empty, then the - // key sources in the filter level configuration will be ignored and the key sources in this - // configuration will be used. - repeated KeySource key_sources = 2; - - // A list of clients that are allowed to access the route or vhost. The clients listed here - // should be subset of the clients listed in the ``credentials`` to provide authorization control - // after the authentication is successful. If the list is empty, then all authenticated clients - // are allowed. This provides very limited but simple authorization. If more complex authorization - // is required, then use the :ref:`HTTP RBAC filter ` instead. - // - // .. note:: - // Setting this field and ``credentials`` at the same configuration entry is not an error but - // also makes no much sense because they provide similar functionality. Please only use - // one of them at same configuration entry except for the case that you want to share the same - // credentials list across multiple routes but still use different allowed clients for each - // route. - // - repeated string allowed_clients = 3; - - // Optional configuration to control what information should be propagated to upstream services. - // If this field is non-empty, then the forwarding information in the filter level configuration - // will be ignored and the forwarding in this configuration will be used. - Forwarding forwarding = 4; -} - -// Single credential entry that contains the API key and the related client id. -message Credential { - // The value of the unique API key. - string key = 1 [(validate.rules).string = {min_len: 1}]; - - // The unique id or identity that used to identify the client or consumer. - string client = 2 [(validate.rules).string = {min_len: 1}]; -} - -message KeySource { - // The header name to fetch the key. If multiple header values are present, the first one will be - // used. If the header value starts with 'Bearer ', this prefix will be stripped to get the - // key value. - // - // If set, takes precedence over ``query`` and ``cookie``. - string header = 1 - [(validate.rules).string = - {max_len: 1024 well_known_regex: HTTP_HEADER_NAME strict: false ignore_empty: true}]; - - // The query parameter name to fetch the key. If multiple query values are present, the first one - // will be used. - // - // The field will be used if ``header`` is not set. If set, takes precedence over ``cookie``. - string query = 2 [(validate.rules).string = {max_len: 1024}]; - - // The cookie name to fetch the key. - // - // The field will be used if the ``header`` and ``query`` are not set. - string cookie = 3 - [(validate.rules).string = - {max_len: 1024 well_known_regex: HTTP_HEADER_NAME strict: false ignore_empty: true}]; -} - -message Forwarding { - // The header name in which to store the client information. If this field is non-empty, - // the client string associated with the matched credential will be injected into - // the request before forwarding upstream. - string header = 1 - [(validate.rules).string = {max_len: 1024 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // If true, remove the API key from the request before forwarding upstream. - // - // This applies to all configured key sources: ``header``, ``query``, and ``cookie``. - bool hide_credentials = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto b/src/main/proto/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto deleted file mode 100644 index 9200ae9..0000000 --- a/src/main/proto/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto +++ /dev/null @@ -1,102 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.aws_lambda.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.aws_lambda.v3"; -option java_outer_classname = "AwsLambdaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/aws_lambda/v3;aws_lambdav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: AWS Lambda] -// AWS Lambda :ref:`configuration overview `. -// [#extension: envoy.filters.http.aws_lambda] - -// AWS Lambda filter config -// [#next-free-field: 7] -message Config { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.aws_lambda.v2alpha.Config"; - - enum InvocationMode { - // This is the more common mode of invocation, in which Lambda responds after it has completed the function. In - // this mode the output of the Lambda function becomes the response of the HTTP request. - SYNCHRONOUS = 0; - - // In this mode Lambda responds immediately but continues to process the function asynchronously. This mode can be - // used to signal events for example. In this mode, Lambda responds with an acknowledgment that it received the - // call which is translated to an HTTP 200 OK by the filter. - ASYNCHRONOUS = 1; - } - - // The ARN of the AWS Lambda to invoke when the filter is engaged - // Must be in the following format: - // arn::lambda:::function: - string arn = 1 [(validate.rules).string = {min_len: 1}]; - - // Whether to transform the request (headers and body) to a JSON payload or pass it as is. - bool payload_passthrough = 2; - - // Determines the way to invoke the Lambda function. - InvocationMode invocation_mode = 3 [(validate.rules).enum = {defined_only: true}]; - - // Indicates that before signing headers, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - // - // .. note:: - // This rewrite affects both signing and host header forwarding. However, this - // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the - // value set here would be used for signing whereas the value set in the HCM would be used - // for host header forwarding which is not the desired outcome. - // - // Changing the value of the host header can result in a different route to be selected - // if an HTTP filter after AWS lambda re-evaluates the route (clears route cache). - string host_rewrite = 4; - - // Specifies the credentials profile to be used from the AWS credentials file. - // This parameter is optional. If set, it will override the value set in the AWS_PROFILE env variable and - // the provider chain is limited to the AWS credentials file Provider. - // If credentials configuration is provided, this configuration will be ignored. - // If this field is provided, then the default providers chain specified in the documentation will be ignored. - // (See :ref:`default credentials providers `). - string credentials_profile = 5; - - // Specifies the credentials to be used. This parameter is optional and if it is set, - // it will override other providers and will take precedence over credentials_profile. - // The provider chain is limited to the configuration credentials provider. - // If this field is provided, then the default providers chain specified in the documentation will be ignored. - // (See :ref:`default credentials providers `). - // - // .. warning:: - // Distributing the AWS credentials via this configuration should not be done in production. - Credentials credentials = 6; -} - -// AWS Lambda Credentials config. -message Credentials { - // AWS access key id. - string access_key_id = 1 [(validate.rules).string = {min_len: 1}]; - - // AWS secret access key. - string secret_access_key = 2 [(validate.rules).string = {min_len: 1}]; - - // AWS session token. - // This parameter is optional. If it is set to empty string it will not be consider in the request. - // It is required if temporary security credentials retrieved directly from AWS STS operations are used. - string session_token = 3; -} - -// Per-route configuration for AWS Lambda. This can be useful when invoking a different Lambda function or a different -// version of the same Lambda depending on the route. -message PerRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.aws_lambda.v2alpha.PerRouteConfig"; - - Config invoke_config = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto b/src/main/proto/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto deleted file mode 100644 index 64678be..0000000 --- a/src/main/proto/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto +++ /dev/null @@ -1,146 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.aws_request_signing.v3; - -import "envoy/extensions/common/aws/v3/credential_provider.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.aws_request_signing.v3"; -option java_outer_classname = "AwsRequestSigningProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/aws_request_signing/v3;aws_request_signingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: AwsRequestSigning] -// AwsRequestSigning :ref:`configuration overview `. -// [#extension: envoy.filters.http.aws_request_signing] - -// Top level configuration for the AWS request signing filter. -// [#next-free-field: 10] -message AwsRequestSigning { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.aws_request_signing.v2alpha.AwsRequestSigning"; - - enum SigningAlgorithm { - // Use SigV4 for signing - AWS_SIGV4 = 0; - - // Use SigV4A for signing - AWS_SIGV4A = 1; - } - - message QueryString { - // Optional expiration time for the query string parameters. As query string parameter based requests are replayable, in effect representing - // an API call that has already been authenticated, it is recommended to keep this expiration time as short as feasible. - // This value will default to 5 seconds and has a maximum value of 3600 seconds (1 hour). - google.protobuf.Duration expiration_time = 1 [(validate.rules).duration = { - lte {seconds: 3600} - gte {seconds: 1} - }]; - } - - // The `service namespace - // `_ - // of the HTTP endpoint. - // - // Example: s3 - string service_name = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional region string. If region is not provided, the region will be retrieved from the environment - // or AWS configuration files. See :ref:`config_http_filters_aws_request_signing_region` for more details. - // - // When signing_algorithm is set to ``AWS_SIGV4`` the region is a standard AWS `region `_ string for the service - // hosting the HTTP endpoint. - // - // Example: ``us-west-2`` - // - // When signing_algorithm is set to ``AWS_SIGV4A`` the region is used as a region set. - // - // A region set is a comma separated list of AWS regions, such as ``us-east-1,us-east-2`` or wildcard ``*`` - // or even region strings containing wildcards such as ``us-east-*`` - // - // Example: ``'*'`` - // - // By configuring a region set, a SigV4A signed request can be sent to multiple regions, rather than being - // valid for only a single region destination. - string region = 2; - - // Indicates that before signing headers, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - // - // .. note:: - // This rewrite affects both signing and host header forwarding. However, this - // option shouldn't be used with - // :ref:`HCM host rewrite ` given that the - // value set here would be used for signing whereas the value set in the HCM would be used - // for host header forwarding which is not the desired outcome. - string host_rewrite = 3; - - // Instead of buffering the request to calculate the payload hash, use the literal string ``UNSIGNED-PAYLOAD`` - // to calculate the payload hash. Not all services support this option. See the `S3 - // `_ policy for details. - bool use_unsigned_payload = 4; - - // A list of request header string matchers that will be excluded from signing. The excluded header can be matched by - // any patterns defined in the StringMatcher proto (e.g. exact string, prefix, regex, etc). - // - // Example: - // - // .. code-block:: yaml - // - // match_excluded_headers: - // - prefix: x-envoy - // - exact: foo - // - exact: bar - // - // When applied, all headers that start with ``x-envoy`` and headers ``foo`` and ``bar`` will not be signed. - repeated type.matcher.v3.StringMatcher match_excluded_headers = 5; - - // Optional Signing algorithm specifier, either ``AWS_SIGV4`` or ``AWS_SIGV4A``, defaulting to ``AWS_SIGV4``. - SigningAlgorithm signing_algorithm = 6; - - // If set, use the query string to store output of SigV4 or SigV4A calculation, rather than HTTP headers. The ``Authorization`` header will not be modified if ``query_string`` - // is configured. - // - // Example: - // query_string: {} - // - QueryString query_string = 7; - - // The credential provider for signing the request. This is optional and if not set, - // it will be retrieved using the procedure described in :ref:`config_http_filters_aws_request_signing`. - common.aws.v3.AwsCredentialProvider credential_provider = 8; - - // A list of request header string matchers that will be included during signing. The included header can be matched by - // any patterns defined in the StringMatcher proto (e.g. exact string, prefix, regex, etc). - // match_included_headers takes precedence over match_excluded_headers - if match_included_headers is set, only those headers will be signed and match_excluded_headers will be ignored. - // Required headers for signing such as ``host`` will always be signed regardless of this setting. The required headers are determined via ``CanonicalHeaders`` section in the AWS documentation `here `_. - // - // Example: - // - // .. code-block:: yaml - // - // match_included_headers: - // - prefix: x-envoy - // - exact: foo - // - exact: bar - // - // When applied, all headers that start with ``x-envoy`` and headers ``foo`` and ``bar`` will be signed and all other headers will be excluded from signing except required headers. - repeated type.matcher.v3.StringMatcher match_included_headers = 9; -} - -message AwsRequestSigningPerRoute { - // Override the global configuration of the filter with this new config. - // This overrides the entire message of AwsRequestSigning and not at field level. - AwsRequestSigning aws_request_signing = 1; - - // The human readable prefix to use when emitting stats. - string stat_prefix = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto b/src/main/proto/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto deleted file mode 100644 index 0d9ae74..0000000 --- a/src/main/proto/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.bandwidth_limit.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.bandwidth_limit.v3"; -option java_outer_classname = "BandwidthLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/bandwidth_limit/v3;bandwidth_limitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Bandwidth limit] -// Bandwidth limit :ref:`configuration overview `. -// [#extension: envoy.filters.http.bandwidth_limit] - -// [#next-free-field: 8] -message BandwidthLimit { - // Defines the mode for the bandwidth limit filter. - // Values represent bitmask. - enum EnableMode { - // Filter is disabled. - DISABLED = 0; - - // Filter enabled only for incoming traffic. - REQUEST = 1; - - // Filter enabled only for outgoing traffic. - RESPONSE = 2; - - // Filter enabled for both incoming and outgoing traffic. - REQUEST_AND_RESPONSE = 3; - } - - // The human readable prefix to use when emitting stats. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The enable mode for the bandwidth limit filter. - // Default is Disabled. - EnableMode enable_mode = 2 [(validate.rules).enum = {defined_only: true}]; - - // The limit supplied in KiB/s. - // - // .. note:: - // It's fine for the limit to be unset for the global configuration since the bandwidth limit - // can be applied at a the virtual host or route level. Thus, the limit must be set for the - // per route configuration otherwise the config will be rejected. - // - // .. note:: - // When using per route configuration, the limit becomes unique to that route. - // - google.protobuf.UInt64Value limit_kbps = 3 [(validate.rules).uint64 = {gte: 1}]; - - // Optional Fill interval in milliseconds for the token refills. Defaults to 50ms. - // It must be at least 20ms to avoid too aggressive refills. - google.protobuf.Duration fill_interval = 4 [(validate.rules).duration = { - lte {seconds: 1} - gte {nanos: 20000000} - }]; - - // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults - // to enabled. - config.core.v3.RuntimeFeatureFlag runtime_enabled = 5; - - // Enable response trailers. - // - // .. note:: - // - // If set true, the following 4 trailers will be added, prefixed by ``response_trailer_prefix``: - // * bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer including request body transfer time and the time added by the filter. - // * bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer including response body transfer time and the time added by the filter. - // * bandwidth-request-filter-delay-ms: delay time in milliseconds in request stream transfer added by the filter. - // * bandwidth-response-filter-delay-ms: delay time in milliseconds that added by the filter. - // If :ref:`enable_mode ` is ``DISABLED`` or ``REQUEST``, the trailers will not be set. - // If both the request and response delay time is 0, the trailers will not be set. - // - bool enable_response_trailers = 6; - - // Optional The prefix for the response trailers. - string response_trailer_prefix = 7 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/basic_auth/v3/basic_auth.proto b/src/main/proto/envoy/extensions/filters/http/basic_auth/v3/basic_auth.proto deleted file mode 100644 index af3c442..0000000 --- a/src/main/proto/envoy/extensions/filters/http/basic_auth/v3/basic_auth.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.basic_auth.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.basic_auth.v3"; -option java_outer_classname = "BasicAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/basic_auth/v3;basic_authv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Basic Auth] -// Basic Auth :ref:`configuration overview `. -// [#extension: envoy.filters.http.basic_auth] - -// Basic HTTP authentication. -// -// Example: -// -// .. code-block:: yaml -// -// users: -// inline_string: |- -// user1:{SHA}hashed_user1_password -// user2:{SHA}hashed_user2_password -// -message BasicAuth { - // Username-password pairs used to verify user credentials in the "Authorization" header. - // The value needs to be the htpasswd format. - // Reference to https://httpd.apache.org/docs/2.4/programs/htpasswd.html - config.core.v3.DataSource users = 1 [(udpa.annotations.sensitive) = true]; - - // This field specifies the header name to forward a successfully authenticated user to - // the backend. The header will be added to the request with the username as the value. - // - // If it is not specified, the username will not be forwarded. - string forward_username_header = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // This field specifies the request header to load the basic credential from. - // - // If it is not specified, the filter loads the credential from the "Authorization" header. - string authentication_header = 3 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} - -// Extra settings that may be added to per-route configuration for -// a virtual host or a cluster. -message BasicAuthPerRoute { - // Username-password pairs for this route. - config.core.v3.DataSource users = 1 - [(validate.rules).message = {required: true}, (udpa.annotations.sensitive) = true]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/buffer/v3/buffer.proto b/src/main/proto/envoy/extensions/filters/http/buffer/v3/buffer.proto deleted file mode 100644 index 1733abb..0000000 --- a/src/main/proto/envoy/extensions/filters/http/buffer/v3/buffer.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.buffer.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.buffer.v3"; -option java_outer_classname = "BufferProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/buffer/v3;bufferv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Buffer] -// Buffer :ref:`configuration overview `. -// [#extension: envoy.filters.http.buffer] - -message Buffer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.buffer.v2.Buffer"; - - reserved 2; - - // The maximum request size that the filter will buffer before the connection - // manager will stop buffering and return a 413 response. - google.protobuf.UInt32Value max_request_bytes = 1 - [(validate.rules).uint32 = {gt: 0}, (validate.rules).message = {required: true}]; -} - -message BufferPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.buffer.v2.BufferPerRoute"; - - oneof override { - option (validate.required) = true; - - // Disable the buffer filter for this particular vhost or route. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Override the global configuration of the filter with this new config. - Buffer buffer = 2 [(validate.rules).message = {required: true}]; - } -} diff --git a/src/main/proto/envoy/extensions/filters/http/cache/v3/cache.proto b/src/main/proto/envoy/extensions/filters/http/cache/v3/cache.proto deleted file mode 100644 index 70687b7..0000000 --- a/src/main/proto/envoy/extensions/filters/http/cache/v3/cache.proto +++ /dev/null @@ -1,96 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.cache.v3; - -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cache.v3"; -option java_outer_classname = "CacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cache/v3;cachev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP Cache Filter] - -// [#extension: envoy.filters.http.cache] -// [#next-free-field: 7] -message CacheConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.cache.v2alpha.CacheConfig"; - - // [#not-implemented-hide:] - // Modifies cache key creation by restricting which parts of the URL are included. - message KeyCreatorParams { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.cache.v2alpha.CacheConfig.KeyCreatorParams"; - - // If true, exclude the URL scheme from the cache key. Set to true if your origins always - // produce the same response for http and https requests. - bool exclude_scheme = 1; - - // If true, exclude the host from the cache key. Set to true if your origins' responses don't - // ever depend on host. - bool exclude_host = 2; - - // If ``query_parameters_included`` is nonempty, only query parameters matched - // by one or more of its matchers are included in the cache key. Any other - // query params will not affect cache lookup. - repeated config.route.v3.QueryParameterMatcher query_parameters_included = 3; - - // If ``query_parameters_excluded`` is nonempty, query parameters matched by one - // or more of its matchers are excluded from the cache key (even if also - // matched by ``query_parameters_included``), and will not affect cache lookup. - repeated config.route.v3.QueryParameterMatcher query_parameters_excluded = 4; - } - - // Config specific to the cache storage implementation. Required unless ``disabled`` - // is true. - // [#extension-category: envoy.http.cache] - google.protobuf.Any typed_config = 1; - - // When true, the cache filter is a no-op filter. - // - // Possible use-cases for this include: - // - Turning a filter on and off with :ref:`ECDS `. - // [#comment: once route-specific overrides are implemented, they are the more likely use-case.] - google.protobuf.BoolValue disabled = 5; - - // List of matching rules that defines allowed ``Vary`` headers. - // - // The ``vary`` response header holds a list of header names that affect the - // contents of a response, as described by - // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. - // - // During insertion, ``allowed_vary_headers`` acts as a allowlist: if a - // response's ``vary`` header mentions any header names that aren't matched by any rules in - // ``allowed_vary_headers``, that response will not be cached. - // - // During lookup, ``allowed_vary_headers`` controls what request headers will be - // sent to the cache storage implementation. - repeated type.matcher.v3.StringMatcher allowed_vary_headers = 2; - - // [#not-implemented-hide:] - // - // - // Modifies cache key creation by restricting which parts of the URL are included. - KeyCreatorParams key_creator_params = 3; - - // [#not-implemented-hide:] - // - // - // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache - // storage implementation may have its own limit beyond which it will reject insertions). - uint32 max_body_bytes = 4; - - // By default, a ``cache-control: no-cache`` or ``pragma: no-cache`` header in the request - // causes the cache to validate with its upstream even if the lookup is a hit. Setting this - // to true will ignore these headers. - bool ignore_request_cache_control_header = 6; -} diff --git a/src/main/proto/envoy/extensions/filters/http/cache_v2/v3/cache.proto b/src/main/proto/envoy/extensions/filters/http/cache_v2/v3/cache.proto deleted file mode 100644 index 9a335f5..0000000 --- a/src/main/proto/envoy/extensions/filters/http/cache_v2/v3/cache.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.cache_v2.v3; - -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cache_v2.v3"; -option java_outer_classname = "CacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cache_v2/v3;cache_v2v3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: HTTP Cache Filter V2] - -// [#extension: envoy.filters.http.cache_v2] -// [#next-free-field: 8] -message CacheV2Config { - // [#not-implemented-hide:] - // Modifies cache key creation by restricting which parts of the URL are included. - message KeyCreatorParams { - // If true, exclude the URL scheme from the cache key. Set to true if your origins always - // produce the same response for http and https requests. - bool exclude_scheme = 1; - - // If true, exclude the host from the cache key. Set to true if your origins' responses don't - // ever depend on host. - bool exclude_host = 2; - - // If ``query_parameters_included`` is nonempty, only query parameters matched - // by one or more of its matchers are included in the cache key. Any other - // query params will not affect cache lookup. - repeated config.route.v3.QueryParameterMatcher query_parameters_included = 3; - - // If ``query_parameters_excluded`` is nonempty, query parameters matched by one - // or more of its matchers are excluded from the cache key (even if also - // matched by ``query_parameters_included``), and will not affect cache lookup. - repeated config.route.v3.QueryParameterMatcher query_parameters_excluded = 4; - } - - // Config specific to the cache storage implementation. Required unless ``disabled`` - // is true. - // [#extension-category: envoy.http.cache_v2] - google.protobuf.Any typed_config = 1; - - // When true, the cache filter is a no-op filter. - // - // Possible use-cases for this include: - // - Turning a filter on and off with :ref:`ECDS `. - // [#comment: once route-specific overrides are implemented, they are the more likely use-case.] - google.protobuf.BoolValue disabled = 5; - - // [#not-implemented-hide:] - // List of matching rules that defines allowed ``Vary`` headers. - // - // The ``vary`` response header holds a list of header names that affect the - // contents of a response, as described by - // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. - // - // During insertion, ``allowed_vary_headers`` acts as a allowlist: if a - // response's ``vary`` header mentions any header names that aren't matched by any rules in - // ``allowed_vary_headers``, that response will not be cached. - // - // During lookup, ``allowed_vary_headers`` controls what request headers will be - // sent to the cache storage implementation. - repeated type.matcher.v3.StringMatcher allowed_vary_headers = 2; - - // [#not-implemented-hide:] - // - // - // Modifies cache key creation by restricting which parts of the URL are included. - KeyCreatorParams key_creator_params = 3; - - // [#not-implemented-hide:] - // - // - // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache - // storage implementation may have its own limit beyond which it will reject insertions). - uint32 max_body_bytes = 4; - - // By default, a ``cache-control: no-cache`` or ``pragma: no-cache`` header in the request - // causes the cache to validate with its upstream even if the lookup is a hit. Setting this - // to true will ignore these headers. - bool ignore_request_cache_control_header = 6; - - // If this is set, requests sent upstream to populate the cache will go to the - // specified cluster rather than the cluster selected by the vhost and route. - // - // If you have actions to be taken by the router filter - either - // ``upstream_http_filters`` or one of the ``RouteConfiguration`` actions such as - // ``response_headers_to_add`` - then the cache's side-channel going directly to the - // routed cluster will bypass these actions. You can set ``override_upstream_cluster`` - // to an internal listener which duplicates the relevant ``RouteConfiguration``, to - // replicate the desired behavior on the side-channel upstream request issued by the - // cache. - // - // This is a workaround for implementation constraints which it is hoped will at some - // point become unnecessary, then unsupported and this field will be removed. - string override_upstream_cluster = 7; -} diff --git a/src/main/proto/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto b/src/main/proto/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto deleted file mode 100644 index 06e1b11..0000000 --- a/src/main/proto/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.cdn_loop.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cdn_loop.v3"; -option java_outer_classname = "CdnLoopProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cdn_loop/v3;cdn_loopv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP CDN-Loop Filter] -// [#extension: envoy.filters.http.cdn_loop] - -// CDN-Loop Header filter config. See the :ref:`configuration overview -// ` for more information. -message CdnLoopConfig { - // The CDN identifier to use for loop checks and to append to the - // CDN-Loop header. - // - // RFC 8586 calls this the cdn-id. The cdn-id can either be a - // pseudonym or hostname the CDN is in control of. - // - // cdn_id must not be empty. - string cdn_id = 1 [(validate.rules).string = {min_len: 1}]; - - // The maximum allowed count of cdn_id in the downstream CDN-Loop - // request header. - // - // The default of 0 means a request can transit the CdnLoopFilter - // once. A value of 1 means that a request can transit the - // CdnLoopFilter twice and so on. - uint32 max_allowed_occurrences = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/composite/v3/composite.proto b/src/main/proto/envoy/extensions/filters/http/composite/v3/composite.proto deleted file mode 100644 index 1ab6c5e..0000000 --- a/src/main/proto/envoy/extensions/filters/http/composite/v3/composite.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.composite.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.composite.v3"; -option java_outer_classname = "CompositeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/composite/v3;compositev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Composite] -// Composite Filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.composite] - -// :ref:`Composite filter ` config. The composite filter config -// allows delegating filter handling to another filter as determined by matching on the request -// headers. This makes it possible to use different filters or filter configurations based on the -// incoming request. -// -// This is intended to be used with -// :ref:`ExtensionWithMatcher ` -// where a match tree is specified that indicates (via -// :ref:`ExecuteFilterAction `) -// which filter configuration to create and delegate to. -message Composite { - // Named filter chain definitions that can be referenced from - // :ref:`ExecuteFilterAction.filter_chain_name - // `. - // The filter chains are compiled at configuration time and can be referenced by name. - // This is useful when the same filter chain needs to be applied across many routes, - // as it avoids duplicating the filter chain configuration. - map named_filter_chains = 1; -} - -// A list of filter configurations to be called in order. Note that this can be used as the type -// inside of an ECDS :ref:`TypedExtensionConfig -// ` extension, which allows a chain of -// filters to be configured dynamically. In that case, the types of all filters in the chain must -// be present in the :ref:`ExtensionConfigSource.type_urls -// ` field. -message FilterChainConfiguration { - repeated config.core.v3.TypedExtensionConfig typed_config = 1; -} - -// Configuration for an extension configuration discovery service with name. -message DynamicConfig { - // The name of the extension configuration. It also serves as a resource name in ExtensionConfigDS. - // The resource type in the ``DiscoveryRequest`` will be :ref:`TypedExtensionConfig - // `. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Configuration source specifier for an extension configuration discovery - // service. In case of a failure and without the default configuration, - // 500(Internal Server Error) will be returned. - config.core.v3.ExtensionConfigSource config_discovery = 2; -} - -// Composite match action (see :ref:`matching docs ` for more info on match actions). -// This specifies the filter configuration of the filter that the composite filter should delegate filter interactions to. -// [#next-free-field: 6] -message ExecuteFilterAction { - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - // Only one of ``typed_config``, ``dynamic_config``, ``filter_chain``, or ``filter_chain_name`` - // can be set. - // [#extension-category: envoy.filters.http] - config.core.v3.TypedExtensionConfig typed_config = 1 - [(udpa.annotations.field_migrate).oneof_promotion = "config_type"]; - - // Dynamic configuration of filter obtained via extension configuration discovery service. - // Only one of ``typed_config``, ``dynamic_config``, ``filter_chain``, or ``filter_chain_name`` - // can be set. - DynamicConfig dynamic_config = 2 - [(udpa.annotations.field_migrate).oneof_promotion = "config_type"]; - - // An inlined list of filter configurations. The specified filters will be executed in order. - // Only one of ``typed_config``, ``dynamic_config``, ``filter_chain``, or ``filter_chain_name`` - // can be set. - FilterChainConfiguration filter_chain = 4; - - // The name of a filter chain defined in - // :ref:`Composite.named_filter_chains - // `. - // At runtime, if the named filter chain is not found in the Composite filter's configuration, - // no filter will be applied for this match (the action is silently skipped). - // Only one of ``typed_config``, ``dynamic_config``, ``filter_chain``, or ``filter_chain_name`` - // can be set. - string filter_chain_name = 5; - - // Probability of the action execution. If not specified, this is 100%. - // This allows sampling behavior for the configured actions. - // For example, if - // :ref:`default_value ` - // under the ``sample_percent`` is configured with 30%, a dice roll with that - // probability is done. The underline action will only be executed if the - // dice roll returns positive. Otherwise, the action is skipped. - config.core.v3.RuntimeFractionalPercent sample_percent = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/compressor/v3/compressor.proto b/src/main/proto/envoy/extensions/filters/http/compressor/v3/compressor.proto deleted file mode 100644 index 7e67938..0000000 --- a/src/main/proto/envoy/extensions/filters/http/compressor/v3/compressor.proto +++ /dev/null @@ -1,203 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.compressor.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.compressor.v3"; -option java_outer_classname = "CompressorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/compressor/v3;compressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Compressor] -// Compressor :ref:`configuration overview `. -// [#extension: envoy.filters.http.compressor] - -// [#next-free-field: 10] -message Compressor { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.compressor.v2.Compressor"; - - message CommonDirectionConfig { - // Runtime flag that controls whether compression is enabled for the direction this - // common config is applied to. When this field is ``false``, the filter will operate as a - // pass-through filter in the chosen direction, unless overridden by ``CompressorPerRoute``. - // If this field is not specified, the filter will be enabled. - config.core.v3.RuntimeFeatureFlag enabled = 1; - - // Minimum value of the ``Content-Length`` header in request or response messages (depending on the - // direction this common config is applied to), in bytes, that will trigger compression. Defaults to 30. - google.protobuf.UInt32Value min_content_length = 2; - - // Set of strings that allows specifying which mime-types yield compression; e.g., - // ``application/json``, ``text/html``, etc. - // - // When this field is not specified, compression will be applied to these following mime-types - // and their synonyms: - // - // * ``application/javascript`` - // * ``application/json`` - // * ``application/xhtml+xml`` - // * ``image/svg+xml`` - // * ``text/css`` - // * ``text/html`` - // * ``text/plain`` - // * ``text/xml`` - // - repeated string content_type = 3; - } - - // Configuration for filter behavior on the request direction. - message RequestDirectionConfig { - CommonDirectionConfig common_config = 1; - } - - // Configuration for filter behavior on the response direction. - // [#next-free-field: 6] - message ResponseDirectionConfig { - CommonDirectionConfig common_config = 1; - - // When this field is ``true``, disables compression when the response contains an ``ETag`` header. - // When this field is ``false``, the filter will preserve weak ``ETag`` values and remove those that - // require strong validation. - bool disable_on_etag_header = 2; - - // When this field is ``true``, removes ``Accept-Encoding`` from the request headers before dispatching - // the request to the upstream so that responses do not get compressed before reaching the filter. - // - // .. attention:: - // - // To avoid interfering with other compression filters in the same chain, use this option in - // the filter closest to the upstream. - bool remove_accept_encoding_header = 3; - - // Set of response codes for which compression is disabled; e.g., 206 Partial Content should not - // be compressed. - repeated uint32 uncompressible_response_codes = 4 [(validate.rules).repeated = { - unique: true - items {uint32 {lt: 600 gte: 200}} - }]; - - // If true, the filter adds the ``x-envoy-compression-status`` response - // header to indicate whether the compression occurred and, if not, provide - // the reason why. The header's value format is - // ``;[;]``, where ```` is - // ``Compressed`` or the reason compression was skipped (e.g., - // ``ContentLengthTooSmall``). When this field is enabled, the compressor - // filter alters the order of the compression eligibility checks to report - // the most valid reason for skipping the compression. - bool status_header_enabled = 5; - } - - // Minimum response length, in bytes, which will trigger compression. The default value is 30. - google.protobuf.UInt32Value content_length = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Set of strings that allows specifying which mime-types yield compression; e.g., - // ``application/json``, ``text/html``, etc. - // - // When this field is not specified, compression will be applied to these following mime-types - // and their synonyms: - // - // * ``application/javascript`` - // * ``application/json`` - // * ``application/xhtml+xml`` - // * ``image/svg+xml`` - // * ``text/css`` - // * ``text/html`` - // * ``text/plain`` - // * ``text/xml`` - // - repeated string content_type = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // When this field is ``true``, disables compression when the response contains an ``ETag`` header. - // When this field is ``false``, the filter will preserve weak ``ETag`` values and remove those that - // require strong validation. - bool disable_on_etag_header = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // When this field is ``true``, removes ``Accept-Encoding`` from the request headers before dispatching - // the request to the upstream so that responses do not get compressed before reaching the filter. - // - // .. attention:: - // - // To avoid interfering with other compression filters in the same chain, use this option in - // the filter closest to the upstream. - bool remove_accept_encoding_header = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Runtime flag that controls whether the filter is enabled. When this field is ``false``, the - // filter will operate as a pass-through filter, unless overridden by ``CompressorPerRoute``. - // If this field is not specified, the filter is enabled by default. - config.core.v3.RuntimeFeatureFlag runtime_enabled = 5 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // A compressor library to use for compression. - // [#extension-category: envoy.compression.compressor] - config.core.v3.TypedExtensionConfig compressor_library = 6 - [(validate.rules).message = {required: true}]; - - // Configuration for request compression. If this field is not specified, request compression is disabled. - RequestDirectionConfig request_direction_config = 7; - - // Configuration for response compression. If this field is not specified, response compression is enabled. - // - // .. attention:: - // - // When this field is set, duplicate deprecated fields of the ``Compressor`` message, - // such as ``content_length``, ``content_type``, ``disable_on_etag_header``, - // ``remove_accept_encoding_header``, and ``runtime_enabled``, are ignored. - // - // Additionally, all statistics related to response compression will be rooted in - // ``.compressor...response.*`` - // instead of - // ``.compressor...*``. - ResponseDirectionConfig response_direction_config = 8; - - // When this field is ``true``, this compressor is preferred when q-values in ``Accept-Encoding`` are equal. - // If multiple compressor filters set ``choose_first`` to ``true``, the last one in the filter chain is chosen. - bool choose_first = 9; -} - -// Per-route overrides of ``ResponseDirectionConfig``. Anything added here should be optional, -// to allow overriding arbitrary subsets of configuration. Omitted fields must have no effect. -message ResponseDirectionOverrides { - // If set, overrides the filter-level - // :ref:`remove_accept_encoding_header`. - google.protobuf.BoolValue remove_accept_encoding_header = 1; -} - -// Per-route overrides. As per-route overrides are needed, they should be -// added here, mirroring the structure of ``Compressor``. All fields should be -// optional, to allow overriding arbitrary subsets of configuration. -message CompressorOverrides { - // If present, response compression is enabled. - ResponseDirectionOverrides response_direction_config = 1; - - // A compressor library to use for compression. If specified, this overrides - // the filter-level ``compressor_library`` configuration for this route. - config.core.v3.TypedExtensionConfig compressor_library = 2; -} - -message CompressorPerRoute { - oneof override { - option (validate.required) = true; - - // If set, the filter will operate as a pass-through filter. - // Overrides ``Compressor.runtime_enabled`` and ``CommonDirectionConfig.enabled``. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Per-route overrides. Fields set here will override corresponding fields in ``Compressor``. - CompressorOverrides overrides = 2; - } -} diff --git a/src/main/proto/envoy/extensions/filters/http/connect_grpc_bridge/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/connect_grpc_bridge/v3/config.proto deleted file mode 100644 index 7fc9562..0000000 --- a/src/main/proto/envoy/extensions/filters/http/connect_grpc_bridge/v3/config.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.connect_grpc_bridge.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.connect_grpc_bridge.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/connect_grpc_bridge/v3;connect_grpc_bridgev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Connect RPC to gRPC] Connect RPC to gRPC bridge -// :ref:`configuration overview `. -// [#extension: envoy.filters.http.connect_grpc_bridge] - -// Connect RPC to gRPC bridge filter configuration -message FilterConfig { -} diff --git a/src/main/proto/envoy/extensions/filters/http/cors/v3/cors.proto b/src/main/proto/envoy/extensions/filters/http/cors/v3/cors.proto deleted file mode 100644 index ba960d6..0000000 --- a/src/main/proto/envoy/extensions/filters/http/cors/v3/cors.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.cors.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.cors.v3"; -option java_outer_classname = "CorsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/cors/v3;corsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Cors] -// CORS Filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.cors] - -// Cors filter config. Set this in -// :ref:`http_filters ` -// to enable the CORS filter. -// -// Please note that the :ref:`CorsPolicy ` -// must be configured in the ``RouteConfiguration`` as ``typed_per_filter_config`` at some level to make the filter work. -message Cors { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.cors.v2.Cors"; -} - -// Per route configuration for the CORS filter. This configuration should be configured in the ``RouteConfiguration`` as ``typed_per_filter_config`` at some level to -// make the filter work. -// [#next-free-field: 11] -message CorsPolicy { - // Specifies string patterns that match allowed origins. An origin is allowed if any of the - // string matchers match. - repeated type.matcher.v3.StringMatcher allow_origin_string_match = 1; - - // Specifies the content for the ``access-control-allow-methods`` header. - string allow_methods = 2; - - // Specifies the content for the ``access-control-allow-headers`` header. - string allow_headers = 3; - - // Specifies the content for the ``access-control-expose-headers`` header. - string expose_headers = 4; - - // Specifies the content for the ``access-control-max-age`` header. - string max_age = 5; - - // Specifies whether the resource allows credentials. - google.protobuf.BoolValue allow_credentials = 6; - - // Specifies the % of requests for which the CORS filter is enabled. - // - // If neither ``filter_enabled``, nor ``shadow_enabled`` are specified, the CORS - // filter will be enabled for 100% of the requests. - // - // If :ref:`runtime_key ` is - // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. - config.core.v3.RuntimeFractionalPercent filter_enabled = 7; - - // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not - // enforced. - // - // This field is intended to be used when ``filter_enabled`` is off. That field have to explicitly disable - // the filter in order for this setting to take effect. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's ``Origin`` to determine if it's valid but will not enforce any policies. - config.core.v3.RuntimeFractionalPercent shadow_enabled = 8; - - // Specify whether allow requests whose target server's IP address is more private than that from - // which the request initiator was fetched. - // - // More details refer to https://developer.chrome.com/blog/private-network-access-preflight. - google.protobuf.BoolValue allow_private_network_access = 9; - - // Specifies if preflight requests not matching the configured allowed origin should be forwarded - // to the upstream. Default is true. - google.protobuf.BoolValue forward_not_matching_preflights = 10; -} diff --git a/src/main/proto/envoy/extensions/filters/http/credential_injector/v3/credential_injector.proto b/src/main/proto/envoy/extensions/filters/http/credential_injector/v3/credential_injector.proto deleted file mode 100644 index 452a3f7..0000000 --- a/src/main/proto/envoy/extensions/filters/http/credential_injector/v3/credential_injector.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.credential_injector.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.credential_injector.v3"; -option java_outer_classname = "CredentialInjectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/credential_injector/v3;credential_injectorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Credential Injector] -// Credential Injector :ref:`configuration overview `. -// [#extension: envoy.filters.http.credential_injector] - -// Credential Injector injects credentials into outgoing HTTP requests. The filter configuration is used to retrieve the credentials, or -// they can be requested through the OAuth2 client credential grant. The credentials obtained are then injected into the Authorization header -// of the proxied HTTP requests, utilizing either the Basic or Bearer scheme. -// -// If the credential is not present or there was a failure injecting the credential, the request will fail with ``401 Unauthorized`` unless -// ``allow_request_without_credential`` is set to ``true``. -// -// Notice: This filter is intended to be used for workload authentication, which means that the identity associated with the inserted credential -// is considered as the identity of the workload behind the envoy proxy(in this case, envoy is typically deployed as a sidecar alongside that -// workload). Please note that this filter does not handle end user authentication. Its purpose is solely to authenticate the workload itself. -// -// Here is an example of CredentialInjector configuration with Generic credential, which injects an HTTP Basic Auth credential into the proxied requests. -// -// .. code-block:: yaml -// -// overwrite: true -// credential: -// name: generic_credential -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.http.injected_credentials.generic.v3.Generic -// credential: -// name: credential -// sds_config: -// path_config_source: -// path: credential.yaml -// header: Authorization -// -// credential.yaml for Basic Auth: -// -// .. code-block:: yaml -// -// resources: -// - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret" -// name: credential -// generic_secret: -// secret: -// inline_string: "Basic base64EncodedUsernamePassword" -// -// It can also be configured to inject a Bearer token into the proxied requests. -// -// credential.yaml for Bearer Token: -// -// .. code-block:: yaml -// -// resources: -// - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret" -// name: credential -// generic_secret: -// secret: -// inline_string: "Bearer myToken" -// -message CredentialInjector { - // Whether to overwrite the value or not if the injected headers already exist. - // Value defaults to false. - bool overwrite = 1; - - // Whether to send the request to upstream if the credential is not present or if the credential injection - // to the request fails. - // - // By default, a request will fail with ``401 Unauthorized`` if the - // credential is not present or the injection of the credential to the request fails. - // If set to true, the request will be sent to upstream without the credential. - bool allow_request_without_credential = 2; - - // The credential to inject into the proxied requests - // [#extension-category: envoy.http.injected_credentials] - config.core.v3.TypedExtensionConfig credential = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/csrf/v3/csrf.proto b/src/main/proto/envoy/extensions/filters/http/csrf/v3/csrf.proto deleted file mode 100644 index 004ada9..0000000 --- a/src/main/proto/envoy/extensions/filters/http/csrf/v3/csrf.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.csrf.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.csrf.v3"; -option java_outer_classname = "CsrfProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/csrf/v3;csrfv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: CSRF] -// Cross-Site Request Forgery :ref:`configuration overview `. -// [#extension: envoy.filters.http.csrf] - -// CSRF filter config. -message CsrfPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.csrf.v2.CsrfPolicy"; - - // Specifies the % of requests for which the CSRF filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - config.core.v3.RuntimeFractionalPercent filter_enabled = 1 - [(validate.rules).message = {required: true}]; - - // Specifies that CSRF policies will be evaluated and tracked, but not enforced. - // - // This is intended to be used when ``filter_enabled`` is off and will be ignored otherwise. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - // and track the request's ``Origin`` and ``Destination`` to determine if it's valid, but will not - // enforce any policies. - config.core.v3.RuntimeFractionalPercent shadow_enabled = 2; - - // Specifies additional source origins that will be allowed in addition to - // the destination origin. - // - // More information on how this can be configured via runtime can be found - // :ref:`here `. - repeated type.matcher.v3.StringMatcher additional_origins = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/custom_response/v3/custom_response.proto b/src/main/proto/envoy/extensions/filters/http/custom_response/v3/custom_response.proto deleted file mode 100644 index cd28640..0000000 --- a/src/main/proto/envoy/extensions/filters/http/custom_response/v3/custom_response.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.custom_response.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.custom_response.v3"; -option java_outer_classname = "CustomResponseProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/custom_response/v3;custom_responsev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Custom Response Filter] -// [#extension: envoy.filters.http.custom_response] - -// The Custom Response Filter allows for replacing upstream responses. - -// The filter configuration is a collection of custom response -// policies in a matcher tree. The configuration can be defined at the filter, -// virtual host or route level. The response will be matched against the most -// specific to the least specific config, till a match is found. -message CustomResponse { - // Matcher to match against the original response to select a - // :ref:`Custom Response Policy ` - // that will override the original response. The matching is done by matching - // against :ref:`response header values` - // Example: - // - // .. validated-code-block:: yaml - // :type-name: xds.type.matcher.v3.Matcher - // - // matcher_list: - // matchers: - // # Apply a locally stored custom response to any 4xx response. - // - predicate: - // single_predicate: - // input: - // name: 4xx_response - // typed_config: - // "@type": type.googleapis.com/envoy.type.matcher.v3.HttpResponseStatusCodeClassMatchInput - // value_match: - // exact: "4xx" - // on_match: - // action: - // name: action - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy - // status_code: 499 - // body: - // inline_string: "not allowed" - // body_format: - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // response_headers_to_add: - // - header: - // key: "foo" - // value: "x-bar" - // # Redirect to different upstream if the status code is one of 502, 503 or 504. - // - predicate: - // or_matcher: - // predicate: - // - single_predicate: - // input: - // name: "502_response" - // typed_config: - // "@type": type.googleapis.com/envoy.type.matcher.v3.HttpResponseStatusCodeMatchInput - // value_match: - // exact: "502" - // - single_predicate: - // input: - // name: "503_response" - // typed_config: - // "@type": type.googleapis.com/envoy.type.matcher.v3.HttpResponseStatusCodeMatchInput - // value_match: - // exact: "503" - // - single_predicate: - // input: - // name: "504_response" - // typed_config: - // "@type": type.googleapis.com/envoy.type.matcher.v3.HttpResponseStatusCodeMatchInput - // value_match: - // exact: "504" - // on_match: - // action: - // name: action - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.http.custom_response.redirect_policy.v3.RedirectPolicy - // status_code: 299 - // uri: "https://foo.example/gateway_error" - // response_headers_to_add: - // - header: - // key: "foo2" - // value: "x-bar2" - // - // -- attention:: - // The first matched policy wins. Once the response is matched, matcher - // evaluations end. - // - // Refer to :ref:`Unified Matcher API ` - // documentation for more information on the matcher trees. - // [#extension-category: envoy.http.custom_response] - xds.type.matcher.v3.Matcher custom_response_matcher = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/decompressor/v3/decompressor.proto b/src/main/proto/envoy/extensions/filters/http/decompressor/v3/decompressor.proto deleted file mode 100644 index f34ff9c..0000000 --- a/src/main/proto/envoy/extensions/filters/http/decompressor/v3/decompressor.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.decompressor.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.decompressor.v3"; -option java_outer_classname = "DecompressorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/decompressor/v3;decompressorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Decompressor] -// [#extension: envoy.filters.http.decompressor] - -message Decompressor { - // Common configuration for filter behavior on both the request and response direction. - message CommonDirectionConfig { - // Runtime flag that controls whether the filter is enabled for decompression or not. If set to false, the - // filter will operate as a pass-through filter. If the message is unspecified, the filter will be enabled. - config.core.v3.RuntimeFeatureFlag enabled = 1; - - // If set to true, will decompress response even if a ``no-transform`` cache control header is set. - bool ignore_no_transform_header = 2; - } - - // Configuration for filter behavior on the request direction. - message RequestDirectionConfig { - CommonDirectionConfig common_config = 1; - - // If set to true, and response decompression is enabled, the filter modifies the Accept-Encoding - // request header by appending the decompressor_library's encoding. Defaults to true. - google.protobuf.BoolValue advertise_accept_encoding = 2; - } - - // Configuration for filter behavior on the response direction. - message ResponseDirectionConfig { - CommonDirectionConfig common_config = 1; - } - - // A decompressor library to use for both request and response decompression. Currently only - // :ref:`envoy.compression.gzip.compressor` - // is included in Envoy. - // [#extension-category: envoy.compression.decompressor] - config.core.v3.TypedExtensionConfig decompressor_library = 1 - [(validate.rules).message = {required: true}]; - - // Configuration for request decompression. Decompression is enabled by default if left empty. - RequestDirectionConfig request_direction_config = 2; - - // Configuration for response decompression. Decompression is enabled by default if left empty. - ResponseDirectionConfig response_direction_config = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto b/src/main/proto/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto deleted file mode 100644 index 76dc47b..0000000 --- a/src/main/proto/envoy/extensions/filters/http/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.dynamic_forward_proxy.v3; - -import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.dynamic_forward_proxy.v3"; -option java_outer_classname = "DynamicForwardProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic forward proxy] - -// Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview -// ` for more information. -// [#extension: envoy.filters.http.dynamic_forward_proxy] -message FilterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.dynamic_forward_proxy.v2alpha.FilterConfig"; - - oneof implementation_specifier { - // The DNS cache configuration that the filter will attach to. Note this configuration must - // match that of associated :ref:`dynamic forward proxy cluster configuration - // `. - common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1; - - // The configuration that the filter will use, when the related dynamic forward proxy cluster enabled - // sub clusters. - SubClusterConfig sub_cluster_config = 3; - } - - // When this flag is set, the filter will add the resolved upstream address in the filter - // state. The state should be saved with key - // ``envoy.stream.upstream_address`` (See - // :repo:`upstream_address.h`). - bool save_upstream_address = 2; - - // When this flag is set, the filter will check for the ``envoy.upstream.dynamic_host`` - // and/or ``envoy.upstream.dynamic_port`` filter state values before using the HTTP - // Host header for DNS resolution. This provides consistency with the - // :ref:`SNI dynamic forward proxy ` and - // :ref:`UDP dynamic forward proxy ` - // filters behavior when enabled. - // - // If the flag is not set (default), the filter will use the HTTP Host header - // for DNS resolution, maintaining backward compatibility. - bool allow_dynamic_host_from_filter_state = 4; -} - -// Per route Configuration for the dynamic forward proxy HTTP filter. -message PerRouteConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.dynamic_forward_proxy.v2alpha.PerRouteConfig"; - - oneof host_rewrite_specifier { - // Indicates that before DNS lookup, the host header will be swapped with - // this value. If not set or empty, the original host header value - // will be used and no rewrite will happen. - // - // .. note:: - // - // This rewrite affects both DNS lookup and host header forwarding. However, this option shouldn't be used with - // :ref:`HCM host rewrite header ` given that - // the value set here would be used for DNS lookups whereas the value set in the HCM would be used for host - // header forwarding which might not be the desired outcome. - // - string host_rewrite_literal = 1; - - // Indicates that before DNS lookup, the host header will be swapped with - // the value of this header. If not set or empty, the original host header - // value will be used and no rewrite will happen. - // - // .. note:: - // - // This rewrite affects both DNS lookup and host header forwarding. However, this option shouldn't be used with - // :ref:`HCM host rewrite header ` given that - // the value set here would be used for DNS lookups whereas the value set in the HCM would be used for host - // header forwarding which might not be the desired outcome. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string host_rewrite_header = 2; - } -} - -message SubClusterConfig { - // The timeout used for sub cluster initialization. Defaults to **5s** if not set. - google.protobuf.Duration cluster_init_timeout = 3 [(validate.rules).duration = {gt {}}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/filters/http/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index e4e8816..0000000 --- a/src/main/proto/envoy/extensions/filters/http/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,123 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.dynamic_modules.v3; - -import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic Modules HTTP Filter] -// [#extension: envoy.filters.http.dynamic_modules] - -// Configuration for the Dynamic Modules HTTP filter. This filter allows loading shared object files -// that can be loaded via ``dlopen`` to extend the HTTP filter chain. -// -// A module can be loaded by multiple HTTP filters; the module is loaded only once and shared across -// multiple filters. -// -// A dynamic module HTTP filter can opt into being a terminal filter with no upstream by setting -// :ref:`terminal_filter -// ` -// to ``true``. A terminal dynamic module can use ``send_`` ABI methods to send response headers, -// body, and trailers to the downstream. -message DynamicModuleFilter { - // Specifies the shared-object level configuration. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; - - // The name for this filter configuration. - // - // This can be used to distinguish between different filter implementations inside a dynamic - // module. For example, a module can have completely different filter implementations. When Envoy - // receives this configuration, it passes the ``filter_name`` to the dynamic module's HTTP filter - // config init function together with the ``filter_config``. That way a module can decide which - // in-module filter implementation to use based on the name at load time. - string filter_name = 2; - - // The configuration for the filter chosen by ``filter_name``. - // - // This is passed to the module's HTTP filter initialization function. Together with the - // ``filter_name``, the module can decide which in-module filter implementation to use and - // fine-tune the behavior of the filter. - // - // For example, if a module has two filter implementations, one for logging and one for header - // manipulation, ``filter_name`` is used to choose either logging or header manipulation. The - // ``filter_config`` can be used to configure the logging level or the header manipulation - // behavior. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the plugin. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly without - // the wrapper. - // - // .. code-block:: yaml - // - // # Passing in a string - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: hello - // - // # Passing in raw bytes - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.BytesValue" - // value: aGVsbG8= # echo -n "hello" | base64 - // - google.protobuf.Any filter_config = 3; - - // If ``true``, the dynamic module is a terminal filter to use without an upstream. - // - // The dynamic module is responsible for creating and sending the response to downstream. - // - // Defaults to ``false``. - bool terminal_filter = 4; -} - -// Configuration of the HTTP per-route filter for dynamic modules. -message DynamicModuleFilterPerRoute { - // Specifies the shared-object level configuration. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; - - // The name for this filter configuration. - // - // This can be used to distinguish between different filter implementations inside a dynamic - // module. For example, a module can have completely different filter implementations. When Envoy - // receives this configuration, it passes the ``per_route_config_name`` to the dynamic module's - // HTTP per-route filter config init function together with the ``filter_config``. That way a - // module can decide which in-module filter implementation to use based on the name at load time. - string per_route_config_name = 2; - - // The configuration for the filter chosen by ``per_route_config_name``. - // - // This is passed to the module's HTTP per-route filter initialization function. Together with - // the ``per_route_config_name``, the module can decide which in-module filter implementation to - // use and fine-tune the behavior of the filter on a specific route. - // - // For example, if a module has two filter implementations, one for logging and one for header - // manipulation, ``per_route_config_name`` is used to choose either logging or header - // manipulation. The ``filter_config`` can be used to configure the logging level or the header - // manipulation behavior. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the plugin. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly without - // the wrapper. - // - // .. code-block:: yaml - // - // # Passing in a string - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: hello - // - // # Passing in raw bytes - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.BytesValue" - // value: aGVsbG8= # echo -n "hello" | base64 - // - google.protobuf.Any filter_config = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto b/src/main/proto/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto deleted file mode 100644 index 7f70b70..0000000 --- a/src/main/proto/envoy/extensions/filters/http/ext_authz/v3/ext_authz.proto +++ /dev/null @@ -1,602 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ext_authz.v3; - -import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/config/core/v3/http_uri.proto"; -import "envoy/type/matcher/v3/metadata.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/http_status.proto"; - -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_authz.v3"; -option java_outer_classname = "ExtAuthzProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_authz/v3;ext_authzv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: External Authorization] -// External Authorization :ref:`configuration overview `. -// [#extension: envoy.filters.http.ext_authz] - -// [#next-free-field: 32] -message ExtAuthz { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v3.ExtAuthz"; - - reserved 4; - - reserved "use_alpha"; - - // External authorization service configuration. - oneof services { - // gRPC service configuration (default timeout: 200ms). - config.core.v3.GrpcService grpc_service = 1; - - // HTTP service configuration (default timeout: 200ms). - HttpService http_service = 3; - } - - // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and - // version of messages used on the wire. - config.core.v3.ApiVersion transport_api_version = 12 - [(validate.rules).enum = {defined_only: true}]; - - // Changes the filter's behavior on errors: - // - // * When set to ``true``, the filter will ``accept`` the client request even if communication with - // the authorization service has failed, or if the authorization service has returned an HTTP 5xx - // error. - // - // * When set to ``false``, the filter will ``reject`` client requests and return ``Forbidden`` - // if communication with the authorization service has failed, or if the authorization service - // has returned an HTTP 5xx error. - // - // Errors can always be tracked in the :ref:`stats `. - // - // Defaults to ``false``. - bool failure_mode_allow = 2; - - // When ``failure_mode_allow`` and ``failure_mode_allow_header_add`` are both set to ``true``, - // ``x-envoy-auth-failure-mode-allowed: true`` will be added to request headers if the communication - // with the authorization service has failed, or if the authorization service has returned a - // HTTP 5xx error. - bool failure_mode_allow_header_add = 19; - - // Enables the filter to buffer the client request body and send it within the authorization request. - // The ``x-envoy-auth-partial-body: false|true`` metadata header will be added to the authorization - // request indicating whether the body data is partial. - BufferSettings with_request_body = 5; - - // Clears the route cache in order to allow the external authorization service to correctly affect - // routing decisions. The filter clears all cached routes when all of the following holds: - // - // * This field is set to ``true``. - // * The status returned from the authorization service is an HTTP 200 or gRPC 0. - // * At least one ``authorization response header`` is added to the client request, or is used to - // alter another client request header. - // - // Defaults to ``false``. - bool clear_route_cache = 6; - - // Sets the HTTP status that is returned to the client when the authorization server returns an error - // or cannot be reached. - // - // The default status is ``HTTP 403 Forbidden``. - type.v3.HttpStatus status_on_error = 7; - - // When set to ``true``, the filter will check the :ref:`ext_authz response - // ` for invalid header and - // query parameter mutations. If the response is invalid, the filter will send a local reply - // to the downstream request with status ``HTTP 500 Internal Server Error``. - // - // .. note:: - // Both ``headers_to_remove`` and ``query_parameters_to_remove`` are validated, but invalid elements in - // those fields should not affect any headers and thus will not cause the filter to send a local reply. - // - // When set to ``false``, any invalid mutations will be visible to the rest of Envoy and may cause - // unexpected behavior. - // - // If you are using ext_authz with an untrusted ext_authz server, you should set this to ``true``. - // - // Defaults to ``false``. - bool validate_mutations = 24; - - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service. The :ref:`filter_metadata ` - // is passed as an opaque ``protobuf::Struct``. - // - // .. note:: - // This field applies exclusively to the gRPC ext_authz service and has no effect on the HTTP service. - // - // For example, if the ``jwt_authn`` filter is used and :ref:`payload_in_metadata - // ` is set, - // then the following will pass the jwt payload to the authorization server. - // - // .. code-block:: yaml - // - // metadata_context_namespaces: - // - envoy.filters.http.jwt_authn - // - repeated string metadata_context_namespaces = 8; - - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service. :ref:`typed_filter_metadata ` - // is passed as a ``protobuf::Any``. - // - // .. note:: - // This field applies exclusively to the gRPC ext_authz service and has no effect on the HTTP service. - // - // This works similarly to ``metadata_context_namespaces`` but allows Envoy and the ext_authz server to share - // the protobuf message definition in order to perform safe parsing. - // - repeated string typed_metadata_context_namespaces = 16; - - // Specifies a list of route metadata namespaces whose values, if present, will be passed to the - // ext_authz service at :ref:`route_metadata_context ` in - // :ref:`CheckRequest `. - // :ref:`filter_metadata ` is passed as an opaque ``protobuf::Struct``. - repeated string route_metadata_context_namespaces = 21; - - // Specifies a list of route metadata namespaces whose values, if present, will be passed to the - // ext_authz service at :ref:`route_metadata_context ` in - // :ref:`CheckRequest `. - // :ref:`typed_filter_metadata ` is passed as a ``protobuf::Any``. - repeated string route_typed_metadata_context_namespaces = 22; - - // Specifies if the filter is enabled. - // - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to get the percentage of requests to filter. - // - // If this field is not specified, the filter will be enabled for all requests. - config.core.v3.RuntimeFractionalPercent filter_enabled = 9; - - // Specifies if the filter is enabled with metadata matcher. - // If this field is not specified, the filter will be enabled for all requests. - // - // .. note:: - // - // This field is only evaluated if the filter is instantiated. If the filter is marked with - // ``disabled: true`` in the :ref:`HttpFilter - // ` - // configuration or in per-route configuration via :ref:`ExtAuthzPerRoute - // `, - // the filter will not be instantiated and this field will have no effect. - // - // .. tip:: - // - // For dynamic filter activation based on metadata (such as metadata set by a preceding - // filter), consider using :ref:`ExtensionWithMatcher - // ` instead. This - // provides a more flexible matching framework that can evaluate conditions before filter - // instantiation. See the :ref:`ext_authz filter documentation - // ` for examples. - type.matcher.v3.MetadataMatcher filter_enabled_metadata = 14; - - // Specifies whether to deny the requests when the filter is disabled. - // If :ref:`runtime_key ` is specified, - // Envoy will lookup the runtime key to determine whether to deny requests for filter-protected paths - // when the filter is disabled. If the filter is disabled in ``typed_per_filter_config`` for the path, - // requests will not be denied. - // - // If this field is not specified, all requests will be allowed when disabled. - // - // If a request is denied due to this setting, the response code in :ref:`status_on_error - // ` will - // be returned. - config.core.v3.RuntimeFeatureFlag deny_at_disable = 11; - - // Specifies if the peer certificate is sent to the external service. - // - // When this field is ``true``, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - bool include_peer_certificate = 10; - - // Optional additional prefix to use when emitting statistics. This allows distinguishing - // emitted statistics between configured ``ext_authz`` filters in an HTTP filter chain. For example: - // - // .. code-block:: yaml - // - // http_filters: - // - name: envoy.filters.http.ext_authz - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz - // stat_prefix: waf # This emits ext_authz.waf.ok, ext_authz.waf.denied, etc. - // - name: envoy.filters.http.ext_authz - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz - // stat_prefix: blocker # This emits ext_authz.blocker.ok, ext_authz.blocker.denied, etc. - // - string stat_prefix = 13; - - // Optional labels that will be passed to :ref:`labels` in - // :ref:`destination`. - // The labels will be read from :ref:`metadata` with the specified key. - string bootstrap_metadata_labels_key = 15; - - // Check request to authorization server will include the client request headers that have a correspondent match - // in the list. If this option isn't specified, then - // all client request headers are included in the check request to a gRPC authorization server, whereas no client request headers - // (besides the ones allowed by default - see note below) are included in the check request to an HTTP authorization server. - // This inconsistency between gRPC and HTTP servers is to maintain backwards compatibility with legacy behavior. - // - // .. note:: - // - // For requests to an HTTP authorization server: in addition to the user's supplied matchers, ``Host``, ``Method``, ``Path``, - // ``Content-Length``, and ``Authorization`` are **additionally included** in the list. - // - // .. note:: - // - // For requests to an HTTP authorization server: the value of ``Content-Length`` will be set to ``0`` and the request to the - // authorization server will not have a message body. However, the check request can include the buffered - // client request body (controlled by :ref:`with_request_body - // ` setting); - // consequently, the value of ``Content-Length`` in the authorization request reflects the size of its payload. - // - // .. note:: - // - // This can be overridden by the field ``disallowed_headers`` below. That is, if a header - // matches for both ``allowed_headers`` and ``disallowed_headers``, the header will NOT be sent. - type.matcher.v3.ListStringMatcher allowed_headers = 17; - - // If set, specifically disallow any header in this list to be forwarded to the external - // authentication server. This overrides the above ``allowed_headers`` if a header matches both. - type.matcher.v3.ListStringMatcher disallowed_headers = 25; - - // Specifies if the TLS session level details like SNI are sent to the external service. - // - // When this field is ``true``, Envoy will include the SNI name used for TLSClientHello, if available, in the - // :ref:`tls_session`. - bool include_tls_session = 18; - - // Whether to increment cluster statistics (e.g. cluster..upstream_rq_*) on authorization failure. - // Defaults to ``true``. - google.protobuf.BoolValue charge_cluster_response_stats = 20; - - // Whether to encode the raw headers (i.e., unsanitized values and unconcatenated multi-line headers) - // in the authorization request. Works with both HTTP and gRPC clients. - // - // When this is set to ``true``, header values are not sanitized. Headers with the same key will also - // not be combined into a single, comma-separated header. - // Requests to gRPC services will populate the field - // :ref:`header_map`. - // Requests to HTTP services will be constructed with the unsanitized header values and preserved - // multi-line headers with the same key. - // - // If this field is set to ``false``, header values will be sanitized, with any non-UTF-8-compliant - // bytes replaced with ``'!'``. Headers with the same key will have their values concatenated into a - // single comma-separated header value. - // Requests to gRPC services will populate the field - // :ref:`headers`. - // Requests to HTTP services will have their header values sanitized and will not preserve - // multi-line headers with the same key. - // - // It is recommended to set this to ``true`` unless you rely on the previous behavior. - // - // It is set to ``false`` by default for backwards compatibility. - bool encode_raw_headers = 23; - - // Rules for what modifications an ext_authz server may make to the request headers before - // continuing decoding or forwarding upstream. - // - // If set, enables header mutation checking against the configured rules. Note that - // :ref:`HeaderMutationRules ` - // has defaults that change ext_authz behavior. Also note that if this field is set, - // ext_authz can no longer append to ``:``-prefixed headers. - // - // If unset, header mutation rule checking is completely disabled. - // - // Regardless of what is configured here, ext_authz cannot remove ``:``-prefixed headers. - // - // This field and ``validate_mutations`` have different use cases. ``validate_mutations`` enables - // correctness checks for all header and query parameter mutations (for example, invalid characters). - // This field allows the filter to reject mutations to specific headers. - config.common.mutation_rules.v3.HeaderMutationRules decoder_header_mutation_rules = 26; - - // Enable or disable ingestion of dynamic metadata from the ext_authz service. - // - // If ``false``, the filter will ignore dynamic metadata injected by the ext_authz service. If the - // ext_authz service tries injecting dynamic metadata, the filter will log, increment the - // ``ignored_dynamic_metadata`` stat, then continue handling the response. - // - // If ``true``, the filter will ingest dynamic metadata entries as normal. - // - // If unset, defaults to ``true``. - google.protobuf.BoolValue enable_dynamic_metadata_ingestion = 27; - - // Additional metadata to be added to the filter state for logging purposes. The metadata will be - // added to StreamInfo's filter state under the namespace corresponding to the ext_authz filter - // name. - google.protobuf.Struct filter_metadata = 28; - - // When set to ``true``, the filter will emit per-stream stats for access logging. The filter state - // key will be the same as the filter name. - // - // If using Envoy gRPC, emits latency, bytes sent / received, upstream info, and upstream cluster - // info. If not using Envoy gRPC, emits only latency. - // - // .. note:: - // Stats are ONLY added to filter state if a check request is actually made to an ext_authz service. - // - // If this is ``false`` the filter will not emit stats, but filter_metadata will still be respected if - // it has a value. - // - // Field ``latency_us`` is exposed for CEL and logging when using gRPC or HTTP service. - // Fields ``bytesSent`` and ``bytesReceived`` are exposed for CEL and logging only when using gRPC service. - bool emit_filter_state_stats = 29; - - // Sets the maximum size (in bytes) of the response body that the filter will send downstream - // when a request is denied by the external authorization service. - // - // If the authorization server returns a response body larger than this configured limit, - // the body will be truncated to ``max_denied_response_body_bytes`` before being sent to the - // downstream client. - // - // If this field is not set or is set to 0, no truncation will occur, and the entire - // denied response body will be forwarded. - uint32 max_denied_response_body_bytes = 30; - - // When set to ``true``, the filter will enforce the response header map's count and size limits - // by sending a local reply when those limits are violated. - // - // When set to ``false``, the filter will ignore the response header map's limits and add / set - // all response headers as specified by the external authorization service. - // - // Recommendation: enable if the external authorization service is not trusted. Otherwise, leave - // it ``false``. - // - // Defaults to ``false``. - bool enforce_response_header_limits = 31; -} - -// Configuration for buffering the request data. -message BufferSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v2.BufferSettings"; - - // Sets the maximum size of a message body that the filter will hold in memory. Envoy will return - // ``HTTP 413`` and will *not* initiate the authorization process when the buffer reaches the size - // set in this field. - // - // .. note:: - // This setting will have precedence over :ref:`failure_mode_allow - // `. - uint32 max_request_bytes = 1 [(validate.rules).uint32 = {gt: 0}]; - - // When this field is ``true``, Envoy will buffer the message until ``max_request_bytes`` is reached. - // The authorization request will be dispatched and no 413 HTTP error will be returned by the - // filter. - // - // Defaults to ``false``. - bool allow_partial_message = 2; - - // If ``true``, the body sent to the external authorization service is set as raw bytes and populates - // :ref:`raw_body` - // in the HTTP request attribute context. Otherwise, :ref:`body - // ` will be populated - // with a UTF-8 string request body. - // - // This field only affects configurations using a :ref:`grpc_service - // `. In configurations that use - // an :ref:`http_service `, this - // has no effect. - // - // Defaults to ``false``. - bool pack_as_bytes = 3; -} - -// HttpService is used for raw HTTP communication between the filter and the authorization service. -// When configured, the filter will parse the client request and use these attributes to call the -// authorization server. Depending on the response, the filter may reject or accept the client -// request. -// -// .. note:: -// In any of these events, metadata can be added, removed or overridden by the filter: -// -// On authorization request, a list of allowed request headers may be supplied. See -// :ref:`allowed_headers -// ` -// for details. Additional headers metadata may be added to the authorization request. See -// :ref:`headers_to_add -// ` for -// details. -// -// On authorization response status ``HTTP 200 OK``, the filter will allow traffic to the upstream and -// additional headers metadata may be added to the original client request. See -// :ref:`allowed_upstream_headers -// ` -// for details. Additionally, the filter may add additional headers to the client's response. See -// :ref:`allowed_client_headers_on_success -// ` -// for details. -// -// On other authorization response statuses, the filter will not allow traffic. Additional headers -// metadata as well as body may be added to the client's response. See :ref:`allowed_client_headers -// ` -// for details. -// [#next-free-field: 10] -message HttpService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v2.HttpService"; - - reserved 3, 4, 5, 6; - - // Sets the HTTP server URI which the authorization requests must be sent to. - config.core.v3.HttpUri server_uri = 1; - - // Sets a prefix to the value of authorization request header ``Path``. - string path_prefix = 2; - - // Settings used for controlling authorization request metadata. - AuthorizationRequest authorization_request = 7; - - // Settings used for controlling authorization response metadata. - AuthorizationResponse authorization_response = 8; - - // Optional retry policy for requests to the authorization server. - // If not set, no retries will be performed. - // - // .. note:: - // When this field is set, the ``ext_authz`` filter will buffer the request body for retry purposes. - config.core.v3.RetryPolicy retry_policy = 9; -} - -message AuthorizationRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v2.AuthorizationRequest"; - - // Authorization request includes the client request headers that have a corresponding match - // in the list. - // This field has been deprecated in favor of :ref:`allowed_headers - // `. - // - // .. note:: - // - // In addition to the user's supplied matchers, ``Host``, ``Method``, ``Path``, - // ``Content-Length``, and ``Authorization`` are **automatically included** in the list. - // - // .. note:: - // - // By default, the ``Content-Length`` header is set to ``0`` and the request to the authorization - // service has no message body. However, the authorization request *may* include the buffered - // client request body (controlled by :ref:`with_request_body - // ` - // setting); hence the value of its ``Content-Length`` reflects the size of its payload. - // - type.matcher.v3.ListStringMatcher allowed_headers = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Sets a list of headers that will be included in the request to the authorization service. - // - // .. note:: - // Client request headers with the same key will be overridden. - repeated config.core.v3.HeaderValue headers_to_add = 2; -} - -// [#next-free-field: 6] -message AuthorizationResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v2.AuthorizationResponse"; - - // When this list is set, authorization - // response headers that have a correspondent match will be added to the original client request. - // - // .. note:: - // Existing headers will be overridden. - type.matcher.v3.ListStringMatcher allowed_upstream_headers = 1; - - // When this list is set, authorization - // response headers that have a correspondent match will be added to the original client request. - // - // .. note:: - // Existing headers will be appended. - type.matcher.v3.ListStringMatcher allowed_upstream_headers_to_append = 3; - - // When this list is set, authorization - // response headers that have a correspondent match will be added to the client's response. - // When a header is included in this list, ``Path``, ``Status``, ``Content-Length``, ``WWW-Authenticate`` and - // ``Location`` are automatically added. - // - // .. note:: - // When this list is *not* set, all the authorization response headers, except - // ``Authority (Host)``, will be in the response to the client. - type.matcher.v3.ListStringMatcher allowed_client_headers = 2; - - // When this list is set, authorization - // response headers that have a correspondent match will be added to the client's response when - // the authorization response itself is successful, i.e. not failed or denied. When this list is - // *not* set, no additional headers will be added to the client's response on success. - type.matcher.v3.ListStringMatcher allowed_client_headers_on_success = 4; - - // When this list is set, authorization - // response headers that have a correspondent match will be emitted as dynamic metadata to be consumed - // by the next filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. - // - :ref:`envoy.filters.network.ext_authz ` for network filter. - type.matcher.v3.ListStringMatcher dynamic_metadata_from_headers = 5; -} - -// Extra settings on a per virtualhost/route/weighted-cluster level. -message ExtAuthzPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v2.ExtAuthzPerRoute"; - - oneof override { - option (validate.required) = true; - - // Disable the ext auth filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - // If the filter is disabled by default and this is set to ``false``, the filter will be enabled - // for this vhost or route. - bool disabled = 1; - - // Check request settings for this route. - CheckSettings check_settings = 2 [(validate.rules).message = {required: true}]; - } -} - -// Extra settings for the check request. -// [#next-free-field: 6] -message CheckSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ext_authz.v2.CheckSettings"; - - // Context extensions to set on the CheckRequest's - // :ref:`AttributeContext.context_extensions` - // - // You can use this to provide extra context for the external authorization server on specific - // virtual hosts/routes. For example, adding a context extension on the virtual host level can - // give the ext-authz server information on what virtual host is used without needing to parse the - // host header. If CheckSettings is specified in multiple per-filter-configs, they will be merged - // in order, and the result will be used. - // - // Merge semantics for this field are such that keys from more specific configs override. - // - // .. note:: - // These settings are only applied to a filter configured with a - // :ref:`grpc_service`. - map context_extensions = 1 [(udpa.annotations.sensitive) = true]; - - // When set to ``true``, disable the configured :ref:`with_request_body - // ` for a specific route. - // - // Only one of ``disable_request_body_buffering`` and - // :ref:`with_request_body ` - // may be specified. - bool disable_request_body_buffering = 2; - - // Enable or override request body buffering, which is configured using the - // :ref:`with_request_body ` - // option for a specific route. - // - // Only one of ``with_request_body`` and - // :ref:`disable_request_body_buffering ` - // may be specified. - BufferSettings with_request_body = 3; - - // Override the external authorization service for this route. - // This allows different routes to use different external authorization service backends - // and service types (gRPC or HTTP). If specified, this overrides the filter-level service - // configuration regardless of the original service type. - oneof service_override { - // Override with a gRPC service configuration. - config.core.v3.GrpcService grpc_service = 4; - - // Override with an HTTP service configuration. - HttpService http_service = 5; - } -} diff --git a/src/main/proto/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto b/src/main/proto/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto deleted file mode 100644 index b07811d..0000000 --- a/src/main/proto/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto +++ /dev/null @@ -1,500 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ext_proc.v3; - -import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/config/core/v3/http_service.proto"; -import "envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/http_status.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3"; -option java_outer_classname = "ExtProcProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_proc/v3;ext_procv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: External Processing Filter] -// External Processing Filter -// [#extension: envoy.filters.http.ext_proc] - -// The External Processing filter allows an external service to act on HTTP traffic in a flexible way. - -// The filter communicates with an external gRPC service called an "external processor" -// that can do a variety of things with the request and response: -// -// * Access and modify the HTTP headers on the request, response, or both. -// * Access and modify the HTTP request and response bodies. -// * Access and modify the dynamic stream metadata. -// * Immediately send an HTTP response downstream and terminate other processing. -// -// The filter communicates with the server using a gRPC bidirectional stream. After the initial -// request, the external server is in control over what additional data is sent to it -// and how it should be processed. -// -// By implementing the protocol specified by the stream, the external server can choose: -// -// * Whether it receives the response message at all. -// * Whether it receives the message body at all, in separate chunks, or as a single buffer. -// * To modify request or response trailers if they already exist. -// -// The filter supports up to six different processing steps. Each is represented by -// a gRPC stream message that is sent to the external processor. For each message, the -// processor must send a matching response. -// -// * Request headers: Contains the headers from the original HTTP request. -// * Request body: If the body is present, the behavior depends on the -// body send mode. In ``BUFFERED`` or ``BUFFERED_PARTIAL`` mode, the body is sent to the external -// processor in a single message. In ``STREAMED`` or ``FULL_DUPLEX_STREAMED`` mode, the body will -// be split across multiple messages sent to the external processor. In ``GRPC`` mode, as each -// gRPC message arrives, it will be sent to the external processor (there will be exactly one -// gRPC message in each message sent to the external processor). In ``NONE`` mode, the body will -// not be sent to the external processor. -// * Request trailers: Delivered if they are present and if the trailer mode is set -// to ``SEND``. -// * Response headers: Contains the headers from the HTTP response. Keep in mind -// that if the upstream system sends them before processing the request body that -// this message may arrive before the complete body. -// * Response body: Sent according to the processing mode like the request body. -// * Response trailers: Delivered according to the processing mode like the -// request trailers. -// -// By default, the processor sends only the request and response headers messages. -// This may be changed to include any of the six steps by changing the ``processing_mode`` -// setting of the filter configuration, or by setting the ``mode_override`` of any response -// from the external processor. The latter is only enabled if ``allow_mode_override`` is -// set to true. This way, a processor may, for example, use information -// in the request header to determine whether the message body must be examined, or whether -// the data plane should simply stream it straight through. -// -// All of this together allows a server to process the filter traffic in fairly -// sophisticated ways. For example: -// -// * A server may choose to examine all or part of the HTTP message bodies depending -// on the content of the headers. -// * A server may choose to immediately reject some messages based on their HTTP -// headers (or other dynamic metadata) and more carefully examine others. -// -// The protocol itself is based on a bidirectional gRPC stream. The data plane will send the server -// :ref:`ProcessingRequest ` -// messages, and the server must reply with -// :ref:`ProcessingResponse `. -// -// Stats about each gRPC call are recorded in a :ref:`dynamic filter state -// ` object in a namespace matching the filter -// name. -// -// [#next-free-field: 26] -message ExternalProcessor { - // Describes the route cache action to be taken when an external processor response - // is received in response to request headers. - enum RouteCacheAction { - // The default behavior is to clear the route cache only when the - // :ref:`clear_route_cache ` - // field is set in an external processor response. - DEFAULT = 0; - - // Always clear the route cache irrespective of the ``clear_route_cache`` bit in - // the external processor response. - CLEAR = 1; - - // Do not clear the route cache irrespective of the ``clear_route_cache`` bit in - // the external processor response. Setting to ``RETAIN`` is equivalent to setting the - // :ref:`disable_clear_route_cache ` - // to true. - RETAIN = 2; - } - - reserved 4; - - reserved "async_mode"; - - // Configuration for the gRPC service that the filter will communicate with. - // Only one of ``grpc_service`` or ``http_service`` can be set. - // It is required that one of them must be set. - config.core.v3.GrpcService grpc_service = 1 - [(udpa.annotations.field_migrate).oneof_promotion = "ext_proc_service_type"]; - - // Configuration for the HTTP service that the filter will communicate with. - // Only one of ``http_service`` or - // :ref:`grpc_service ` - // can be set. It is required that one of them must be set. - // - // If ``http_service`` is set, the - // :ref:`processing_mode ` - // cannot be configured to send any body or trailers. i.e., ``http_service`` only supports - // sending request or response headers to the side stream server. - // - // With this configuration, the data plane behavior is: - // - // 1. The headers are first put in a proto message - // :ref:`ProcessingRequest `. - // - // 2. This proto message is then transcoded into a JSON text. - // - // 3. The data plane then sends an HTTP POST message with content-type as "application/json", - // and this JSON text as body to the side stream server. - // - // After the side-stream receives this HTTP request message, it is expected to do as follows: - // - // 1. It converts the body, which is a JSON string, into a ``ProcessingRequest`` - // proto message to examine and mutate the headers. - // - // 2. It then sets the mutated headers into a new proto message - // :ref:`ProcessingResponse `. - // - // 3. It converts the ``ProcessingResponse`` proto message into a JSON text. - // - // 4. It then sends an HTTP response back to the data plane with status code as ``"200"``, - // ``content-type`` as ``"application/json"`` and sets the JSON text as the body. - // - ExtProcHttpService http_service = 20 [ - (udpa.annotations.field_migrate).oneof_promotion = "ext_proc_service_type", - (xds.annotations.v3.field_status).work_in_progress = true - ]; - - // By default, if in the following cases: - // - // 1. The gRPC stream cannot be established. - // - // 2. The gRPC stream is closed prematurely with an error. - // - // 3. The external processing timeouts. - // - // 4. The ext_proc server sends back spurious response messages. - // - // The filter will fail and a local reply with error code - // 504(for timeout case) or 500(for all other cases), will be sent to the downstream. - // - // However, with this parameter set to true and if the above cases happen, the processing - // continues without error. - // - bool failure_mode_allow = 2; - - // Specifies default options for how HTTP headers, trailers, and bodies are - // sent. See ``ProcessingMode`` for details. - ProcessingMode processing_mode = 3; - - // The data plane provides a number of :ref:`attributes ` - // for expressive policies. Each attribute name provided in this field will be - // matched against that list and populated in the - // :ref:`ProcessingRequest.attributes ` field. - // See the :ref:`attribute documentation ` - // for the list of supported attributes and their types. - repeated string request_attributes = 5; - - // The data plane provides a number of :ref:`attributes ` - // for expressive policies. Each attribute name provided in this field will be - // matched against that list and populated in the - // :ref:`ProcessingRequest.attributes ` field. - // See the :ref:`attribute documentation ` - // for the list of supported attributes and their types. - repeated string response_attributes = 6; - - // Specifies the timeout for each individual message sent on the stream. - // Whenever the data plane sends a message on the stream that requires a - // response, it will reset this timer, and will stop processing and return - // an error (subject to the processing mode) if the timer expires before a - // matching response is received. There is no timeout when the filter is - // running in observability mode or when the body send mode is - // ``FULL_DUPLEX_STREAMED`` or ``GRPC``. Zero is a valid config which means - // the timer will be triggered immediately. If not configured, default is - // 200 milliseconds. - google.protobuf.Duration message_timeout = 7 [(validate.rules).duration = { - lte {seconds: 3600} - gte {} - }]; - - // Optional additional prefix to use when emitting statistics. This allows to distinguish - // emitted statistics between configured ``ext_proc`` filters in an HTTP filter chain. - string stat_prefix = 8; - - // Rules that determine what modifications an external processing server may - // make to message headers. If not set, all headers may be modified except - // for "host", ":authority", ":scheme", ":method", and headers that start - // with the header prefix set via - // :ref:`header_prefix ` - // (which is usually "x-envoy"). - // Note that changing headers such as "host" or ":authority" may not in itself - // change the data plane's routing decision, as routes can be cached. To also force the - // route to be recomputed, set the - // :ref:`clear_route_cache ` - // field to true in the same response. - config.common.mutation_rules.v3.HeaderMutationRules mutation_rules = 9; - - // Specify the upper bound of - // :ref:`override_message_timeout ` - // If not specified, by default it is 0, which will effectively disable the ``override_message_timeout`` API. - google.protobuf.Duration max_message_timeout = 10 [(validate.rules).duration = { - lte {seconds: 3600} - gte {} - }]; - - // Allow headers matching the ``forward_rules`` to be forwarded to the external processing server. - // If not set, all headers are forwarded to the external processing server. - HeaderForwardingRules forward_rules = 12; - - // Additional metadata to be added to the filter state for logging purposes. The metadata - // will be added to StreamInfo's filter state under the namespace corresponding to the - // ext_proc filter name. - google.protobuf.Struct filter_metadata = 13; - - // If ``allow_mode_override`` is set to true, the filter config :ref:`processing_mode - // ` - // can be overridden by the response message from the external processing server - // :ref:`mode_override `. - // If not set, ``mode_override`` API in the response message will be ignored. - // Mode override is not supported if the body send mode is ``FULL_DUPLEX_STREAMED``. - bool allow_mode_override = 14; - - // If set to true, ignore the - // :ref:`immediate_response ` - // message in an external processor response. In such case, no local reply will be sent. - // Instead, the stream to the external processor will be closed. There will be no - // more external processing for this stream from now on. - bool disable_immediate_response = 15; - - // Options related to the sending and receiving of dynamic metadata. - MetadataOptions metadata_options = 16; - - // If true, send each part of the HTTP request or response specified by ``ProcessingMode`` - // without pausing on filter chain iteration. It is "Send and Go" mode that can be used - // by external processor to observe the request's data and status. In this mode: - // - // 1. Only ``STREAMED``, ``GRPC``, and ``NONE`` body processing modes are supported; for any - // other body processing mode, the body will not be sent. - // - // 2. External processor should not send back processing response, as any responses will be ignored. - // This also means that - // :ref:`message_timeout ` - // restriction doesn't apply to this mode. - // - // 3. External processor may still close the stream to indicate that no more messages are needed. - // - // .. warning:: - // - // Flow control is a necessary mechanism to prevent the fast sender (either downstream client or upstream server) - // from overwhelming the external processor when its processing speed is slower. - // This protective measure is being explored and developed but has not been ready yet, so please use your own - // discretion when enabling this feature. - // This work is currently tracked under https://github.com/envoyproxy/envoy/issues/33319. - // - bool observability_mode = 17; - - // Prevents clearing the route-cache when the - // :ref:`clear_route_cache ` - // field is set in an external processor response. - // Only one of ``disable_clear_route_cache`` or ``route_cache_action`` can be set. - // It is recommended to set ``route_cache_action`` which supersedes ``disable_clear_route_cache``. - bool disable_clear_route_cache = 11 - [(udpa.annotations.field_migrate).oneof_promotion = "clear_route_cache_type"]; - - // Specifies the action to be taken when an external processor response is - // received in response to request headers. It is recommended to set this field rather than set - // :ref:`disable_clear_route_cache `. - // Only one of ``disable_clear_route_cache`` or ``route_cache_action`` can be set. - RouteCacheAction route_cache_action = 18 - [(udpa.annotations.field_migrate).oneof_promotion = "clear_route_cache_type"]; - - // Specifies the deferred closure timeout for gRPC stream that connects to external processor. Currently, the deferred stream closure - // is only used in :ref:`observability_mode `. - // In observability mode, gRPC streams may be held open to the external processor longer than the lifetime of the regular client to - // backend stream lifetime. In this case, the data plane will eventually timeout the external processor stream according to this time limit. - // The default value is 5000 milliseconds (5 seconds) if not specified. - google.protobuf.Duration deferred_close_timeout = 19; - - // Send body to the side stream server once it arrives without waiting for the header response from that server. - // It only works for ``STREAMED`` body processing mode. For any other body - // processing modes, it is ignored. - // The server has two options upon receiving a header request: - // - // 1. Instant Response: send the header response as soon as the header request is received. - // - // 2. Delayed Response: wait for the body before sending any response. - // - // In all scenarios, the header-body ordering must always be maintained. - // - // If enabled the data plane will ignore the - // :ref:`mode_override ` - // value that the server sends in the header response. This is because the data plane may have already - // sent the body to the server, prior to processing the header response. - bool send_body_without_waiting_for_header_response = 21; - - // When :ref:`allow_mode_override - // ` is enabled and - // ``allowed_override_modes`` is configured, the filter config :ref:`processing_mode - // ` - // can only be overridden by the response message from the external processing server iff the - // :ref:`mode_override ` is allowed by - // the ``allowed_override_modes`` allow-list below. - // Since ``request_header_mode`` is not applicable in any way, it's ignored in comparison. - repeated ProcessingMode allowed_override_modes = 22; - - // Decorator to introduce custom logic that runs after the ``ProcessingRequest`` is constructed, but - // before it is sent to the External Processor. The ``ProcessingRequest`` may be modified. - // - // .. note:: - // Processing request modifiers are currently in alpha. - // - // [#extension-category: envoy.http.ext_proc.processing_request_modifiers] - config.core.v3.TypedExtensionConfig processing_request_modifier = 25 - [(xds.annotations.v3.field_status).work_in_progress = true]; - - // Decorator to introduce custom logic that runs after a message received from - // the External Processor is processed, but before continuing filter chain iteration. - // - // .. note:: - // Response processors are currently in alpha. - // - // [#extension-category: envoy.http.ext_proc.response_processors] - config.core.v3.TypedExtensionConfig on_processing_response = 23 - [(xds.annotations.v3.field_status).work_in_progress = true]; - - // Sets the HTTP status code that is returned to the client when the external processing server returns - // an error, fails to respond, or cannot be reached. - // - // The default status is ``HTTP 500 Internal Server Error``. - type.v3.HttpStatus status_on_error = 24; -} - -// ExtProcHttpService is used for HTTP communication between the filter and the external processing service. -message ExtProcHttpService { - // Sets the HTTP service which the external processing requests must be sent to. - config.core.v3.HttpService http_service = 1; -} - -// The MetadataOptions structure defines options for the sending and receiving of -// dynamic metadata. Specifically, which namespaces to send to the server, whether -// metadata returned by the server may be written, and how that metadata may be written. -message MetadataOptions { - message MetadataNamespaces { - // Specifies a list of metadata namespaces whose values, if present, - // will be passed to the ``ext_proc`` service as an opaque ``protobuf::Struct``. - repeated string untyped = 1; - - // Specifies a list of metadata namespaces whose values, if present, - // will be passed to the ``ext_proc`` service as a ``protobuf::Any``. This allows - // envoy and the external processing server to share the protobuf message - // definition for safe parsing. - repeated string typed = 2; - } - - // Describes which typed or untyped filter dynamic metadata namespaces to forward to - // the external processing server. - MetadataNamespaces forwarding_namespaces = 1; - - // Describes which typed or untyped filter dynamic metadata namespaces to accept from - // the external processing server. Set to empty or leave unset to disallow writing - // any received dynamic metadata. Receiving of typed metadata is not supported. - MetadataNamespaces receiving_namespaces = 2; - - // Describes which cluster metadata namespaces to forward to - // the external processing server. - // .. note:: - // This is the least specific metadata. Should there be any namespace collision, - // cluster level metadata can be overridden by filter metadata. - MetadataNamespaces cluster_metadata_forwarding_namespaces = 3; -} - -// The HeaderForwardingRules structure specifies what headers are -// allowed to be forwarded to the external processing server. -// -// This works as below: -// -// 1. If neither ``allowed_headers`` nor ``disallowed_headers`` is set, all headers are forwarded. -// 2. If both ``allowed_headers`` and ``disallowed_headers`` are set, only headers in the -// ``allowed_headers`` but not in the ``disallowed_headers`` are forwarded. -// 3. If ``allowed_headers`` is set, and ``disallowed_headers`` is not set, only headers in -// the ``allowed_headers`` are forwarded. -// 4. If ``disallowed_headers`` is set, and ``allowed_headers`` is not set, all headers except -// headers in the ``disallowed_headers`` are forwarded. -message HeaderForwardingRules { - // If set, specifically allow any header in this list to be forwarded to the external - // processing server. This can be overridden by the below ``disallowed_headers``. - type.matcher.v3.ListStringMatcher allowed_headers = 1; - - // If set, specifically disallow any header in this list to be forwarded to the external - // processing server. This overrides the above ``allowed_headers`` if a header matches both. - type.matcher.v3.ListStringMatcher disallowed_headers = 2; -} - -// Extra settings that may be added to per-route configuration for a -// virtual host or cluster. -message ExtProcPerRoute { - oneof override { - option (validate.required) = true; - - // Disable the filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Override aspects of the configuration for this route. A set of - // overrides in a more specific configuration will override a "disabled" - // flag set in a less-specific one. - ExtProcOverrides overrides = 2; - } -} - -// Overrides that may be set on a per-route basis -// [#next-free-field: 10] -message ExtProcOverrides { - // Set a different processing mode for this route than the default. - ProcessingMode processing_mode = 1; - - // [#not-implemented-hide:] - // Set a different asynchronous processing option than the default. - // Deprecated and not implemented. - bool async_mode = 2 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // [#not-implemented-hide:] - // Set different optional attributes than the default setting of the - // ``request_attributes`` field. - repeated string request_attributes = 3; - - // [#not-implemented-hide:] - // Set different optional properties than the default setting of the - // ``response_attributes`` field. - repeated string response_attributes = 4; - - // Set a different gRPC service for this route than the default. - config.core.v3.GrpcService grpc_service = 5; - - // Options related to the sending and receiving of dynamic metadata. - // Lists of forwarding and receiving namespaces will be overridden in their entirety, - // meaning the most-specific config that specifies this override will be the final - // config used. It is the prerogative of the control plane to ensure this - // most-specific config contains the correct final overrides. - MetadataOptions metadata_options = 6; - - // Additional metadata to include into streams initiated to the ``ext_proc`` gRPC - // service. This can be used for scenarios in which additional ad hoc - // authorization headers (e.g. ``x-foo-bar: baz-key``) are to be injected or - // when a route needs to partially override inherited metadata. - repeated config.core.v3.HeaderValue grpc_initial_metadata = 7; - - // If true, the filter will not fail closed if the gRPC stream is prematurely closed - // or could not be opened. This field is the per-route override of - // :ref:`failure_mode_allow `. - google.protobuf.BoolValue failure_mode_allow = 8; - - // Decorator to introduce custom logic that runs after the ``ProcessingRequest`` is constructed, but - // before it is sent to the External Processor. The ``ProcessingRequest`` may be modified. - // This is a per-route override of - // :ref:`processing_request_modifier `. - config.core.v3.TypedExtensionConfig processing_request_modifier = 9 - [(xds.annotations.v3.field_status).work_in_progress = true]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto b/src/main/proto/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto deleted file mode 100644 index e2ec894..0000000 --- a/src/main/proto/envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ext_proc.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ext_proc.v3"; -option java_outer_classname = "ProcessingModeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ext_proc/v3;ext_procv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: External Processing Filter] -// External Processing Filter Processing Mode -// [#extension: envoy.filters.http.ext_proc] - -// This configuration describes which parts of an HTTP request and -// response are sent to a remote server and how they are delivered. - -// [#next-free-field: 7] -message ProcessingMode { - // Control how headers and trailers are handled - enum HeaderSendMode { - // When used to configure the ext_proc filter :ref:`processing_mode - // `, - // the default HeaderSendMode depends on which part of the message is being processed. By - // default, request and response headers are sent, while trailers are skipped. - // - // When used in :ref:`mode_override - // ` or - // :ref:`allowed_override_modes - // `, - // a value of DEFAULT indicates that there is no change from the behavior that is configured for - // the filter in :ref:`processing_mode - // `. - DEFAULT = 0; - - // Send the header or trailer. - SEND = 1; - - // Do not send the header or trailer. - SKIP = 2; - } - - // Control how the request and response bodies are handled - // When body mutation by external processor is enabled, ext_proc filter will always remove - // the content length header in four cases below because content length can not be guaranteed - // to be set correctly: - // 1) STREAMED BodySendMode: header processing completes before body mutation comes back. - // 2) BUFFERED_PARTIAL BodySendMode: body is buffered and could be injected in different phases. - // 3) BUFFERED BodySendMode + SKIP HeaderSendMode: header processing (e.g., update content-length) is skipped. - // 4) FULL_DUPLEX_STREAMED BodySendMode: header processing completes before body mutation comes back. - // - // In Envoy's http1 codec implementation, removing content length will enable chunked transfer - // encoding whenever feasible. The recipient (either client or server) must be able - // to parse and decode the chunked transfer coding. - // (see `details in RFC9112 `_). - // - // In BUFFERED BodySendMode + SEND HeaderSendMode, content length header is allowed but it is - // external processor's responsibility to set the content length correctly matched to the length - // of mutated body. If they don't match, the corresponding body mutation will be rejected and - // local reply will be sent with an error message. - enum BodySendMode { - // Do not send the body at all. This is the default. - NONE = 0; - - // Stream the body to the server in pieces as they are seen. - STREAMED = 1; - - // Buffer the message body in memory and send the entire body at once. - // If the body exceeds the configured buffer limit, then the - // downstream system will receive an error. - BUFFERED = 2; - - // Buffer the message body in memory and send the entire body in one - // chunk. If the body exceeds the configured buffer limit, then the body contents - // up to the buffer limit will be sent. - BUFFERED_PARTIAL = 3; - - // The ext_proc client (the data plane) streams the body to the server in pieces as they arrive. - // - // 1) The server may choose to buffer any number chunks of data before processing them. - // After it finishes buffering, the server processes the buffered data. Then it splits the processed - // data into any number of chunks, and streams them back to the ext_proc client one by one. - // The server may continuously do so until the complete body is processed. - // The individual response chunk size is recommended to be no greater than 64K bytes, or - // :ref:`max_receive_message_length ` - // if EnvoyGrpc is used. - // - // 2) The server may also choose to buffer the entire message, including the headers (if header mode is - // ``SEND``), the entire body, and the trailers (if present), before sending back any response. - // The server response has to maintain the headers-body-trailers ordering. - // - // 3) Note that the server might also choose not to buffer data. That is, upon receiving a - // body request, it could process the data and send back a body response immediately. - // - // In this body mode: - // * The corresponding trailer mode has to be set to ``SEND``. - // * The client will send body and trailers (if present) to the server as they arrive. - // Sending the trailers (if present) is to inform the server the complete body arrives. - // In case there are no trailers, then the client will set - // :ref:`end_of_stream ` - // to true as part of the last body chunk request to notify the server that no other data is to be sent. - // * The server needs to send - // :ref:`StreamedBodyResponse ` - // to the client in the body response. - // * The client will stream the body chunks in the responses from the server to the upstream/downstream as they arrive. - - FULL_DUPLEX_STREAMED = 4; - - // [#not-implemented-hide:] - // A mode for gRPC traffic. This is similar to ``FULL_DUPLEX_STREAMED``, - // except that instead of sending raw chunks of the HTTP/2 DATA frames, - // the ext_proc client will de-frame the individual gRPC messages inside - // the HTTP/2 DATA frames, and as each message is de-framed, it will be - // sent to the ext_proc server as a :ref:`request_body - // ` - // or :ref:`response_body - // `. - // The ext_proc server will stream back individual gRPC messages in the - // :ref:`StreamedBodyResponse ` - // field, but the number of messages sent by the ext_proc server - // does not need to equal the number of messages sent by the data - // plane. This allows the ext_proc server to change the number of - // messages sent on the stream. - // In this mode, the client will send body and trailers to the server as - // they arrive. - GRPC = 5; - } - - // How to handle the request header. Default is "SEND". - // Note this field is ignored in :ref:`mode_override - // `, since mode - // overrides can only affect messages exchanged after the request header is processed. - HeaderSendMode request_header_mode = 1 [(validate.rules).enum = {defined_only: true}]; - - // How to handle the response header. Default is "SEND". - HeaderSendMode response_header_mode = 2 [(validate.rules).enum = {defined_only: true}]; - - // How to handle the request body. Default is "NONE". - BodySendMode request_body_mode = 3 [(validate.rules).enum = {defined_only: true}]; - - // How do handle the response body. Default is "NONE". - BodySendMode response_body_mode = 4 [(validate.rules).enum = {defined_only: true}]; - - // How to handle the request trailers. Default is "SKIP". - HeaderSendMode request_trailer_mode = 5 [(validate.rules).enum = {defined_only: true}]; - - // How to handle the response trailers. Default is "SKIP". - HeaderSendMode response_trailer_mode = 6 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/fault/v3/fault.proto b/src/main/proto/envoy/extensions/filters/http/fault/v3/fault.proto deleted file mode 100644 index 01f056e..0000000 --- a/src/main/proto/envoy/extensions/filters/http/fault/v3/fault.proto +++ /dev/null @@ -1,159 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.fault.v3; - -import "envoy/config/route/v3/route_components.proto"; -import "envoy/extensions/filters/common/fault/v3/fault.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.fault.v3"; -option java_outer_classname = "FaultProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/fault/v3;faultv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Fault Injection] -// Fault Injection :ref:`configuration overview `. -// [#extension: envoy.filters.http.fault] - -// [#next-free-field: 6] -message FaultAbort { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.fault.v2.FaultAbort"; - - // Fault aborts are controlled via an HTTP header (if applicable). See the - // :ref:`HTTP fault filter ` documentation for - // more information. - message HeaderAbort { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.fault.v2.FaultAbort.HeaderAbort"; - } - - reserved 1; - - oneof error_type { - option (validate.required) = true; - - // HTTP status code to use to abort the HTTP request. - uint32 http_status = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // gRPC status code to use to abort the gRPC request. - uint32 grpc_status = 5; - - // Fault aborts are controlled via an HTTP header (if applicable). - HeaderAbort header_abort = 4; - } - - // The percentage of requests/operations/connections that will be aborted with the error code - // provided. - type.v3.FractionalPercent percentage = 3; -} - -// [#next-free-field: 17] -message HTTPFault { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.fault.v2.HTTPFault"; - - // If specified, the filter will inject delays based on the values in the - // object. - common.fault.v3.FaultDelay delay = 1; - - // If specified, the filter will abort requests based on the values in - // the object. At least ``abort`` or ``delay`` must be specified. - FaultAbort abort = 2; - - // Specifies the name of the (destination) upstream cluster that the - // filter should match on. Fault injection will be restricted to requests - // bound to the specific upstream cluster. - string upstream_cluster = 3; - - // Specifies a set of headers that the filter should match on. The fault - // injection filter can be applied selectively to requests that match a set of - // headers specified in the fault filter config. The chances of actual fault - // injection further depend on the value of the :ref:`percentage - // ` field. - // The filter will check the request's headers against all the specified - // headers in the filter config. A match will happen if all the headers in the - // config are present in the request with the same values (or based on - // presence if the ``value`` field is not in the config). - repeated config.route.v3.HeaderMatcher headers = 4; - - // Faults are injected for the specified list of downstream hosts. If this - // setting is not set, faults are injected for all downstream nodes. - // Downstream node name is taken from :ref:`the HTTP - // x-envoy-downstream-service-node - // ` header and compared - // against downstream_nodes list. - repeated string downstream_nodes = 5; - - // The maximum number of faults that can be active at a single time via the configured fault - // filter. Note that because this setting can be overridden at the route level, it's possible - // for the number of active faults to be greater than this value (if injected via a different - // route). If not specified, defaults to unlimited. This setting can be overridden via - // ``runtime `` and any faults that are not injected - // due to overflow will be indicated via the ``faults_overflow - // `` stat. - // - // .. attention:: - // Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy - // limit. It's possible for the number of active faults to rise slightly above the configured - // amount due to the implementation details. - google.protobuf.UInt32Value max_active_faults = 6; - - // The response rate limit to be applied to the response body of the stream. When configured, - // the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent - // ` runtime key. - // - // .. attention:: - // This is a per-stream limit versus a connection level limit. This means that concurrent streams - // will each get an independent limit. - common.fault.v3.FaultRateLimit response_rate_limit = 7; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_delay_percent - string delay_percent_runtime = 8; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.abort_percent - string abort_percent_runtime = 9; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.delay.fixed_duration_ms - string delay_duration_runtime = 10; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.http_status - string abort_http_status_runtime = 11; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.max_active_faults - string max_active_faults_runtime = 12; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.rate_limit.response_percent - string response_rate_limit_percent_runtime = 13; - - // The runtime key to override the :ref:`default ` - // runtime. The default is: fault.http.abort.grpc_status - string abort_grpc_status_runtime = 14; - - // To control whether stats storage is allocated dynamically for each downstream server. - // If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter. - // If set to false, dynamic stats storage will be allocated for the downstream cluster name. - // Default value is false. - bool disable_downstream_cluster_stats = 15; - - // When an abort or delay fault is executed, the metadata struct provided here will be added to the - // request's dynamic metadata under the namespace corresponding to the name of the fault filter. - // This data can be logged as part of Access Logs using the :ref:`command operator - // ` %DYNAMIC_METADATA(NAMESPACE)%, where NAMESPACE is the name of - // the fault filter. - google.protobuf.Struct filter_metadata = 16; -} diff --git a/src/main/proto/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.proto b/src/main/proto/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.proto deleted file mode 100644 index 48078b9..0000000 --- a/src/main/proto/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.proto +++ /dev/null @@ -1,133 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.file_system_buffer.v3; - -import "envoy/extensions/common/async_files/v3/async_file_manager.proto"; - -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.file_system_buffer.v3"; -option java_outer_classname = "FileSystemBufferProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/file_system_buffer/v3;file_system_bufferv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: FileSystemBufferFilterConfig] -// [#extension: envoy.filters.http.file_system_buffer] - -// The behavior of the filter for a stream. -// [#next-free-field: 6] -message BufferBehavior { - message StreamWhenPossible { - } - - message Bypass { - } - - message InjectContentLengthIfNecessary { - } - - message FullyBufferAndAlwaysInjectContentLength { - } - - message FullyBuffer { - } - - oneof behavior { - option (validate.required) = true; - - // Don't inject ``content-length`` header. - // Output immediately, buffer only if output is slower than input. - StreamWhenPossible stream_when_possible = 1; - - // Never buffer, do nothing. - Bypass bypass = 2; - - // If ``content-length`` is not present, buffer the entire input, - // inject ``content-length`` header, then output. - // If ``content-length`` is already present, act like ``stream_when_possible``. - InjectContentLengthIfNecessary inject_content_length_if_necessary = 3; - - // Always buffer the entire input, and inject ``content-length``, - // overwriting any provided content-length header. - FullyBufferAndAlwaysInjectContentLength fully_buffer_and_always_inject_content_length = 4; - - // Always buffer the entire input, do not modify ``content-length``. - FullyBuffer fully_buffer = 5; - } -} - -// The configuration for one direction of the filter behavior. -message StreamConfig { - // Whether to bypass / stream / fully buffer / etc. - // If unset in route, vhost and listener config, the default is ``stream_when_possible``. - BufferBehavior behavior = 1; - - // The amount stored in the memory buffer before buffering to disk. - // If unset in route, vhost and listener config, defaults to a hardcoded value of 1MiB - google.protobuf.UInt64Value memory_buffer_bytes_limit = 2 [(validate.rules).uint64 = {gt: 0}]; - - // The maximum storage (excluding memory) to be buffered in this filter. - // If unset in route, vhost and listener config, defaults to a hardcoded value of 32MiB - google.protobuf.UInt64Value storage_buffer_bytes_limit = 3; - - // The maximum amount that can be queued for writing to storage, above which the - // source is requested to pause. If unset, defaults to the same value as - // ``memory_buffer_bytes_limit``. - // - // For example, assuming the recipient is not consuming data at all, if - // ``memory_buffer_bytes_limit`` was 32MiB, and ``storage_buffer_queue_high_watermark_bytes`` - // was 64MiB, and the filesystem is backed up so writes are not occurring promptly, - // then: - // - // * Any request less than 32MiB will eventually pass through without ever attempting - // to write to disk. - // * Any request with over 32MiB buffered will start trying to write to disk. - // If it reaches (32+64)MiB buffered in memory (write to disk isn't keeping up), a high - // watermark signal is sent to the source. - // * Any stream whose total size exceeds - // ``memory_buffer_bytes_limit + storage_buffer_bytes_limit`` will provoke an error. - // (Note, if the recipient *is* consuming data then it is possible for such an - // oversized request to pass through the buffer filter, provided the recipient - // isn't consuming data too slowly.) - // - // The low watermark signal is sent when the memory buffer is at size - // ``memory_buffer_bytes_limit + (storage_buffer_queue_high_watermark_bytes / 2)``. - google.protobuf.UInt64Value storage_buffer_queue_high_watermark_bytes = 4; -} - -// A :ref:`file system buffer ` filter configuration. -// -// Route-specific configs override only the fields they explicitly include; unset -// fields inherit from the vhost or listener-level config, or, if never set, -// and not required, use a default value. -message FileSystemBufferFilterConfig { - // A configuration for an AsyncFileManager. - // - // If unset in route, vhost and listener, and the behavior is not ``bypass`` - // in both directions, an Internal Server Error response will be sent. - common.async_files.v3.AsyncFileManagerConfig manager_config = 1; - - // An optional path to which the unlinked files should be written - this may - // determine which physical storage device will be used. - // - // If unset in route, vhost and listener, will use the environment variable - // ``TMPDIR``, or, if that's also unset, will use ``/tmp``. - google.protobuf.StringValue storage_buffer_path = 2; - - // Optional configuration for how to buffer (or not) requests. - // If unset in route, vhost and listener, ``StreamConfig`` default values will be used - // (with behavior ``stream_when_possible``) - StreamConfig request = 3; - - // Optional configuration for how to buffer (or not) responses. - // If unset in route, vhost and listener, ``StreamConfig`` default values will be used - // (with behavior ``stream_when_possible``) - StreamConfig response = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto b/src/main/proto/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto deleted file mode 100644 index f464638..0000000 --- a/src/main/proto/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.gcp_authn.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/http_uri.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.gcp_authn.v3"; -option java_outer_classname = "GcpAuthnProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/gcp_authn/v3;gcp_authnv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: GCP authentication] -// GCP authentication :ref:`configuration overview `. -// [#extension: envoy.filters.http.gcp_authn] - -// Filter configuration. -// [#next-free-field: 7] -message GcpAuthnFilterConfig { - // The HTTP URI to fetch tokens from GCE Metadata Server(https://cloud.google.com/compute/docs/metadata/overview). - // The URL format is "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=[AUDIENCE]" - // - // This field is deprecated because it does not match the API surface provided by the google auth libraries. - // Control planes should not attempt to override the metadata server URI. - // The cluster and timeout can be configured using the ``cluster`` and ``timeout`` fields instead. - // For backward compatibility, the cluster and timeout configured in this field will be used - // if the new ``cluster`` and ``timeout`` fields are not set. - config.core.v3.HttpUri http_uri = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Retry policy for fetching tokens. - // Not supported by all data planes. - config.core.v3.RetryPolicy retry_policy = 2; - - // Token cache configuration. This field is optional. - TokenCacheConfig cache_config = 3; - - // Request header location to extract the token. By default (i.e. if this field is not specified), the token - // is extracted to the Authorization HTTP header, in the format "Authorization: Bearer ". - // Not supported by all data planes. - TokenHeader token_header = 4; - - // Cluster to send traffic to the GCE metadata server. Not supported - // by all data planes; a data plane may instead have its own mechanism - // for contacting the metadata server. - string cluster = 5; - - // Timeout for fetching the tokens from the GCE metadata server. - // Not supported by all data planes. - google.protobuf.Duration timeout = 6 [(validate.rules).duration = { - lt {seconds: 4294967296} - gte {} - }]; -} - -// Audience is the URL of the receiving service that performs token authentication. -// It will be provided to the filter through cluster's typed_filter_metadata. -message Audience { - string url = 1 [(validate.rules).string = {min_len: 1}]; -} - -// Token Cache configuration. -message TokenCacheConfig { - // The number of cache entries. The maximum number of entries is INT64_MAX as it is constrained by underlying cache implementation. - // Default value 0 (i.e., proto3 defaults) disables the cache by default. Other default values will enable the cache. - google.protobuf.UInt64Value cache_size = 1 [(validate.rules).uint64 = {lte: 9223372036854775807}]; -} - -message TokenHeader { - // The HTTP header's name. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The header's prefix. The format is "value_prefix" - // For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the - // end. - string value_prefix = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/geoip/v3/geoip.proto b/src/main/proto/envoy/extensions/filters/http/geoip/v3/geoip.proto deleted file mode 100644 index 7703544..0000000 --- a/src/main/proto/envoy/extensions/filters/http/geoip/v3/geoip.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.geoip.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.geoip.v3"; -option java_outer_classname = "GeoipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/geoip/v3;geoipv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Geoip] -// Geoip :ref:`configuration overview `. -// [#extension: envoy.filters.http.geoip] - -message Geoip { - message XffConfig { - // The number of additional ingress proxy hops from the right side of the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when - // determining the origin client's IP address. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. - // - // Defaults to ``0``. - uint32 xff_num_trusted_hops = 1; - } - - message CustomHeaderConfig { - // The name of the request header to extract the client IP address from. - // The header value must contain a valid IP address (IPv4 or IPv6). - // - // If the header is missing or contains an invalid IP address, the filter will fall back - // to using the immediate downstream connection source address. - string header_name = 1 [(validate.rules).string = {min_len: 1}]; - } - - // Configuration for extracting the client IP address from the - // ``x-forwarded-for`` header. If set, the - // :ref:`xff_num_trusted_hops ` - // field will be used to determine the trusted client address from the ``x-forwarded-for`` header. - // If not set, the immediate downstream connection source address will be used. - // - // Only one of ``xff_config`` or - // :ref:`custom_header_config ` - // can be set. - XffConfig xff_config = 1; - - // Configuration for extracting the client IP address from a custom request header. - // - // If set, the - // :ref:`header_name ` - // field will be used to extract the client IP address from the specified request header. - // - // Only one of ``custom_header_config`` or - // :ref:`xff_config ` - // can be set. - CustomHeaderConfig custom_header_config = 4; - - // Geoip driver specific configuration which depends on the driver being instantiated. - // See the geoip drivers for examples: - // - // - :ref:`MaxMindConfig ` - // [#extension-category: envoy.geoip_providers] - config.core.v3.TypedExtensionConfig provider = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_field_extraction/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/grpc_field_extraction/v3/config.proto deleted file mode 100644 index 6eb2259..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_field_extraction/v3/config.proto +++ /dev/null @@ -1,190 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_field_extraction.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_field_extraction.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_field_extraction/v3;grpc_field_extractionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Field Extraction] -// -// [#extension: envoy.filters.http.grpc_field_extraction] -// -// Overview -// -------- -// -// This filter supports extracting the fields from the first gRPC -// request message no matter if it is unary or streaming and writing the result -// to the destination, for which currently only the static Envoy dynamic metadata `envoy.filters.http.grpc_field_extraction` is supported. -// -// Assumptions -// ----------- -// -// This filter assumes -// -// 1. this filter is only applicable for gRPC with Protobuf as payload. -// 2. for bi-directional and client-side gRPC streaming, the initial message from the client should not depend on receiving the server initial metadata. -// -// Process Flow -// ------------ -// -// When a request reaches the filter, it will check -// -// 1. if the request is the gRPC request configured for extraction, the filter tries to: -// -// a. block the incoming data before decoding the first complete gRPC message -// b. look up the target field from the buffered gRPC message -// c. write the extraction result into the dynamic metadata and resume the request propagation. -// -// 2. otherwise, pass through the request. -// -// If the request is a malformed one found during 1.a or 1.b, the filter will reject the request. -// -// Config Requirements -// ------------------- -// -// Here are config requirements -// -// 1. the target field should be among the following primitive types: `string`, -// `uint32`, `uint64`, `int32`, `int64`, `sint32`, `sint64`, `fixed32`, -// `fixed64`, `sfixed32`, `sfixed64`, `float`, `double`, `map`. -// -// 2. the target field could be repeated. -// -// 3. the intermediate type could also be repeated. -// -// Output Format -// ------------- -// -// 1. the extracted field names/values will be wrapped in be ``field`` -> ``values``, which will be added in the dynamic ``metadata``. -// -// 2. if the field value is empty, an empty ``Value`` will be set. -// -// Performance -// ----------- -// -// This filter should be performant as it -// -// 1. converts between the gRPC message from EnvoyBuffer without data copy. -// 2. parse the gRPC message binary directly without deserialization. -// -// though buffering the first message introduces some latency. -// -// Example -// ------- -// -// We have the following request definition for the gRPC method `pkg.svc.Method`. -// -// .. code-block:: proto -// -// message MethodRequest { -// string foo = 1; -// Nested nested = 2; -// uint32 baz = 3; -// ... -// } -// -// message Nested { -// repeated string bar = 1; -// } -// -// This is the filter config in JSON. -// -// .. code-block:: json -// -// { -// "descriptor_set":{}, -// "extractions_by_method":{ -// "pkg.svc.Method":{ -// "request_field_extractions":{ -// "foo":{ -// }, -// "nested.bar":{ -// } -// "baz":{ -// } -// } -// } -// } -// } -// -// During runtime, the filter receives the following `MethodRequest` message in JSON. -// -// .. code-block:: json -// -// { -// "foo": "val_foo", -// "nested": { "bar": ["val_bar1", "val_bar2"]} -// } -// -// The filter will write the following dynamic metadata(`envoy.filters.http.grpc_field_extraction`) in JSON. -// -// .. code-block:: json -// -// { -// "foo":[ -// "val_foo" -// ], -// "nested.bar":[ -// "val_bar1", "val_bar2" -// ] -// "baz":[ -// ] -// } - -message GrpcFieldExtractionConfig { - // The proto descriptor set binary for the gRPC services. - // - // It could be passed by a local file through ``Datasource.filename`` or embedded in the - // ``Datasource.inline_bytes``. - config.core.v3.DataSource descriptor_set = 1 [(validate.rules).message = {required: true}]; - - // Specify the extraction info. - // The key is the fully qualified gRPC method name. - // ``${package}.${Service}.${Method}``, like - // ``endpoints.examples.bookstore.BookStore.GetShelf`` - // - // The value is the field extractions for individual gRPC method. - map extractions_by_method = 2; -} - -// This message can be used to support per route config approach later even -// though the Istio doesn't support that so far. -message FieldExtractions { - // The field extractions for requests. - // The key is the field path within the grpc request. - // For example, we can define ``foo.bar.name`` if we want to extract - // ``Request.foo.bar.name``. - // - // .. code-block:: proto - // - // message Request { - // Foo foo = 1; - // } - // - // message Foo { - // Bar bar = 1; - // } - // - // message Bar { - // string name = 1; - // } - map request_field_extractions = 1; -} - -message RequestFieldValueDisposition { - oneof disposition { - // The dynamic metadata namespace. If empty, "envoy.filters.http.grpc_field_extraction" will be used by default. - // - // Unimplemented. Uses "envoy.filters.http.grpc_field_extraction" for now. - string dynamic_metadata = 1; - } -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto deleted file mode 100644 index 1ca5b05..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_http1_bridge.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_http1_bridge.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_http1_bridge/v3;grpc_http1_bridgev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC HTTP/1.1 Bridge] -// gRPC HTTP/1.1 Bridge Filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_http1_bridge] - -// gRPC HTTP/1.1 Bridge filter config. -message Config { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.grpc_http1_bridge.v2.Config"; - - // If true then requests with content type set to ``application/x-protobuf`` will be automatically converted to gRPC. - // This works by prepending the payload data with the gRPC header frame, as defined by the wiring format, and - // Content-Type will be updated accordingly before sending the request. - // For the requests that went through this upgrade the filter will also strip the frame before forwarding the - // response to the client. - bool upgrade_protobuf_to_grpc = 1; - - // If true then query parameters in request's URL path will be removed. - bool ignore_query_parameters = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto deleted file mode 100644 index 70fa007..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3;grpc_http1_reverse_bridgev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC HTTP/1.1 Reverse Bridge] -// gRPC HTTP/1.1 Reverse Bridge :ref:`configuration overview -// `. -// [#extension: envoy.filters.http.grpc_http1_reverse_bridge] - -// gRPC reverse bridge filter configuration -message FilterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1.FilterConfig"; - - // The content-type to pass to the upstream when the gRPC bridge filter is applied. - // The filter will also validate that the upstream responds with the same content type. - string content_type = 1 [(validate.rules).string = {min_len: 1}]; - - // If true, Envoy will assume that the upstream doesn't understand gRPC frames and - // strip the gRPC frame from the request, and add it back in to the response. This will - // hide the gRPC semantics from the upstream, allowing it to receive and respond with a - // simple binary encoded protobuf. In order to calculate the ``Content-Length`` header value, Envoy - // will buffer the upstream response unless :ref:`response_size_header - // ` - // is set, in which case Envoy will use the value of an upstream header to calculate the content - // length. - bool withhold_grpc_frames = 2; - - // When :ref:`withhold_grpc_frames - // ` - // is true, this option controls how Envoy calculates the ``Content-Length``. When - // ``response_size_header`` is empty, Envoy will buffer the upstream response to calculate its - // size. When ``response_size_header`` is set to a non-empty string, Envoy will stream the response - // to the downstream and it will use the value of the response header with this name to set the - // ``Content-Length`` header and gRPC frame size. If the header with this name is repeated, only - // the first value will be used. - // - // Envoy will treat the upstream response as an error if this option is specified and the header - // is missing or if the value does not match the actual response body size. - string response_size_header = 3 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} - -// gRPC reverse bridge filter configuration per virtualhost/route/weighted-cluster level. -message FilterConfigPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1.FilterConfigPerRoute"; - - // If true, disables gRPC reverse bridge filter for this particular vhost or route. - // If disabled is specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_json_reverse_transcoder/v3/transcoder.proto b/src/main/proto/envoy/extensions/filters/http/grpc_json_reverse_transcoder/v3/transcoder.proto deleted file mode 100644 index f8dc463..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_json_reverse_transcoder/v3/transcoder.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_json_reverse_transcoder.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_json_reverse_transcoder.v3"; -option java_outer_classname = "TranscoderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_json_reverse_transcoder/v3;grpc_json_reverse_transcoderv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC-JSON reverse transcoder] -// gRPC-JSON reverse transcoder :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_json_reverse_transcoder] - -// [#next-free-field: 7] -// ``GrpcJsonReverseTranscoder`` is the filter configuration for the gRPC JSON -// reverse transcoder. The reverse transcoder acts as a bridge between a gRPC -// client and an HTTP/JSON server, converting the gRPC request into HTTP/JSON -// for the HTTP backend and the HTTP/JSON response back to gRPC for the gRPC -// client. This effectively reverses the behavior of the -// :ref:`grpc_json_transcoder filter `, -// allowing a gRPC client to communicate with an HTTP/JSON server. -message GrpcJsonReverseTranscoder { - message PrintOptions { - // Whether to always print primitive fields. By default primitive - // fields with default values will be omitted in JSON output. For - // example, an int32 field set to 0 will be omitted. Setting this flag to - // true will override the default behavior and print primitive fields - // regardless of their values. Defaults to false. - bool always_print_primitive_fields = 1; - - // Whether to always print enums as ints. By default they are rendered - // as strings. Defaults to false. - bool always_print_enums_as_ints = 2; - - // Whether to convert the proto field names to ``json_name`` annotation value, or lower camel case, - // in absence of ``json_name``. By default the field names will be preserved after conversion. - // Setting this flag will convert the field names to their canonical form. Defaults to false. - // - // Example: - // - // .. code-block:: proto - // - // message Author { - // int64 id = 1; - // enum Gender { - // UNKNOWN = 0; - // MALE = 1; - // FEMALE = 2; - // }; - // Gender gender = 2; - // string first_name = 3; - // string last_name = 4 [json_name = "lname"]; - // } - // - // The above proto message after being transcoded to JSON with - // ``use_canonical_field_names`` set to ``false`` will have the - // field names same as in the proto message, as follows: - // - // .. code-block:: json - // - // { - // "id": "12345", - // "gender": "MALE", - // "first_name": "John", - // "last_name": "Doe" - // } - // - // and with the ``use_canonical_field_names`` set to ``true``, the - // transcoded JSON will have ``first_name`` converted to camelCase - // and ``last_name`` converted to its ``json_name`` annotation value, - // as follows: - // - // .. code-block:: json - // - // { - // "id": "12345", - // "gender": "MALE", - // "firstName": "John", - // "lname": "Doe" - // } - // - bool use_canonical_field_names = 3; - } - - // Supplies the filename of - // :ref:`the proto descriptor set - // ` for the gRPC services. - // If set, takes precedence over the ``descriptor_binary`` field. - string descriptor_path = 1; - - // Supplies the binary content of - // :ref:`the proto descriptor set - // ` for the gRPC services. - // If ``descriptor_path`` is set, this field is not used. - bytes descriptor_binary = 2; - - // The maximum size of a request body to be transcoded, in bytes. A body exceeding this size will - // provoke a ``gRPC status: ResourceExhausted`` response. - // - // Large values may cause envoy to use a lot of memory if there are many - // concurrent requests. - // - // If unset, the current stream buffer size is used. - google.protobuf.UInt32Value max_request_body_size = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The maximum size of a response body to be transcoded, in bytes. A body exceeding this size will - // provoke a ``gRPC status: Internal`` response. - // - // Large values may cause envoy to use a lot of memory if there are many - // concurrent requests. - // - // If unset, the current stream buffer size is used. - google.protobuf.UInt32Value max_response_body_size = 4 [(validate.rules).uint32 = {gt: 0}]; - - // The name of the header field that has the API version of the request. - string api_version_header = 5; - - // Control options for upstream request JSON. These options are passed directly to - // `JsonPrintOptions `_. - PrintOptions request_json_print_options = 6; -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto b/src/main/proto/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto deleted file mode 100644 index 8562c9d..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto +++ /dev/null @@ -1,313 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_json_transcoder.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_json_transcoder.v3"; -option java_outer_classname = "TranscoderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_json_transcoder/v3;grpc_json_transcoderv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC-JSON transcoder] -// gRPC-JSON transcoder :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_json_transcoder] - -// [#next-free-field: 18] -// GrpcJsonTranscoder filter configuration. -// The filter itself can be used per route / per virtual host or on the general level. The most -// specific one is being used for a given route. If the list of services is empty - filter -// is considered to be disabled. -// Note that if specifying the filter per route, first the route is matched, and then transcoding -// filter is applied. It matters when specifying the route configuration and paths to match the -// request - for per-route grpc transcoder configs, the original path should be matched, while -// in other cases, the grpc-like path is expected (the one AFTER the filter is applied). -message GrpcJsonTranscoder { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder"; - - enum UrlUnescapeSpec { - // URL path parameters will not decode RFC 6570 reserved characters. - // For example, segment ``%2f%23/%20%2523`` is unescaped to ``%2f%23/ %23``. - ALL_CHARACTERS_EXCEPT_RESERVED = 0; - - // URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where ``%2F`` will be - // left encoded. - // For example, segment ``%2f%23/%20%2523`` is unescaped to ``%2f#/ %23``. - ALL_CHARACTERS_EXCEPT_SLASH = 1; - - // URL path parameters will be fully URI-decoded. - // For example, segment ``%2f%23/%20%2523`` is unescaped to ``/#/ %23``. - ALL_CHARACTERS = 2; - } - - // [#next-free-field: 7] - message PrintOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder.PrintOptions"; - - // Whether to add spaces, line breaks and indentation to make the JSON - // output easy to read. Defaults to false. - bool add_whitespace = 1; - - // Whether to always print primitive fields. By default primitive - // fields with default values will be omitted in JSON output. For - // example, an int32 field set to 0 will be omitted. Setting this flag to - // true will override the default behavior and print primitive fields - // regardless of their values. Defaults to false. - bool always_print_primitive_fields = 2; - - // Whether to always print enums as ints. By default they are rendered - // as strings. Defaults to false. - bool always_print_enums_as_ints = 3; - - // Whether to preserve proto field names. By default protobuf will - // generate JSON field names using the ``json_name`` option, or lower camel case, - // in that order. Setting this flag will preserve the original field names. Defaults to false. - bool preserve_proto_field_names = 4; - - // If true, return all streams as newline-delimited JSON messages instead of as a comma-separated array - bool stream_newline_delimited = 5; - - // If true, enforces Server-Sent Events (SSE) message framing (``data: - // \n\n``) and, ``stream_newline_delimited`` is ignored. If false, - // message framing is determined by ``stream_newline_delimited``. - bool stream_sse_style_delimited = 6; - } - - message RequestValidationOptions { - // By default, a request that cannot be mapped to any specified gRPC - // :ref:`services ` - // will pass-through this filter. - // When set to true, the request will be rejected with a ``HTTP 404 Not Found``. - bool reject_unknown_method = 1; - - // By default, a request with query parameters that cannot be mapped to the gRPC request message - // will pass-through this filter. - // When set to true, the request will be rejected with a ``HTTP 400 Bad Request``. - // - // The fields - // :ref:`ignore_unknown_query_parameters `, - // :ref:`capture_unknown_query_parameters `, - // and - // :ref:`ignored_query_parameters ` - // have priority over this strict validation behavior. - bool reject_unknown_query_parameters = 2; - - // By default, transcoding will default to the value in the body if there - // are conflict values in the bindings. For example, - // - // post: '/resources/a?id=123' - // body: { - // id: 456, - // } - - // "id: 456" in the body will override "id=123" in the binding. - // - // If this field is set to true, the request will be rejected if the binding - // value is different from the body value. - bool reject_binding_body_field_collisions = 3; - } - - oneof descriptor_set { - option (validate.required) = true; - - // Supplies the filename of - // :ref:`the proto descriptor set ` for the gRPC - // services. - string proto_descriptor = 1; - - // Supplies the binary content of - // :ref:`the proto descriptor set ` for the gRPC - // services. - bytes proto_descriptor_bin = 4; - } - - // A list of strings that - // supplies the fully qualified service names (i.e. "package_name.service_name") that - // the transcoder will translate. If the service name doesn't exist in ``proto_descriptor``, - // Envoy will fail at startup. The ``proto_descriptor`` may contain more services than - // the service names specified here, but they won't be translated. - // - // By default, the filter will pass through requests that do not map to any specified services. - // If the list of services is empty, filter is considered disabled. - // However, this behavior changes if - // :ref:`reject_unknown_method ` - // is enabled. - repeated string services = 2; - - // Control options for response JSON. These options are passed directly to - // `JsonPrintOptions `_. - PrintOptions print_options = 3; - - // Whether to keep the incoming request route after the outgoing headers have been transformed to - // the match the upstream gRPC service. Note: This means that routes for gRPC services that are - // not transcoded cannot be used in combination with ``match_incoming_request_route``. - bool match_incoming_request_route = 5; - - // A list of query parameters to be ignored for transcoding method mapping. - // By default, the transcoder filter will not transcode a request if there are any - // unknown/invalid query parameters. - // - // Example : - // - // .. code-block:: proto - // - // service Bookstore { - // rpc GetShelf(GetShelfRequest) returns (Shelf) { - // option (google.api.http) = { - // get: "/shelves/{shelf}" - // }; - // } - // } - // - // message GetShelfRequest { - // int64 shelf = 1; - // } - // - // message Shelf {} - // - // The request ``/shelves/100?foo=bar`` will not be mapped to ``GetShelf``` because variable - // binding for ``foo`` is not defined. Adding ``foo`` to ``ignored_query_parameters`` will allow - // the same request to be mapped to ``GetShelf``. - repeated string ignored_query_parameters = 6; - - // Whether to route methods without the ``google.api.http`` option. - // - // Example : - // - // .. code-block:: proto - // - // package bookstore; - // - // service Bookstore { - // rpc GetShelf(GetShelfRequest) returns (Shelf) {} - // } - // - // message GetShelfRequest { - // int64 shelf = 1; - // } - // - // message Shelf {} - // - // The client could ``post`` a json body ``{"shelf": 1234}`` with the path of - // ``/bookstore.Bookstore/GetShelfRequest`` to call ``GetShelfRequest``. - bool auto_mapping = 7; - - // Whether to ignore query parameters that cannot be mapped to a corresponding - // protobuf field. Use this if you cannot control the query parameters and do - // not know them beforehand. Otherwise use ``ignored_query_parameters``. - // Defaults to false. - bool ignore_unknown_query_parameters = 8; - - // Whether to convert gRPC status headers to JSON. - // When trailer indicates a gRPC error and there was no HTTP body, take ``google.rpc.Status`` - // from the ``grpc-status-details-bin`` header and use it as JSON body. - // If there was no such header, make ``google.rpc.Status`` out of the ``grpc-status`` and - // ``grpc-message`` headers. - // The error details types must be present in the ``proto_descriptor``. - // - // For example, if an upstream server replies with headers: - // - // .. code-block:: none - // - // grpc-status: 5 - // grpc-status-details-bin: - // CAUaMwoqdHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUucnBjLlJlcXVlc3RJbmZvEgUKA3ItMQ - // - // The ``grpc-status-details-bin`` header contains a base64-encoded protobuf message - // ``google.rpc.Status``. It will be transcoded into: - // - // .. code-block:: none - // - // HTTP/1.1 404 Not Found - // content-type: application/json - // - // {"code":5,"details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"r-1"}]} - // - // In order to transcode the message, the ``google.rpc.RequestInfo`` type from - // the ``google/rpc/error_details.proto`` should be included in the configured - // :ref:`proto descriptor set `. - bool convert_grpc_status = 9; - - // URL unescaping policy. - // This spec is only applied when extracting variable with multiple segments in the URL path. - // For example, in case of ``/foo/{x=*}/bar/{y=prefix/*}/{z=**}`` ``x`` variable is single segment and ``y`` and ``z`` are multiple segments. - // For a path with ``/foo/first/bar/prefix/second/third/fourth``, ``x=first``, ``y=prefix/second``, ``z=third/fourth``. - // If this setting is not specified, the value defaults to :ref:`ALL_CHARACTERS_EXCEPT_RESERVED`. - UrlUnescapeSpec url_unescape_spec = 10 [(validate.rules).enum = {defined_only: true}]; - - // If true, unescape '+' to space when extracting variables in query parameters. - // This is to support `HTML 2.0 `_ - bool query_param_unescape_plus = 12; - - // If true, try to match the custom verb even if it is unregistered. By - // default, only match when it is registered. - // - // According to the http template `syntax `_, - // the custom verb is **":" LITERAL** at the end of http template. - // - // For a request with ``/foo/bar:baz`` and ``:baz`` is not registered in any url_template, here is the behavior change - // - if the field is not set, ``:baz`` will not be treated as custom verb, so it will match ``/foo/{x=*}``. - // - if the field is set, ``:baz`` is treated as custom verb, so it will NOT match ``/foo/{x=*}`` since the template doesn't use any custom verb. - bool match_unregistered_custom_verb = 13; - - // Configure the behavior when handling requests that cannot be transcoded. - // - // By default, the transcoder will silently pass through HTTP requests that are malformed. - // This includes requests with unknown query parameters, unregister paths, etc. - // - // Set these options to enable strict HTTP request validation, resulting in the transcoder rejecting - // such requests with a ``HTTP 4xx``. See each individual option for more details on the validation. - // gRPC requests will still silently pass through without transcoding. - // - // The benefit is a proper error message to the downstream. - // If the upstream is a gRPC server, it cannot handle the passed-through HTTP requests and will reset - // the TCP connection. The downstream will then - // receive a ``HTTP 503 Service Unavailable`` due to the upstream connection reset. - // This incorrect error message may conflict with other Envoy components, such as retry policies. - RequestValidationOptions request_validation_options = 11; - - // Proto enum values are supposed to be in upper cases when used in JSON. - // Set this to true if your JSON request uses non uppercase enum values. - bool case_insensitive_enum_parsing = 14; - - // The maximum size of a request body to be transcoded, in bytes. A body exceeding this size will - // provoke a ``HTTP 413 Request Entity Too Large`` response. - // - // Large values may cause envoy to use a lot of memory if there are many concurrent requests. - // - // If unset, the current stream buffer size is used. - google.protobuf.UInt32Value max_request_body_size = 15 [(validate.rules).uint32 = {gt: 0}]; - - // The maximum size of a response body to be transcoded, in bytes. A body exceeding this size will - // provoke a ``HTTP 500 Internal Server Error`` response. - // - // Large values may cause envoy to use a lot of memory if there are many concurrent requests. - // - // If unset, the current stream buffer size is used. - google.protobuf.UInt32Value max_response_body_size = 16 [(validate.rules).uint32 = {gt: 0}]; - - // If true, query parameters that cannot be mapped to a corresponding - // protobuf field are captured in an HttpBody extension of UnknownQueryParams. - bool capture_unknown_query_parameters = 17; -} - -// ``UnknownQueryParams`` is added as an extension field in ``HttpBody`` if -// ``GrpcJsonTranscoder::capture_unknown_query_parameters`` is true and unknown query -// parameters were present in the request. -message UnknownQueryParams { - message Values { - repeated string values = 1; - } - - // A map from unrecognized query parameter keys, to the values associated with those keys. - map key = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_stats/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/grpc_stats/v3/config.proto deleted file mode 100644 index 195b993..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_stats/v3/config.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_stats.v3; - -import "envoy/config/core/v3/grpc_method_list.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_stats.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_stats/v3;grpc_statsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC statistics] gRPC statistics filter -// :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_stats] - -// gRPC statistics filter configuration -// [#next-free-field: 6] -message FilterConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.grpc_stats.v2alpha.FilterConfig"; - - // If true, the filter maintains a filter state object with the request and response message - // counts. - bool emit_filter_state = 1; - - oneof per_method_stat_specifier { - // If set, specifies an allowlist of service/methods that will have individual stats - // emitted for them. Any call that does not match the allowlist will be counted - // in a stat with no method specifier: ``cluster..grpc.*``. - config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2; - - // If set to true, emit stats for all service/method names. - // - // If set to false, emit stats for all service/message types to the same stats without including - // the service/method in the name, with prefix ``cluster..grpc``. This can be useful if - // service/method granularity is not needed, or if each cluster only receives a single method. - // - // .. attention:: - // This option is only safe if all clients are trusted. If this option is enabled - // with untrusted clients, the clients could cause unbounded growth in the number of stats in - // Envoy, using unbounded memory and potentially slowing down stats pipelines. - // - // .. attention:: - // If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the - // behavior will default to ``stats_for_all_methods=false``. - google.protobuf.BoolValue stats_for_all_methods = 3; - } - - // If true, the filter will gather a histogram for the request time of the upstream. - // It works with :ref:`stats_for_all_methods - // ` - // and :ref:`individual_method_stats_allowlist - // ` the same way - // request_message_count and response_message_count works. - bool enable_upstream_stats = 4; - - // If true, the filter will replace dots in the grpc_service_name with underscores before emitting - // the metrics. Only works when :ref:`stats_for_all_methods - // ` - // is set to true. It could cause metrics to be merged if the edited service name conflicts with - // an existing service. For example there are both service "foo.bar" & "foo_bar" running. - // This config can fix incorrect gRPC metrics with dots because the existing stats tag extractor - // assumes no dots in the gRPC service name. By default this is set as false. - bool replace_dots_in_grpc_service_name = 5; -} - -// gRPC statistics filter state object in protobuf form. -message FilterObject { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.grpc_stats.v2alpha.FilterObject"; - - // Count of request messages in the request stream. - uint64 request_message_count = 1; - - // Count of response messages in the response stream. - uint64 response_message_count = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto b/src/main/proto/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto deleted file mode 100644 index 7475c69..0000000 --- a/src/main/proto/envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.grpc_web.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_web.v3"; -option java_outer_classname = "GrpcWebProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_web/v3;grpc_webv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Web] -// gRPC Web :ref:`configuration overview `. -// [#extension: envoy.filters.http.grpc_web] - -// gRPC Web filter config. -message GrpcWeb { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.grpc_web.v2.GrpcWeb"; -} diff --git a/src/main/proto/envoy/extensions/filters/http/gzip/v3/gzip.proto b/src/main/proto/envoy/extensions/filters/http/gzip/v3/gzip.proto deleted file mode 100644 index 777d9dd..0000000 --- a/src/main/proto/envoy/extensions/filters/http/gzip/v3/gzip.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.gzip.v3; - -import "envoy/extensions/filters/http/compressor/v3/compressor.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.gzip.v3"; -option java_outer_classname = "GzipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/gzip/v3;gzipv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Gzip] - -// [#next-free-field: 12] -message Gzip { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.gzip.v2.Gzip"; - - enum CompressionStrategy { - DEFAULT = 0; - FILTERED = 1; - HUFFMAN = 2; - RLE = 3; - } - - message CompressionLevel { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.gzip.v2.Gzip.CompressionLevel"; - - enum Enum { - DEFAULT = 0; - BEST = 1; - SPEED = 2; - } - } - - reserved 2, 6, 7, 8; - - reserved "content_length", "content_type", "disable_on_etag_header", - "remove_accept_encoding_header"; - - // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values - // use more memory, but are faster and produce better compression results. The default value is 5. - google.protobuf.UInt32Value memory_level = 1 [(validate.rules).uint32 = {lte: 9 gte: 1}]; - - // A value used for selecting the zlib compression level. This setting will affect speed and - // amount of compression applied to the content. "BEST" provides higher compression at the cost of - // higher latency, "SPEED" provides lower compression with minimum impact on response time. - // "DEFAULT" provides an optimal result between speed and compression. This field will be set to - // "DEFAULT" if not specified. - CompressionLevel.Enum compression_level = 3 [(validate.rules).enum = {defined_only: true}]; - - // A value used for selecting the zlib compression strategy which is directly related to the - // characteristics of the content. Most of the time "DEFAULT" will be the best choice, though - // there are situations which changing this parameter might produce better results. For example, - // run-length encoding (RLE) is typically used when the content is known for having sequences - // which same data occurs many consecutive times. For more information about each strategy, please - // refer to zlib manual. - CompressionStrategy compression_strategy = 4 [(validate.rules).enum = {defined_only: true}]; - - // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. - // Larger window results in better compression at the expense of memory usage. The default is 12 - // which will produce a 4096 bytes window. For more details about this parameter, please refer to - // zlib manual > deflateInit2. - google.protobuf.UInt32Value window_bits = 9 [(validate.rules).uint32 = {lte: 15 gte: 9}]; - - // Set of configuration parameters common for all compression filters. You can define - // ``content_length``, ``content_type`` and other parameters in this field. - compressor.v3.Compressor compressor = 10; - - // Value for Zlib's next output buffer. If not set, defaults to 4096. - // See https://www.zlib.net/manual.html for more details. Also see - // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. - google.protobuf.UInt32Value chunk_size = 11 [(validate.rules).uint32 = {lte: 65536 gte: 4096}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto b/src/main/proto/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto deleted file mode 100644 index 6215eab..0000000 --- a/src/main/proto/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.header_mutation.v3; - -import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.header_mutation.v3"; -option java_outer_classname = "HeaderMutationProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/header_mutation/v3;header_mutationv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Header mutation filter configuration] -// Mutate HTTP headers and trailers in requests and responses. -// [#extension: envoy.filters.http.header_mutation] - -// [#next-free-field: 6] -message Mutations { - // The request mutations are applied before the request is forwarded to the upstream cluster. - repeated config.common.mutation_rules.v3.HeaderMutation request_mutations = 1; - - // The ``path`` header query parameter mutations are applied after ``request_mutations`` and before the request - // is forwarded to the next filter in the filter chain. - repeated config.core.v3.KeyValueMutation query_parameter_mutations = 3; - - // The response mutations are applied before the response is sent to the downstream client. - repeated config.common.mutation_rules.v3.HeaderMutation response_mutations = 2; - - // The response trailer mutations are applied before the response is sent to the downstream client. - repeated config.common.mutation_rules.v3.HeaderMutation response_trailers_mutations = 4; - - // The request trailer mutations are applied before the request is sent to the upstream cluster. - repeated config.common.mutation_rules.v3.HeaderMutation request_trailers_mutations = 5; -} - -// Per route configuration for the header mutation filter. -message HeaderMutationPerRoute { - Mutations mutations = 1; -} - -// Configuration for the header mutation filter. The mutation rules in the filter configuration will -// always be applied first and then the per-route mutation rules, if both are specified. -message HeaderMutation { - Mutations mutations = 1; - - // If per route HeaderMutationPerRoute config is configured at multiple route levels, header mutations - // at all specified levels are evaluated. By default, the order is from most specific (i.e. route entry level) - // to least specific (i.e. route configuration level). Later header mutations may override earlier mutations. - // - // This order can be reversed by setting this field to true. In other words, most specific level mutation - // is evaluated last. - bool most_specific_header_mutations_wins = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto b/src/main/proto/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto deleted file mode 100644 index 662eefc..0000000 --- a/src/main/proto/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.header_to_metadata.v3; - -import "envoy/type/matcher/v3/regex.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.header_to_metadata.v3"; -option java_outer_classname = "HeaderToMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/header_to_metadata/v3;header_to_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Header-To-Metadata Filter] -// -// The configuration for transforming headers into metadata. This is useful -// for matching load balancer subsets, logging, etc. -// -// Header to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.http.header_to_metadata] - -message Config { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.header_to_metadata.v2.Config"; - - // Specifies the value type to use in metadata. - enum ValueType { - STRING = 0; - - NUMBER = 1; - - // The value is a serialized `protobuf.Value - // `_. - PROTOBUF_VALUE = 2; - } - - // Specifies the encoding scheme for the value. - enum ValueEncode { - // No encoding is applied. - NONE = 0; - - // The value is encoded in `Base64 `_. - // - // .. note:: - // - // This is mostly used for ``STRING`` and ``PROTOBUF_VALUE`` to escape the - // non-ASCII characters in the header. - // - BASE64 = 1; - } - - // [#next-free-field: 7] - message KeyValuePair { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.header_to_metadata.v2.Config.KeyValuePair"; - - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - - // The value to pair with the given key. - // - // When used for a - // :ref:`on_header_present ` - // case, if value is non-empty it'll be used instead of the header value. If both are empty, no metadata is added. - // - // When used for a :ref:`on_header_missing ` - // case, a non-empty value must be provided otherwise no metadata is added. - string value = 3 [(udpa.annotations.field_migrate).oneof_promotion = "value_type"]; - - // If present, the header's value will be matched and substituted with this. If there is no match or substitution, the header value - // is used as-is. - // - // This is only used for :ref:`on_header_present `. - // - // .. note:: - // - // If the ``value`` field is non-empty this field should be empty. - // - type.matcher.v3.RegexMatchAndSubstitute regex_value_rewrite = 6 - [(udpa.annotations.field_migrate).oneof_promotion = "value_type"]; - - // The value's type — defaults to string. - ValueType type = 4 [(validate.rules).enum = {defined_only: true}]; - - // How is the value encoded, default is NONE (not encoded). - // The value will be decoded accordingly before storing to metadata. - ValueEncode encode = 5; - } - - // A Rule defines what metadata to apply when a header is present or missing. - // [#next-free-field: 6] - message Rule { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.header_to_metadata.v2.Config.Rule"; - - // Specifies that a match will be performed on the value of a header or a cookie. - // - // The header to be extracted. - string header = 1 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}, - (udpa.annotations.field_migrate).oneof_promotion = "header_cookie_specifier" - ]; - - // The cookie to be extracted. - string cookie = 5 [ - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}, - (udpa.annotations.field_migrate).oneof_promotion = "header_cookie_specifier" - ]; - - // If the header or cookie is present, apply this metadata ``KeyValuePair``. - // - // If the value in the ``KeyValuePair`` is non-empty, it'll be used instead - // of the header or cookie value. - KeyValuePair on_header_present = 2 [(udpa.annotations.field_migrate).rename = "on_present"]; - - // If the header or cookie is not present, apply this metadata ``KeyValuePair``. - // - // The value in the ``KeyValuePair`` must be set, since it'll be used in lieu - // of the missing header or cookie value. - KeyValuePair on_header_missing = 3 [(udpa.annotations.field_migrate).rename = "on_missing"]; - - // Whether or not to remove the header after a rule is applied. - // - // This prevents headers from leaking. - // This field is not supported in case of a cookie. - bool remove = 4; - } - - // The list of rules to apply to requests. - repeated Rule request_rules = 1; - - // The list of rules to apply to responses. - repeated Rule response_rules = 2; - - // Optional prefix to use when emitting filter statistics. When configured, - // statistics are emitted with the prefix ``http_filter_name.``. - // - // This emits statistics such as: - // - // - ``http_filter_name.my_header_converter.rules_processed`` - // - ``http_filter_name.my_header_converter.metadata_added`` - // - // If not configured, no statistics are emitted. - string stat_prefix = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/health_check/v3/health_check.proto b/src/main/proto/envoy/extensions/filters/http/health_check/v3/health_check.proto deleted file mode 100644 index 49b465c..0000000 --- a/src/main/proto/envoy/extensions/filters/http/health_check/v3/health_check.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.health_check.v3; - -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.health_check.v3"; -option java_outer_classname = "HealthCheckProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/health_check/v3;health_checkv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Health check] -// Health check :ref:`configuration overview `. -// [#extension: envoy.filters.http.health_check] - -// [#next-free-field: 6] -message HealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.health_check.v2.HealthCheck"; - - reserved 2; - - // Specifies whether the filter operates in pass through mode or not. - google.protobuf.BoolValue pass_through_mode = 1 [(validate.rules).message = {required: true}]; - - // If operating in pass through mode, the amount of time in milliseconds - // that the filter should cache the upstream response. - google.protobuf.Duration cache_time = 3; - - // If operating in non-pass-through mode, specifies a set of upstream cluster - // names and the minimum percentage of servers in each of those clusters that - // must be healthy or degraded in order for the filter to return a 200. If any of - // the clusters configured here does not exist, the filter will not return a 200. - // - // .. note:: - // - // This value is interpreted as an integer by truncating, so 12.50% will be calculated - // as if it were 12%. - map cluster_min_healthy_percentages = 4; - - // Specifies a set of health check request headers to match on. The health check filter will - // check a request’s headers against all the specified headers. To specify the health check - // endpoint, set the ``:path`` header to match on. - repeated config.route.v3.HeaderMatcher headers = 5; -} diff --git a/src/main/proto/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto b/src/main/proto/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto deleted file mode 100644 index 87f725e..0000000 --- a/src/main/proto/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ip_tagging.v3; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ip_tagging.v3"; -option java_outer_classname = "IpTaggingProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ip_tagging/v3;ip_taggingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: IP tagging] -// IP tagging :ref:`configuration overview `. -// [#extension: envoy.filters.http.ip_tagging] - -// [#next-free-field: 6] -message IPTagging { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ip_tagging.v2.IPTagging"; - - // The type of requests the filter should apply to. The supported types - // are internal, external or both. The - // :ref:`x-forwarded-for` header is - // used to determine if a request is internal and will result in - // :ref:`x-envoy-internal` - // being set. The filter defaults to both, and it will apply to all request types. - enum RequestType { - // Both external and internal requests will be tagged. This is the default value. - BOTH = 0; - - // Only internal requests will be tagged. - INTERNAL = 1; - - // Only external requests will be tagged. - EXTERNAL = 2; - } - - // Supplies the IP tag name and the IP address subnets. - message IPTag { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.ip_tagging.v2.IPTagging.IPTag"; - - // Specifies the IP tag name to apply. - string ip_tag_name = 1; - - // A list of IP address subnets that will be tagged with - // ip_tag_name. Both IPv4 and IPv6 are supported. - repeated config.core.v3.CidrRange ip_list = 2; - } - - // Specify to which header the tags will be written. - message IpTagHeader { - // Describes how to apply the tags to the headers. - enum HeaderAction { - // (DEFAULT) The header specified in :ref:`ip_tag_header ` - // will be dropped, before the tags are applied. The incoming header will be "sanitized" regardless of whether the request is internal or external. - // - // Note that the header will be visible unsanitized to any filters that are invoked before the ip-tag-header filter, unless it has an *x-envoy* prefix. - SANITIZE = 0; - - // Tags will be appended to the header specified in - // :ref:`ip_tag_header `. - // - // Please note that this could cause the header to retain values set by the http client regardless of whether the request is internal or external. - APPEND_IF_EXISTS_OR_ADD = 1; - } - - // Header to use for ip-tagging. - // - // This header will be sanitized based on the config in - // :ref:`action ` - // rather than the defaults for x-envoy prefixed headers. - string header = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // Control if the :ref:`header ` - // will be sanitized, or be appended to. - // - // Default: *SANITIZE*. - HeaderAction action = 2; - } - - // The type of request the filter should apply to. - RequestType request_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // [#comment:TODO(ccaraman): Extend functionality to load IP tags from file system. - // Tracked by issue https://github.com/envoyproxy/envoy/issues/2695] - // The set of IP tags for the filter. - repeated IPTag ip_tags = 4 [(validate.rules).repeated = {min_items: 1}]; - - // Specify to which header the tags will be written. - // - // If left unspecified, the tags will be appended to the ``x-envoy-ip-tags`` header. - IpTagHeader ip_tag_header = 5; -} diff --git a/src/main/proto/envoy/extensions/filters/http/json_to_metadata/v3/json_to_metadata.proto b/src/main/proto/envoy/extensions/filters/http/json_to_metadata/v3/json_to_metadata.proto deleted file mode 100644 index 82bf67e..0000000 --- a/src/main/proto/envoy/extensions/filters/http/json_to_metadata/v3/json_to_metadata.proto +++ /dev/null @@ -1,125 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.json_to_metadata.v3; - -import "envoy/type/matcher/v3/regex.proto"; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.json_to_metadata.v3"; -option java_outer_classname = "JsonToMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/json_to_metadata/v3;json_to_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Json-To-Metadata Filter] -// -// The configuration for transforming json body into metadata. This is useful -// for matching load balancer subsets, logging, etc. -// -// Json to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.http.json_to_metadata] - -message JsonToMetadata { - enum ValueType { - // The value is a serialized `protobuf.Value - // `_. - PROTOBUF_VALUE = 0; - - STRING = 1; - - NUMBER = 2; - } - - // [#next-free-field: 6] - message KeyValuePair { - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - - oneof value_type { - // The value to pair with the given key. - // - // When used for on_present case, if value is non-empty it'll be used instead - // of the the value of the JSON key. If both are empty, the the value of the - // JSON key is used as-is. - // - // When used for on_missing/on_error case, a non-empty value - // must be provided. - // - // It ignores ValueType, i.e., not type casting. - google.protobuf.Value value = 3; - } - - // The value's type — defaults to protobuf.Value. - ValueType type = 4 [(validate.rules).enum = {defined_only: true}]; - - // False if we want to overwrite the existing metadata value. Default to false. - bool preserve_existing_metadata_value = 5; - } - - message Selector { - oneof selector { - // key to match - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // A Rule defines what metadata to apply when a key-value is present, missing in the json - // or fail to parse the payload. - message Rule { - // Specifies that a match will be performed on the value of a property. - // Here's an example to match on 1 in {"foo": {"bar": 1}, "bar": 2} - // - // selectors: - // - key: foo - // - key: bar - repeated Selector selectors = 1 [(validate.rules).repeated = {min_items: 1}]; - - // If the attribute is present, apply this metadata KeyValuePair. - KeyValuePair on_present = 2; - - // If the attribute is missing, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set. - KeyValuePair on_missing = 3; - - // If the body is too large or fail to parse or content-type is mismatched, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set. - KeyValuePair on_error = 4; - } - - message MatchRules { - // The list of rules to apply. - repeated Rule rules = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Allowed content-type for json to metadata transformation. - // Default to ``{"application/json"}``. - // - // Set ``allow_empty_content_type`` if empty/missing content-type header - // is allowed. - repeated string allow_content_types = 2 - [(validate.rules).repeated = {items {string {min_len: 1}}}]; - - // Allowed empty content-type for json to metadata transformation. - // Default to false. - bool allow_empty_content_type = 3; - - // Allowed content-type by regex match for json to metadata transformation. - // This can be used in parallel with ``allow_content_types``. - type.matcher.v3.RegexMatcher allow_content_types_regex = 4; - } - - // At least one of request_rules and response_rules must be provided. - // Rules to match json body of requests. - MatchRules request_rules = 1; - - // Rules to match json body of responses. - MatchRules response_rules = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/jwt_authn/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/jwt_authn/v3/config.proto deleted file mode 100644 index 9a955bd..0000000 --- a/src/main/proto/envoy/extensions/filters/http/jwt_authn/v3/config.proto +++ /dev/null @@ -1,882 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.jwt_authn.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/http_uri.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/empty.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.jwt_authn.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/jwt_authn/v3;jwt_authnv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: JWT Authentication] -// JWT Authentication :ref:`configuration overview `. -// [#extension: envoy.filters.http.jwt_authn] - -// Please see following for JWT authentication flow: -// -// * `JSON Web Token (JWT) `_ -// * `The OAuth 2.0 Authorization Framework `_ -// * `OpenID Connect `_ -// -// A JwtProvider message specifies how a JSON Web Token (JWT) can be verified. It specifies: -// -// * issuer: the principal that issues the JWT. If specified, it has to match the ``iss`` field in JWT. -// * allowed audiences: the ones in the token have to be listed here. -// * how to fetch public key JWKS to verify the token signature. -// * how to extract the JWT in the request. -// * how to pass successfully verified token payload. -// -// Example: -// -// .. code-block:: yaml -// -// issuer: https://example.com -// audiences: -// - bookstore_android.apps.googleusercontent.com -// - bookstore_web.apps.googleusercontent.com -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// timeout: 1s -// cache_duration: -// seconds: 300 -// -// [#next-free-field: 22] -message JwtProvider { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.JwtProvider"; - - // Alters the payload representation in the request dynamic metadata to facilitate its use in matching. - message NormalizePayload { - // Each claim in this list will be interpreted as a space-delimited string - // and converted to a list of strings based on the delimited values. - // Example: a token with a claim ``scope: "email profile"`` is translated - // to dynamic metadata ``scope: ["email", "profile"]`` if this field is - // set value ``["scope"]``. This special handling of ``scope`` is - // recommended by `RFC8693 - // `_. - repeated string space_delimited_claims = 1; - } - - // Specify the `principal `_ that issued - // the JWT, usually a URL or an email address. - // - // It is optional. If specified, it has to match the ``iss`` field in JWT, - // otherwise the JWT ``iss`` field is not checked. - // - // .. note:: - // ``JwtRequirement`` :ref:`allow_missing ` - // and :ref:`allow_missing_or_failed ` - // are implemented differently than other ``JwtRequirements``. Hence the usage of this field - // is different as follows if ``allow_missing`` or ``allow_missing_or_failed`` is used: - // - // * If a JWT has ``iss`` field, it needs to be specified by this field in one of ``JwtProviders``. - // * If a JWT doesn't have ``iss`` field, one of ``JwtProviders`` should fill this field empty. - // * Multiple ``JwtProviders`` should not have same value in this field. - // - // Examples: - // - // * https://securetoken.google.com - // * Example: 1234567-compute@developer.gserviceaccount.com - // - string issuer = 1; - - // The list of JWT `audiences `_ are - // allowed to access. A JWT containing any of these audiences will be accepted. If not specified, - // will not check audiences in the token. - // - // Example: - // - // .. code-block:: yaml - // - // audiences: - // - bookstore_android.apps.googleusercontent.com - // - bookstore_web.apps.googleusercontent.com - // - repeated string audiences = 2; - - // Restrict the `subjects `_ - // that the JwtProvider can assert. For instance, this could implement JWT-SVID - // `subject restrictions `_. - // If not specified, will not check subjects in the token. - // - // Example: - // - // .. code-block:: yaml - // - // subjects: - // prefix: spiffe://spiffe.example.com/ - // - type.matcher.v3.StringMatcher subjects = 19; - - // Requires that the credential contains an `expiration `_. - // For instance, this could implement JWT-SVID - // `expiration restrictions `_. - // Unlike ``max_lifetime``, this only requires that expiration is present, where ``max_lifetime`` also checks the value. - // - // Example: - // - // .. code-block:: yaml - // - // require_expiration: true - // - bool require_expiration = 20; - - // Restrict the maximum remaining lifetime of a credential from the JwtProvider. Credential lifetime - // is the difference between the current time and the expiration of the credential. For instance, - // the following example will reject credentials that have a lifetime longer than 24 hours. If not set, - // expiration checking still occurs, but there is no limit on credential lifetime. If set, takes precedence - // over ``require_expiration``. - // - // Example: - // - // .. code-block:: yaml - // - // max_lifetime: - // seconds: 86400 - // - google.protobuf.Duration max_lifetime = 21; - - // `JSON Web Key Set (JWKS) `_ is needed to - // validate signature of a JWT. This field specifies where to fetch JWKS. - oneof jwks_source_specifier { - option (validate.required) = true; - - // JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP - // URI and how the fetched JWKS should be cached. - // - // Example: - // - // .. code-block:: yaml - // - // remote_jwks: - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // timeout: 1s - // cache_duration: - // seconds: 300 - // - RemoteJwks remote_jwks = 3; - - // JWKS is in local data source. It could be either in a local file or embedded in the - // inline_string. - // - // Example: local file - // - // .. code-block:: yaml - // - // local_jwks: - // filename: /etc/envoy/jwks/jwks1.txt - // - // Example: inline_string - // - // .. code-block:: yaml - // - // local_jwks: - // inline_string: ACADADADADA - // - config.core.v3.DataSource local_jwks = 4; - } - - // If false, the JWT is removed in the request after a success verification. If true, the JWT is - // not removed in the request. Default value is false. - // caveat: only works for from_header/from_params & has no effect for JWTs extracted through from_cookies. - bool forward = 5; - - // Two fields below define where to extract the JWT from an HTTP request. - // - // If no explicit location is specified, the following default locations are tried in order: - // - // 1. The Authorization header using the `Bearer schema - // `_. Example:: - // - // Authorization: Bearer . - // - // 2. `access_token `_ query parameter. - // - // Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations - // its provider specified or from the default locations. - // - // Specify the HTTP headers to extract the JWT. For examples, following config: - // - // .. code-block:: yaml - // - // from_headers: - // - name: x-goog-iap-jwt-assertion - // - // can be used to extract token from header:: - // - // ``x-goog-iap-jwt-assertion: ``. - // - repeated JwtHeader from_headers = 6; - - // JWT is sent in a query parameter. ``jwt_params`` represents the query parameter names. - // - // For example, if config is: - // - // .. code-block:: yaml - // - // from_params: - // - jwt_token - // - // The JWT format in query parameter is:: - // - // /path?jwt_token= - // - repeated string from_params = 7; - - // JWT is sent in a cookie. ``from_cookies`` represents the cookie names to extract from. - // - // For example, if config is: - // - // .. code-block:: yaml - // - // from_cookies: - // - auth-token - // - // Then JWT will be extracted from ``auth-token`` cookie in the request. - // - repeated string from_cookies = 13; - - // This field specifies the header name to forward a successfully verified JWT payload to the - // backend. The forwarded data is:: - // - // base64url_encoded(jwt_payload_in_JSON) - // - // If it is not specified, the payload will not be forwarded. - string forward_payload_header = 8 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // When :ref:`forward_payload_header ` - // is specified, the base64 encoded payload will be added to the headers. - // Normally JWT based64 encode doesn't add padding. If this field is true, - // the header will be padded. - // - // This field is only relevant if :ref:`forward_payload_header ` - // is specified. - bool pad_forward_payload_header = 11; - - // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata - // in the format as: ``namespace`` is the jwt_authn filter name as ````envoy.filters.http.jwt_authn```` - // The value is the ``protobuf::Struct``. The value of this field will be the key for its ``fields`` - // and the value is the ``protobuf::Struct`` converted from JWT JSON payload. - // - // For example, if payload_in_metadata is ``my_payload``: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_payload: - // iss: https://example.com - // sub: test@example.com - // aud: https://example.com - // exp: 1501281058 - // - string payload_in_metadata = 9; - - // Normalizes the payload representation in the request metadata. - NormalizePayload normalize_payload_in_metadata = 18; - - // If not empty, similar to :ref:`payload_in_metadata `, - // a successfully verified JWT header will be written to :ref:`Dynamic State ` - // as an entry (``protobuf::Struct``) in ``envoy.filters.http.jwt_authn`` ``namespace`` with the - // value of this field as the key. - // - // For example, if ``header_in_metadata`` is ``my_header``: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_header: - // alg: JWT - // kid: EF71iSaosbC5C4tC6Syq1Gm647M - // alg: PS256 - // - // When the metadata has ``envoy.filters.http.jwt_authn`` entry already (for example if - // :ref:`payload_in_metadata ` - // is not empty), it will be inserted as a new entry in the same ``namespace`` as shown below: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_payload: - // iss: https://example.com - // sub: test@example.com - // aud: https://example.com - // exp: 1501281058 - // my_header: - // alg: JWT - // kid: EF71iSaosbC5C4tC6Syq1Gm647M - // alg: PS256 - // - // .. warning:: - // Using the same key name for :ref:`header_in_metadata ` - // and :ref:`payload_in_metadata ` - // is not suggested due to potential override of existing entry, while it is not enforced during - // config validation. - // - string header_in_metadata = 14; - - // If non empty, the failure status ``::google::jwt_verify::Status`` for a non verified JWT will be written to StreamInfo DynamicMetadata - // in the format as: ``namespace`` is the jwt_authn filter name as ``envoy.filters.http.jwt_authn`` - // The value is the ``protobuf::Struct``. The values of this field will be ``code`` and ``message`` - // and they will contain the JWT authentication failure status code and a message describing the failure. - // - // For example, if failed_status_in_metadata is ``my_auth_failure_status``: - // - // .. code-block:: yaml - // - // envoy.filters.http.jwt_authn: - // my_auth_failure_status: - // code: 3 - // message: Jwt expired - string failed_status_in_metadata = 16; - - // Specify the clock skew in seconds when verifying JWT time constraint, - // such as ``exp``, and ``nbf``. If not specified, default is 60 seconds. - uint32 clock_skew_seconds = 10; - - // Enables JWT cache, its size is specified by ``jwt_cache_size``. - // Only valid JWTs are cached. - JwtCacheConfig jwt_cache_config = 12; - - // Add JWT claim to HTTP Header - // Specify the claim name you want to copy in which HTTP header. For examples, following config: - // The claim must be of type; string, int, double, bool. Array type claims are not supported - // - // .. literalinclude:: /_configs/repo/jwt_authn.yaml - // :language: yaml - // :lines: 44-48 - // :linenos: - // :lineno-start: 44 - // :caption: :download:`jwt_authn.yaml ` - // - // This header is only reserved for jwt claim; any other value will be overwritten. - repeated JwtClaimToHeader claim_to_headers = 15; - - // Clears route cache in order to allow the JWT to correctly affect - // routing decisions. Filter clears all cached routes when: - // - // 1. The field is set to ``true``. - // - // 2. At least one ``claim_to_headers`` header is added to the request OR - // if ``payload_in_metadata`` is set. - // - bool clear_route_cache = 17; -} - -// This message specifies JWT Cache configuration. -message JwtCacheConfig { - // The unit is number of JWTs, default to 100. - uint32 jwt_cache_size = 1; - - // The maximum size of a single cached token in bytes. - // If this field is not set or is set to 0, then the default value 4096 bytes is used. - // The maximum value for a token is inclusive. - uint32 jwt_max_token_size = 2; -} - -// This message specifies how to fetch JWKS from remote and how to cache it. -message RemoteJwks { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.RemoteJwks"; - - // The HTTP URI to fetch the JWKS. For example: - // - // .. code-block:: yaml - // - // http_uri: - // uri: https://www.googleapis.com/oauth2/v1/certs - // cluster: jwt.www.googleapis.com|443 - // timeout: 1s - // - config.core.v3.HttpUri http_uri = 1 [(validate.rules).message = {required: true}]; - - // Duration after which the cached JWKS should be expired. If not specified, default cache - // duration is 10 minutes. - google.protobuf.Duration cache_duration = 2 [(validate.rules).duration = { - lt {seconds: 9000000000} - gte {nanos: 1000000} - }]; - - // Fetch Jwks asynchronously in the main thread before the listener is activated. - // Fetched Jwks can be used by all worker threads. - // - // If this feature is not enabled: - // - // * The Jwks is fetched on-demand when the requests come. During the fetching, first - // few requests are paused until the Jwks is fetched. - // * Each worker thread fetches its own Jwks since Jwks cache is per worker thread. - // - // If this feature is enabled: - // - // * Fetched Jwks is done in the main thread before the listener is activated. Its fetched - // Jwks can be used by all worker threads. Each worker thread doesn't need to fetch its own. - // * Jwks is ready when the requests come, not need to wait for the Jwks fetching. - // - JwksAsyncFetch async_fetch = 3; - - // Retry policy for fetching Jwks. optional. turned off by default. - // - // For example: - // - // .. code-block:: yaml - // - // retry_policy: - // retry_back_off: - // base_interval: 0.01s - // max_interval: 20s - // num_retries: 10 - // - // will yield a randomized truncated exponential backoff policy with an initial delay of 10ms - // 10 maximum attempts spaced at most 20s seconds. - // - // .. code-block:: yaml - // - // retry_policy: - // num_retries:1 - // - // uses the default :ref:`retry backoff strategy `. - // with the default base interval is 1000 milliseconds. and the default maximum interval of 10 times the base interval. - // - // if num_retries is omitted, the default is to allow only one retry. - // - // - // If enabled, the retry policy will apply to all Jwks fetching approaches, e.g. on demand or asynchronously in background. - // - // - config.core.v3.RetryPolicy retry_policy = 4; -} - -// Fetch Jwks asynchronously in the main thread when the filter config is parsed. -// The listener is activated only after the Jwks is fetched. -// When the Jwks is expired in the cache, it is fetched again in the main thread. -// The fetched Jwks from the main thread can be used by all worker threads. -message JwksAsyncFetch { - // If false, the listener is activated after the initial fetch is completed. - // The initial fetch result can be either successful or failed. - // If true, it is activated without waiting for the initial fetch to complete. - // Default is false. - bool fast_listener = 1; - - // The duration to refetch after a failed fetch. If not specified, default is 1 second. - google.protobuf.Duration failed_refetch_duration = 2; -} - -// This message specifies a header location to extract the JWT. -message JwtHeader { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.JwtHeader"; - - // The HTTP header name. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The value prefix. The value format is "value_prefix" - // For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the - // end. - string value_prefix = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; -} - -// Specify a required provider with audiences. -message ProviderWithAudiences { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.ProviderWithAudiences"; - - // Specify a required provider name. - string provider_name = 1; - - // This field overrides the one specified in the JwtProvider. - repeated string audiences = 2; -} - -// This message specifies a Jwt requirement. An empty message means JWT verification is not -// required. Here are some config examples: -// -// .. code-block:: yaml -// -// # Example 1: not required with an empty message -// -// # Example 2: require A -// provider_name: provider-A -// -// # Example 3: require A or B -// requires_any: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 4: require A and B -// requires_all: -// requirements: -// - provider_name: provider-A -// - provider_name: provider-B -// -// # Example 5: require A and (B or C) -// requires_all: -// requirements: -// - provider_name: provider-A -// - requires_any: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 6: require A or (B and C) -// requires_any: -// requirements: -// - provider_name: provider-A -// - requires_all: -// requirements: -// - provider_name: provider-B -// - provider_name: provider-C -// -// # Example 7: A is optional (if token from A is provided, it must be valid, but also allows -// missing token.) -// requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// -// # Example 8: A is optional and B is required. -// requires_all: -// requirements: -// - requires_any: -// requirements: -// - provider_name: provider-A -// - allow_missing: {} -// - provider_name: provider-B -// -// [#next-free-field: 8] -message JwtRequirement { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.JwtRequirement"; - - oneof requires_type { - // Specify a required provider name. - string provider_name = 1; - - // Specify a required provider with audiences. - ProviderWithAudiences provider_and_audiences = 2; - - // Specify list of JwtRequirement. Their results are OR-ed. - // If any one of them passes, the result is passed. - JwtRequirementOrList requires_any = 3; - - // Specify list of JwtRequirement. Their results are AND-ed. - // All of them must pass, if one of them fails or missing, it fails. - JwtRequirementAndList requires_all = 4; - - // The requirement is always satisfied even if JWT is missing or the JWT - // verification fails. A typical usage is: this filter is used to only verify - // JWTs and pass the verified JWT payloads to another filter, the other filter - // will make decision. In this mode, all JWTs will be verified. - google.protobuf.Empty allow_missing_or_failed = 5; - - // The requirement is satisfied if JWT is missing, but failed if JWT is - // presented but invalid. Similar to allow_missing_or_failed, this is used - // to only verify JWTs and pass the verified payload to another filter. The - // different is this mode will reject requests with invalid tokens. - google.protobuf.Empty allow_missing = 6; - - // Extract JWT claims without performing signature validation. - // This mode will decode the JWT, extract claims, and forward them as - // configured (via claim_to_headers, forward_payload_header, etc.) but - // will NOT verify the JWT signature against JWKS. - // - // .. warning:: - // - // This mode does not verify JWT authenticity. Use only in scenarios where: - // - // - JWTs come from a trusted source (e.g., internal service mesh) - // - Signature verification is performed elsewhere in the request path - // - You are in a testing period and the token issuer doesn't support JWKS yet - // - // This mode will: - // - // * Decode the JWT header and payload - // * Extract claims and forward them as headers - // * Always return success (Status::Ok) regardless of JWT validity - // * Log when extraction occurs - // - // This mode will NOT: - // - // * Verify the JWT signature - // * Validate the (issuer) claim - // * Validate the (audience) claim - // * Check not-before time (nbf claim) - ExtractOnlyWithoutValidation extract_only_without_validation = 7; - } -} - -message ExtractOnlyWithoutValidation { - // Reserved for future extensions (e.g., claim filtering, logging options) -} - -// This message specifies a list of RequiredProvider. -// Their results are OR-ed; if any one of them passes, the result is passed -message JwtRequirementOrList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.JwtRequirementOrList"; - - // Specify a list of JwtRequirement. - repeated JwtRequirement requirements = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// This message specifies a list of RequiredProvider. -// Their results are AND-ed; all of them must pass, if one of them fails or missing, it fails. -message JwtRequirementAndList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.JwtRequirementAndList"; - - // Specify a list of JwtRequirement. - repeated JwtRequirement requirements = 1 [(validate.rules).repeated = {min_items: 2}]; -} - -// This message specifies a Jwt requirement for a specific Route condition. -// Example 1: -// -// .. code-block:: yaml -// -// - match: -// prefix: /healthz -// -// In above example, "requires" field is empty for /healthz prefix match, -// it means that requests matching the path prefix don't require JWT authentication. -// -// Example 2: -// -// .. code-block:: yaml -// -// - match: -// prefix: / -// requires: { provider_name: provider-A } -// -// In above example, all requests matched the path prefix require jwt authentication -// from "provider-A". -message RequirementRule { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.RequirementRule"; - - // The route matching parameter. Only when the match is satisfied, the "requires" field will - // apply. - // - // For example: following match will match all requests. - // - // .. code-block:: yaml - // - // match: - // prefix: / - // - config.route.v3.RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Specify a Jwt requirement. - // If not specified, Jwt verification is disabled. - oneof requirement_type { - // Specify a Jwt requirement. Please see detail comment in message JwtRequirement. - JwtRequirement requires = 2; - - // Use requirement_name to specify a Jwt requirement. - // This requirement_name MUST be specified at the - // :ref:`requirement_map ` - // in ``JwtAuthentication``. - string requirement_name = 3 [(validate.rules).string = {min_len: 1}]; - } -} - -// This message specifies Jwt requirements based on stream_info.filterState. -// This FilterState should use ``Router::StringAccessor`` object to set a string value. -// Other HTTP filters can use it to specify Jwt requirements dynamically. -// -// Example: -// -// .. code-block:: yaml -// -// name: jwt_selector -// requires: -// issuer_1: -// provider_name: issuer1 -// issuer_2: -// provider_name: issuer2 -// -// If a filter set "jwt_selector" with "issuer_1" to FilterState for a request, -// jwt_authn filter will use JwtRequirement{"provider_name": "issuer1"} to verify. -message FilterStateRule { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.FilterStateRule"; - - // The filter state name to retrieve the ``Router::StringAccessor`` object. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A map of string keys to requirements. The string key is the string value - // in the FilterState with the name specified in the ``name`` field above. - map requires = 3; -} - -// This is the Envoy HTTP filter config for JWT authentication. -// -// For example: -// -// .. code-block:: yaml -// -// providers: -// provider1: -// issuer: issuer1 -// audiences: -// - audience1 -// - audience2 -// remote_jwks: -// http_uri: -// uri: https://example.com/.well-known/jwks.json -// cluster: example_jwks_cluster -// timeout: 1s -// provider2: -// issuer: issuer2 -// local_jwks: -// inline_string: jwks_string -// -// rules: -// # Not jwt verification is required for /health path -// - match: -// prefix: /health -// -// # Jwt verification for provider1 is required for path prefixed with "prefix" -// - match: -// prefix: /prefix -// requires: -// provider_name: provider1 -// -// # Jwt verification for either provider1 or provider2 is required for all other requests. -// - match: -// prefix: / -// requires: -// requires_any: -// requirements: -// - provider_name: provider1 -// - provider_name: provider2 -// -// [#next-free-field: 8] -message JwtAuthentication { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.jwt_authn.v2alpha.JwtAuthentication"; - - // Map of provider names to JwtProviders. - // - // .. code-block:: yaml - // - // providers: - // provider1: - // issuer: issuer1 - // audiences: - // - audience1 - // - audience2 - // remote_jwks: - // http_uri: - // uri: https://example.com/.well-known/jwks.json - // cluster: example_jwks_cluster - // timeout: 1s - // provider2: - // issuer: provider2 - // local_jwks: - // inline_string: jwks_string - // - map providers = 1; - - // Specifies requirements based on the route matches. The first matched requirement will be - // applied. If there are overlapped match conditions, please put the most specific match first. - // - // Examples - // - // .. code-block:: yaml - // - // rules: - // - match: - // prefix: /healthz - // - match: - // prefix: /baz - // requires: - // provider_name: provider1 - // - match: - // prefix: /foo - // requires: - // requires_any: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - match: - // prefix: /bar - // requires: - // requires_all: - // requirements: - // - provider_name: provider1 - // - provider_name: provider2 - // - repeated RequirementRule rules = 2; - - // This message specifies Jwt requirements based on stream_info.filterState. - // Other HTTP filters can use it to specify Jwt requirements dynamically. - // The ``rules`` field above is checked first, if it could not find any matches, - // check this one. - FilterStateRule filter_state_rules = 3; - - // When set to true, bypass the `CORS preflight request - // `_ regardless of JWT - // requirements specified in the rules. - bool bypass_cors_preflight = 4; - - // A map of unique requirement_names to JwtRequirements. - // :ref:`requirement_name ` - // in ``PerRouteConfig`` uses this map to specify a JwtRequirement. - map requirement_map = 5; - - // A request failing the verification process will receive a 401 downstream with the failure response details - // in the body along with WWWAuthenticate header value set with "invalid token". If this value is set to true, - // the response details will be stripped and only a 401 response code will be returned. Default value is false - bool strip_failure_response = 6; - - // Optional additional prefix to use when emitting statistics. - string stat_prefix = 7; -} - -// Specify per-route config. -message PerRouteConfig { - oneof requirement_specifier { - option (validate.required) = true; - - // Disable Jwt Authentication for this route. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Use requirement_name to specify a JwtRequirement. - // This requirement_name MUST be specified at the - // :ref:`requirement_map ` - // in ``JwtAuthentication``. If no, the requests using this route will be rejected with 403. - string requirement_name = 2 [(validate.rules).string = {min_len: 1}]; - } -} - -// This message specifies a combination of header name and claim name. -message JwtClaimToHeader { - // The HTTP header name to copy the claim to. - // The header name will be sanitized and replaced. - string header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The field name for the JWT Claim : it can be a nested claim of type (eg. "claim.nested.key", "sub") - // String separated with "." in case of nested claims. The nested claim name must use dot "." to separate - // the JSON name path. - string claim_name = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/kill_request/v3/kill_request.proto b/src/main/proto/envoy/extensions/filters/http/kill_request/v3/kill_request.proto deleted file mode 100644 index 784aea4..0000000 --- a/src/main/proto/envoy/extensions/filters/http/kill_request/v3/kill_request.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.kill_request.v3; - -import "envoy/type/v3/percent.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.kill_request.v3"; -option java_outer_classname = "KillRequestProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/kill_request/v3;kill_requestv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Kill Request] -// Kill Request :ref:`configuration overview `. -// [#extension: envoy.filters.http.kill_request] - -// Configuration for KillRequest filter. -message KillRequest { - // On which direction should the filter check for the ``kill_request_header``. - // Default to ``REQUEST`` if unspecified. - enum Direction { - REQUEST = 0; - RESPONSE = 1; - } - - // The probability that a Kill request will be triggered. - type.v3.FractionalPercent probability = 1; - - // The name of the kill request header. If this field is not empty, it will override the :ref:`default header ` name. Otherwise the default header name will be used. - string kill_request_header = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - Direction direction = 3 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto b/src/main/proto/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto deleted file mode 100644 index 8306add..0000000 --- a/src/main/proto/envoy/extensions/filters/http/local_ratelimit/v3/local_rate_limit.proto +++ /dev/null @@ -1,193 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.local_ratelimit.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; -import "envoy/type/v3/http_status.proto"; -import "envoy/type/v3/token_bucket.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.local_ratelimit.v3"; -option java_outer_classname = "LocalRateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/local_ratelimit/v3;local_ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Local Rate limit] -// Local Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.http.local_ratelimit] - -// [#next-free-field: 19] -message LocalRateLimit { - // The human readable prefix to use when emitting stats. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // This field allows for a custom HTTP response status code to the downstream client when - // the request has been rate limited. - // Defaults to 429 (TooManyRequests). - // - // .. note:: - // If this is set to < 400, 429 will be used instead. - type.v3.HttpStatus status = 2; - - // The token bucket configuration to use for rate limiting requests that are processed by this - // filter. Each request processed by the filter consumes a single token. If the token is available, - // the request will be allowed. If no tokens are available, the request will receive the configured - // rate limit status. - // - // .. note:: - // It's fine for the token bucket to be unset for the global configuration since the rate limit - // can be applied at a the virtual host or route level. Thus, the token bucket must be set - // for the per route configuration otherwise the config will be rejected. - // - // .. note:: - // When using per route configuration, the bucket becomes unique to that route. - // - // .. note:: - // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive - // refills. - type.v3.TokenBucket token_bucket = 3; - - // If set, this will enable -- but not necessarily enforce -- the rate limit for the given - // fraction of requests. - // Defaults to 0% of requests for safety. - config.core.v3.RuntimeFractionalPercent filter_enabled = 4; - - // If set, this will enforce the rate limit decisions for the given fraction of requests. - // - // Note: this only applies to the fraction of enabled requests. - // - // Defaults to 0% of requests for safety. - config.core.v3.RuntimeFractionalPercent filter_enforced = 5; - - // Specifies a list of HTTP headers that should be added to each request that - // has been rate limited and is also forwarded upstream. This can only occur when the - // filter is enabled but not enforced. - repeated config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 - [(validate.rules).repeated = {max_items: 10}]; - - // Specifies a list of HTTP headers that should be added to each response for requests that - // have been rate limited. This occurs when the filter is enabled and fully enforced. - repeated config.core.v3.HeaderValueOption response_headers_to_add = 6 - [(validate.rules).repeated = {max_items: 10}]; - - // The rate limit descriptor list to use in the local rate limit to override - // on. The rate limit descriptor is selected by the first full match from the - // request descriptors. - // - // Example on how to use :ref:`this `. - // - // .. note:: - // - // In the current implementation the descriptor's token bucket :ref:`fill_interval - // ` must be a multiple - // global :ref:`token bucket's` fill interval. - // - // The descriptors must match verbatim for rate limiting to apply. There is no partial - // match by a subset of descriptor entries in the current implementation. - repeated common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8; - - // Specifies the rate limit configurations to be applied with the same - // stage number. If not set, the default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 9 [(validate.rules).uint32 = {lte: 10}]; - - // Specifies the scope of the rate limiter's token bucket. - // If set to false, the token bucket is shared across all worker threads, - // thus the rate limits are applied per Envoy process. - // If set to true, a token bucket is allocated for each connection. - // Thus the rate limits are applied per connection thereby allowing - // one to rate limit requests on a per connection basis. - // If unspecified, the default value is false. - bool local_rate_limit_per_downstream_connection = 11; - - // Enables the local cluster level rate limiting, iff this is set explicitly. For example, - // given an Envoy gateway that contains N Envoy instances and a rate limit rule X tokens - // per second. If this is set, the total rate limit of whole gateway will always be X tokens - // per second regardless of how N changes. If this is not set, the total rate limit of whole - // gateway will be N * X tokens per second. - // - // .. note:: - // This should never be set if the ``local_rate_limit_per_downstream_connection`` is set to - // true. Because if per connection rate limiting is enabled, we assume that the token buckets - // should never be shared across Envoy instances. - // - // .. note:: - // This only works when the :ref:`local cluster name - // ` is set and - // the related cluster is defined in the bootstrap configuration. - common.ratelimit.v3.LocalClusterRateLimit local_cluster_rate_limit = 16; - - // Defines the standard version to use for X-RateLimit headers emitted by the filter. - // - // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the - // client in the current time-window followed by the description of the - // quota policy. - // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the - // current time-window. - // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of - // the current time-window. - // - // In case rate limiting policy specifies more then one time window, the values - // above represent the window that is closest to reaching its limit. - // - // For more information about the headers specification see selected version of - // the `draft RFC `_. - // - // Disabled by default. - common.ratelimit.v3.XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 12 - [(validate.rules).enum = {defined_only: true}]; - - // Specifies if the local rate limit filter should include the virtual host rate limits. - common.ratelimit.v3.VhRateLimitsOptions vh_rate_limits = 13 - [(validate.rules).enum = {defined_only: true}]; - - // Specifies if default token bucket should be always consumed. - // If set to false, default token bucket will only be consumed when there is - // no matching descriptor. If set to true, default token bucket will always - // be consumed. Default is true. - google.protobuf.BoolValue always_consume_default_token_bucket = 14; - - // Specifies whether a ``RESOURCE_EXHAUSTED`` gRPC code must be returned instead - // of the default ``UNAVAILABLE`` gRPC code for a rate limited gRPC call. The - // HTTP code will be 200 for a gRPC response. - bool rate_limited_as_resource_exhausted = 15; - - // Rate limit configuration that is used to generate a list of descriptor entries based on - // the request context. The generated entries will be used to find one or multiple matched rate - // limit rule from the ``descriptors``. - // If this is set, then - // :ref:`VirtualHost.rate_limits` or - // :ref:`RouteAction.rate_limits` fields - // will be ignored. - // - // .. note:: - // Not all configuration fields of - // :ref:`rate limit config ` is supported at here. - // Following fields are not supported: - // - // 1. :ref:`rate limit stage `. - // 2. :ref:`dynamic metadata `. - // 3. :ref:`disable_key `. - // 4. :ref:`override limit `. - repeated config.route.v3.RateLimit rate_limits = 17; - - // Specifies the max dynamic descriptors kept in the cache for a particular wildcard descriptor - // configured in the global :ref:`descriptors`. - // Wildcard descriptor means descriptor has one or more entries with just key and value omitted. For example if user has configured two descriptors - // with blank value entries, then max dynamic descriptors stored in the LRU cache will be 2 * max_dynamic_descriptors. - // Actual number of dynamic descriptors will depend on the cardinality of unique values received from the http request for the omitted - // values. - // Minimum is 1. Default is 20. - google.protobuf.UInt32Value max_dynamic_descriptors = 18 [(validate.rules).uint32 = {gte: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/lua/v3/lua.proto b/src/main/proto/envoy/extensions/filters/http/lua/v3/lua.proto deleted file mode 100644 index 115749e..0000000 --- a/src/main/proto/envoy/extensions/filters/http/lua/v3/lua.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.lua.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/struct.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.lua.v3"; -option java_outer_classname = "LuaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/lua/v3;luav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Lua] -// Lua :ref:`configuration overview `. -// [#extension: envoy.filters.http.lua] - -// [#next-free-field: 6] -message Lua { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.lua.v2.Lua"; - - // The Lua code that Envoy will execute. This can be a very small script that - // further loads code from disk if desired. Note that if JSON configuration is used, the code must - // be properly escaped. YAML configuration may be easier to read since YAML supports multi-line - // strings so complex scripts can be easily expressed inline in the configuration. - // - // This field is deprecated. Please use - // :ref:`default_source_code `. - // Only one of :ref:`inline_code ` - // or :ref:`default_source_code ` - // can be set for the Lua filter. - string inline_code = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute - // `. The Lua source codes can be - // loaded from inline string or local files. - // - // Example: - // - // .. code-block:: yaml - // - // source_codes: - // hello.lua: - // inline_string: | - // function envoy_on_response(response_handle) - // -- Do something. - // end - // world.lua: - // filename: /etc/lua/world.lua - // - map source_codes = 2; - - // The default Lua code that Envoy will execute. If no per route config is provided - // for the request, this Lua code will be applied. - config.core.v3.DataSource default_source_code = 3; - - // Optional additional prefix to use when emitting statistics. By default - // metrics are emitted in *.lua.* namespace. If multiple lua filters are - // configured in a filter chain, the stats from each filter instance can - // be emitted using custom stat prefix to distinguish emitted - // statistics. For example: - // - // .. code-block:: yaml - // - // http_filters: - // - name: envoy.filters.http.lua - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua - // stat_prefix: foo_script # This emits lua.foo_script.errors etc. - // - name: envoy.filters.http.lua - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua - // stat_prefix: bar_script # This emits lua.bar_script.errors etc. - // - string stat_prefix = 4; - - // If set to true, the Lua filter will clear the route cache automatically if the request - // headers are modified by the Lua script. If set to false, the Lua filter will not clear the - // route cache automatically. - // Default is true for backward compatibility. - google.protobuf.BoolValue clear_route_cache = 5; -} - -message LuaPerRoute { - oneof override { - // Disable the Lua filter for this particular vhost or route. If disabled is specified in - // multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // A name of a Lua source code stored in - // :ref:`Lua.source_codes `. - string name = 2 [(validate.rules).string = {min_len: 1}]; - - // A configured per-route Lua source code that can be served by RDS or provided inline. - config.core.v3.DataSource source_code = 3; - } - - // Optional filter context for Lua script. This could be used to pass configuration - // to Lua script. The Lua script can access the filter context using ``handle:filterContext()``. - // For example: - // - // .. code-block:: lua - // - // function envoy_on_request(request_handle) - // local filter_context = request_handle:filterContext() - // local filter_context_value = filter_context["key"] - // -- Do something with filter_context_value. - // end - // - google.protobuf.Struct filter_context = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/http/mcp/v3/mcp.proto b/src/main/proto/envoy/extensions/filters/http/mcp/v3/mcp.proto deleted file mode 100644 index 5d2825e..0000000 --- a/src/main/proto/envoy/extensions/filters/http/mcp/v3/mcp.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.mcp.v3; - -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.mcp.v3"; -option java_outer_classname = "McpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/mcp/v3;mcpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: MCP] -// MCP filter :ref:`configuration overview `. -// [#extension: envoy.filters.http.mcp] - -// This filter will inspect and get attributes from MCP traffic. -message Mcp { - // Traffic handling mode for non-MCP traffic. - enum TrafficMode { - // Proxies the HTTP request and response without MCP spec check. - // This is the default mode. - PASS_THROUGH = 0; - - // Reject requests that are not following MCP spec. - // Valid MCP requests are: - // - POST requests with JSON-RPC 2.0 messages - // - GET requests for SSE streams (with Accept: text/event-stream) - REJECT_NO_MCP = 1; - } - - // Configures how the filter handles non-MCP traffic. - TrafficMode traffic_mode = 1 [(validate.rules).enum = {defined_only: true}]; - - // When set to true, the filter will clear the route cache after setting dynamic metadata. - // This allows the route to be re-selected based on the MCP metadata (e.g., method, params). - // Defaults to false. - bool clear_route_cache = 2; - - // Maximum size of the request body to buffer for JSON-RPC validation. - // If the request body exceeds this size, the request is rejected with ``413 Payload Too Large``. - // This limit applies to both ``REJECT_NO_MCP`` and ``PASS_THROUGH`` modes to prevent unbounded buffering. - // - // It defaults to 8KB (8192 bytes) and the maximum allowed value is 10MB (10485760 bytes). - // - // Setting it to 0 would disable the limit. It is not recommended to do so in production. - google.protobuf.UInt32Value max_request_body_size = 3 [(validate.rules).uint32 = {lte: 10485760}]; - - // Parser configuration, this provide the attribute extraction override. - ParserConfig parser_config = 4; -} - -// Parser configuration with method-specific rules. -// This configuration allows overriding the default attribute extraction behavior for specific MCP methods. -message ParserConfig { - // A single attribute extraction rule. - message AttributeExtractionRule { - // JSON path to extract (e.g., "params.name", "params.uri"). - // The path is a dot-separated string representing the location of the field in the JSON payload. - // For example, "params.name" extracts the "name" field from the "params" object. - string path = 1 [(validate.rules).string = {min_len: 1}]; - } - - // Configuration for a specific MCP method. - message MethodConfig { - // Method name (e.g., "tools/call", "resources/read", "initialize"). - // This matches the "method" field in the JSON-RPC request. - string method = 1 [(validate.rules).string = {min_len: 1}]; - - // The group/category name to assign to this method (e.g., "tool", "lifecycle"). - // This will be emitted to dynamic metadata under the key specified by group_metadata_key. - // If empty, the built-in group classification is used. - string group = 2; - - // Attributes to extract for this method. - // If empty, only default attributes (jsonrpc, method) are extracted. - repeated AttributeExtractionRule extraction_rules = 3; - } - - // List of rules for classification and extraction. - // Rules are evaluated in order; the first match wins. - // If no rule matches, extraction defaults are used and group falls back to built-in classification. - // Built-in groups: lifecycle, tool, resource, prompt, notification, logging, sampling, completion, unknown. - repeated MethodConfig methods = 1; - - // The dynamic metadata key where the group name will be stored. - // If empty, group classification is disabled. - string group_metadata_key = 2; -} - -// Per-route override configuration for MCP filter -message McpOverride { - // Optional per-route traffic mode override - Mcp.TrafficMode traffic_mode = 1 [(validate.rules).enum = {defined_only: true}]; - - // Optional per-route max request body size override. - // When set, this overrides the global max_request_body_size for this route. - // It defaults to 8KB (8192 bytes) and the maximum allowed value is 10MB (10485760 bytes). - google.protobuf.UInt32Value max_request_body_size = 2 [(validate.rules).uint32 = {lte: 10485760}]; -} diff --git a/src/main/proto/envoy/extensions/filters/http/mcp_router/v3/mcp_router.proto b/src/main/proto/envoy/extensions/filters/http/mcp_router/v3/mcp_router.proto deleted file mode 100644 index 1d32449..0000000 --- a/src/main/proto/envoy/extensions/filters/http/mcp_router/v3/mcp_router.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.mcp_router.v3; - -import "envoy/type/metadata/v3/metadata.proto"; - -import "google/protobuf/duration.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.mcp_router.v3"; -option java_outer_classname = "McpRouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/mcp_router/v3;mcp_routerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: MCP Multiplexer/Demultiplexer] -// [#extension: envoy.filters.http.mcp_router] - -// Configuration for the MCP Multiplexer/Demultiplexer. -// -// This extension aggregates capabilities, tools and resources of remote MCP servers and presents Envoy -// as a singe MCP server to the client. This allows a unified policy to be applied to multiple remote -// servers and abstracts multiple MCP servers as a single one. -// -// This filter must be a terminal filter in the filter chain and replaces the HTTP router filter. -// -// Not all route level policies are applicable to this filter. -// Specifically the following policies are ignored: -// * :ref:`route ` -// * :ref:`redirect ` -// * :ref:`direct_response ` -// - -// Extract identity from a request header. -message HeaderSource { - // Header name to extract (e.g., "x-user-identity"). - string name = 1 [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME}]; -} - -// Extract identity from dynamic metadata (e.g., populated by JWT or ext_authz filter). -message DynamicMetadataSource { - // The metadata key to retrieve the value from. - type.metadata.v3.MetadataKey key = 1 [(validate.rules).message = {required: true}]; -} - -// Defines how the identity (user/principal) is extracted from the request. -// Exactly one of ``header`` or ``dynamic_metadata`` must be set. -message IdentityExtractor { - // Extract identity from a request header. - HeaderSource header = 1; - - // Extract identity from dynamic metadata. - DynamicMetadataSource dynamic_metadata = 2; -} - -// Specifies how to handle requests where the identity is missing or mismatched. -message ValidationPolicy { - enum Mode { - // Not specified. Defaults to DISABLED behavior. - MODE_UNSPECIFIED = 0; - - // Bind identity on Initialize if present, but do not validate subsequent requests. - // If extraction fails, the session proceeds anonymously. - DISABLED = 1; - - // Reject the request (403) if the identity cannot be extracted - // or if the session identity does not match the request identity. - ENFORCE = 2; - } - - Mode mode = 1 [(validate.rules).enum = {defined_only: true}]; -} - -// Session identity configuration. -message SessionIdentity { - // Defines how the identity (user/principal) is extracted from the request. - IdentityExtractor identity = 1 [(validate.rules).message = {required: true}]; - - // Specifies how to handle requests where the subject is missing or invalid. - // Defaults to DISABLED. - ValidationPolicy validation = 2; -} - -message McpRouter { - // Specification of the MCP server. - message McpBackend { - // Unique name for this backend. Used for: - // - Tool name prefixing (e.g., "time__get_current_time") - // - Session ID composition - // - Logging and error messages. - // Default will be the cluster name if not specified. - string name = 1; - - // Backend target specification. - McpCluster mcp_cluster = 2; - } - - // Cluster-based backend configuration. - message McpCluster { - // Cluster name to route requests to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Path to use for MCP requests. Defaults to "/mcp". - string path = 2; - - // Request timeout. - // If not set, uses cluster's timeout configuration. - google.protobuf.Duration timeout = 3; - - // Indicates that during forwarding, the host header will be swapped with - // this value. - string host_rewrite_literal = 4; - } - - // A list of remote MCP servers. MCP router aggregates capabilities, tools and resources from remote MCP servers - // and presents itself as single MCP server to the client. All remote MCP servers are sent the same capabilities - // that the client presented to Envoy. - repeated McpBackend servers = 1; - - // If set, extracts a request "subject" and binds it into the MCP session. - // If not set, sessions are created without identity binding. - SessionIdentity session_identity = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/oauth2/v3/oauth.proto b/src/main/proto/envoy/extensions/filters/http/oauth2/v3/oauth.proto deleted file mode 100644 index 285578f..0000000 --- a/src/main/proto/envoy/extensions/filters/http/oauth2/v3/oauth.proto +++ /dev/null @@ -1,292 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.oauth2.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/http_uri.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; -import "envoy/type/matcher/v3/path.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.oauth2.v3"; -option java_outer_classname = "OauthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/oauth2/v3;oauth2v3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: OAuth] -// OAuth :ref:`configuration overview `. -// [#extension: envoy.filters.http.oauth2] -// - -// OAuth cookie configuration attributes. -// -message CookieConfig { - enum SameSite { - DISABLED = 0; - STRICT = 1; - LAX = 2; - NONE = 3; - } - - // The value used for the SameSite cookie attribute. - SameSite same_site = 1 [(validate.rules).enum = {defined_only: true}]; - - // The path attribute for the cookie. - // - // This controls the scope of the cookie and is useful for path-based routing scenarios - // where different logical boundaries or applications may operate with different OAuth2 clients. - // The CSRF cookie (nonce cookie) can be configured with a different path than session cookies - // to support flows where the callback URL is on a different path. - // - // If not specified, defaults to ``/``. - string path = 2 [(validate.rules).string = {pattern: "^$|^/[^\\x00-\\x1f\\x7f \",;<>\\\\]*$"}]; - - // If true, the ``Partitioned`` attribute will be set on the cookie. - // - // Modern browsers (Firefox, Chrome with third-party cookie deprecation) warn or block - // "foreign" cookies unless they carry the ``Partitioned`` attribute alongside ``SameSite=None; Secure``. - // When Envoy is used in a gateway/IdP flow that sets OAuth/OIDC cookies for a parent domain - // (e.g., ``Domain=.example.com``) while running on a different host, those cookies are - // considered third-party and will be rejected without ``Partitioned``. - // - // See `CHIPS `_ for more information. - // - // Default is false. - bool partitioned = 3; -} - -// [#next-free-field: 8] -message CookieConfigs { - // Configuration for the bearer token cookie. - CookieConfig bearer_token_cookie_config = 1; - - // Configuration for the OAuth HMAC cookie. - CookieConfig oauth_hmac_cookie_config = 2; - - // Configuration for the OAuth expires cookie. - CookieConfig oauth_expires_cookie_config = 3; - - // Configuration for the ID token cookie. - CookieConfig id_token_cookie_config = 4; - - // Configuration for the refresh token cookie. - CookieConfig refresh_token_cookie_config = 5; - - // Configuration for the OAuth nonce cookie. - CookieConfig oauth_nonce_cookie_config = 6; - - // Configuration for the code verifier cookie. - CookieConfig code_verifier_cookie_config = 7; -} - -// [#next-free-field: 6] -message OAuth2Credentials { - // [#next-free-field: 8] - message CookieNames { - // Cookie name to hold OAuth bearer token value. When the authentication server validates the - // client and returns an authorization token back to the OAuth filter, no matter what format - // that token is, if :ref:`forward_bearer_token ` - // is set to true the filter will send over the bearer token as a cookie with this name to the - // upstream. Defaults to ``BearerToken``. - string bearer_token = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // Cookie name to hold OAuth HMAC value. Defaults to ``OauthHMAC``. - string oauth_hmac = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // Cookie name to hold OAuth expiry value. Defaults to ``OauthExpires``. - string oauth_expires = 3 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // Cookie name to hold the id token. Defaults to ``IdToken``. - string id_token = 4 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // Cookie name to hold the refresh token. Defaults to ``RefreshToken``. - string refresh_token = 5 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // Cookie name to hold the nonce value. Defaults to ``OauthNonce``. - string oauth_nonce = 6 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // Cookie name to hold the PKCE code verifier. Defaults to ``OauthCodeVerifier``. - string code_verifier = 7 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - } - - // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. - string client_id = 1 [(validate.rules).string = {min_len: 1}]; - - // The secret used to retrieve the access token. This value will be URL encoded when sent to the OAuth server. - transport_sockets.tls.v3.SdsSecretConfig token_secret = 2 - [(validate.rules).message = {required: true}]; - - // Configures how the secret token should be created. - oneof token_formation { - option (validate.required) = true; - - // If present, the secret token will be a HMAC using the provided secret. - transport_sockets.tls.v3.SdsSecretConfig hmac_secret = 3 - [(validate.rules).message = {required: true}]; - } - - // The cookie names used in OAuth filters flow. - CookieNames cookie_names = 4; - - // The domain to set the cookie on. If not set, the cookie will default to the host of the request, not including the subdomains. - // This is useful when token cookies need to be shared across multiple subdomains. - string cookie_domain = 5 - [(validate.rules).string = {pattern: "^$|^[^\\x00-\\x1f\\x7f \",;<>\\\\]+$"}]; -} - -// OAuth config -// -// [#next-free-field: 27] -message OAuth2Config { - enum AuthType { - // The ``client_id`` and ``client_secret`` will be sent in the URL encoded request body. - // This type should only be used when Auth server does not support Basic authentication. - URL_ENCODED_BODY = 0; - - // The ``client_id`` and ``client_secret`` will be sent using HTTP Basic authentication scheme. - BASIC_AUTH = 1; - } - - // Endpoint on the authorization server to retrieve the access token from. - config.core.v3.HttpUri token_endpoint = 1; - - // Specifies the retry policy for requests to the OAuth server. If not specified, then no retries will be performed. - config.core.v3.RetryPolicy retry_policy = 18; - - // The endpoint redirect to for authorization in response to unauthorized requests. - string authorization_endpoint = 2 [(validate.rules).string = {min_len: 1}]; - - // The endpoint at the authorization server to request the user be logged out of the Authorization server. - // This field is optional and should be set only if openid is in the auth_scopes and the authorization server - // supports the OpenID Connect RP-Initiated Logout specification. - // For more information, see https://openid.net/specs/openid-connect-rpinitiated-1_0.html - // - // If configured, the OAuth2 filter will redirect users to this endpoint when they access the signout_path. - string end_session_endpoint = 23; - - // Credentials used for OAuth. - OAuth2Credentials credentials = 3 [(validate.rules).message = {required: true}]; - - // The redirect URI passed to the authorization endpoint. Supports header formatting - // tokens. For more information, including details on header value syntax, see the - // documentation on :ref:`custom request headers `. - // - // This URI should not contain any query parameters. - string redirect_uri = 4 [(validate.rules).string = {min_len: 1}]; - - // Matching criteria used to determine whether a path appears to be the result of a redirect from the authorization server. - type.matcher.v3.PathMatcher redirect_path_matcher = 5 - [(validate.rules).message = {required: true}]; - - // The path to sign a user out, clearing their credential cookies. - type.matcher.v3.PathMatcher signout_path = 6 [(validate.rules).message = {required: true}]; - - // Forward the OAuth token as a Bearer to upstream web service. - bool forward_bearer_token = 7; - - // If set to true, preserve the existing authorization header. - // By default the client strips the existing authorization header before forwarding upstream. - // Can not be set to true if forward_bearer_token is already set to true. - // Default value is false. - bool preserve_authorization_header = 16; - - // Any request that matches any of the provided matchers will be passed through without OAuth validation. - repeated config.route.v3.HeaderMatcher pass_through_matcher = 8; - - // Optional list of OAuth scopes to be claimed in the authorization request. If not specified, - // defaults to "user" scope. - // OAuth RFC https://tools.ietf.org/html/rfc6749#section-3.3 - repeated string auth_scopes = 9; - - // Optional resource parameter for authorization request - // RFC: https://tools.ietf.org/html/rfc8707 - repeated string resources = 10; - - // Defines how ``client_id`` and ``client_secret`` are sent in OAuth client to OAuth server requests. - // RFC https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1 - AuthType auth_type = 11 [(validate.rules).enum = {defined_only: true}]; - - // If set to true, allows automatic access token refresh using the associated refresh token (see - // `RFC 6749 section 6 `_), provided that the OAuth server supports that. - // Default value is true. - google.protobuf.BoolValue use_refresh_token = 12; - - // The default lifetime in seconds of the access token, if omitted by the authorization server. - // - // If this value is not set, it will default to ``0s``. In this case, the expiry must be set by - // the authorization server or the OAuth flow will fail. - google.protobuf.Duration default_expires_in = 13; - - // Any request that matches any of the provided matchers won't be redirected to OAuth server when tokens are not valid. - // Automatic access token refresh will be performed for these requests, if enabled. - // This behavior can be useful for AJAX requests. - repeated config.route.v3.HeaderMatcher deny_redirect_matcher = 14; - - // The default lifetime in seconds of the refresh token, if the exp (expiration time) claim is omitted in the refresh token or the refresh token is not JWT. - // - // If this value is not set, it will default to ``604800s``. In this case, the cookie with the refresh token will be expired - // in a week. - // This setting is only considered if ``use_refresh_token`` is set to true, otherwise the authorization server expiration or ``default_expires_in`` is used. - google.protobuf.Duration default_refresh_token_expires_in = 15; - - // If set to true, the client will not set a cookie for ID Token even if one is received from the Identity Provider. This may be useful in cases where the ID - // Token is too large for HTTP cookies (longer than 4096 characters). Enabling this option will only disable setting the cookie response header, the filter - // will still process incoming ID Tokens as part of the HMAC if they are there. This is to ensure compatibility while switching this setting on. Future - // sessions would not set the IdToken cookie header. - bool disable_id_token_set_cookie = 17; - - // If set to true, the client will not set a cookie for Access Token even if one is received from the Identity Provider. - // Enabling this option will only disable setting the cookie response header, the filter - // will still process incoming Access Tokens as part of the HMAC if they are there. This is to ensure compatibility while switching this setting on. Future - // sessions would not set the Access Token cookie header. - bool disable_access_token_set_cookie = 19; - - // If set to true, the client will not set a cookie for Refresh Token even if one is received from the Identity Provider. - // Enabling this option will only disable setting the cookie response header, the filter - // will still process incoming Refresh Tokens as part of the HMAC if they are there. This is to ensure compatibility while switching this setting on. Future - // sessions would not set the Refresh Token cookie header. - bool disable_refresh_token_set_cookie = 20; - - // Controls for attributes that can be set on the cookies. - CookieConfigs cookie_configs = 21; - - // Optional additional prefix to use when emitting statistics. - string stat_prefix = 22; - - // Optional expiration time for the CSRF protection token cookie. - // The CSRF token prevents cross-site request forgery attacks during the OAuth2 flow. - // If not specified, defaults to ``600s`` (10 minutes), which should provide sufficient time - // for users to complete the OAuth2 authorization flow. - google.protobuf.Duration csrf_token_expires_in = 24; - - // Optional expiration time for the code verifier cookie. - // The code verifier is stored in a secure, HTTP-only cookie during the OAuth2 authorization process. - // If not specified, defaults to ``600s`` (10 minutes), which should provide sufficient time - // for users to complete the OAuth2 authorization flow. - google.protobuf.Duration code_verifier_token_expires_in = 25; - - // Disable token encryption. When set to true, both the access token and the ID token will be stored in plain text. - // This option should only be used in secure environments where token encryption is not required. - // Default is false (tokens are encrypted). - bool disable_token_encryption = 26; -} - -// Filter config. -message OAuth2 { - // Leave this empty to disable OAuth2 for a specific route, using per filter config. - OAuth2Config config = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/on_demand/v3/on_demand.proto b/src/main/proto/envoy/extensions/filters/http/on_demand/v3/on_demand.proto deleted file mode 100644 index 3e23afe..0000000 --- a/src/main/proto/envoy/extensions/filters/http/on_demand/v3/on_demand.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.on_demand.v3; - -import "envoy/config/core/v3/config_source.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.on_demand.v3"; -option java_outer_classname = "OnDemandProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/on_demand/v3;on_demandv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: On Demand Discovery] -// On Demand Discovery :ref:`configuration overview `. -// [#extension: envoy.filters.http.on_demand] -// -// .. warning:: -// -// Envoy currently only supports On-demand CDS when using Incremental-xDS and not State-of-the-World. -// - -// Configuration of on-demand CDS. -message OnDemandCds { - // A configuration source for the service that will be used for - // on-demand cluster discovery. - config.core.v3.ConfigSource source = 1; - - // xdstp:// resource locator for on-demand cluster collection. - string resources_locator = 2; - - // The timeout for on demand cluster lookup. If not set, defaults to 5 seconds. - google.protobuf.Duration timeout = 3; -} - -// On Demand Discovery filter config. -message OnDemand { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.on_demand.v2.OnDemand"; - - // An optional configuration for on-demand cluster discovery - // service. If not specified, the on-demand cluster discovery will - // be disabled. When it's specified, the filter will pause the - // request to an unknown cluster and will begin a cluster discovery - // process. When the discovery is finished (successfully or not), the - // request will be resumed for further processing. - OnDemandCds odcds = 1; -} - -// Per-route configuration for On Demand Discovery. -message PerRouteConfig { - // An optional configuration for on-demand cluster discovery - // service. If not specified, the on-demand cluster discovery will - // be disabled. When it's specified, the filter will pause the - // request to an unknown cluster and will begin a cluster discovery - // process. When the discovery is finished (successfully or not), the - // request will be resumed for further processing. - OnDemandCds odcds = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/original_src/v3/original_src.proto b/src/main/proto/envoy/extensions/filters/http/original_src/v3/original_src.proto deleted file mode 100644 index 3f67a2f..0000000 --- a/src/main/proto/envoy/extensions/filters/http/original_src/v3/original_src.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.original_src.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.original_src.v3"; -option java_outer_classname = "OriginalSrcProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/original_src/v3;original_srcv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Original Src Filter] -// Use the Original source address on upstream connections. - -// The Original Src filter binds upstream connections to the original source address determined -// for the request. This address could come from something like the Proxy Protocol filter, or it -// could come from trusted http headers. -// [#extension: envoy.filters.http.original_src] -message OriginalSrc { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.original_src.v2alpha1.OriginalSrc"; - - // Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to - // ensure that non-local addresses may be routed back through envoy when binding to the original - // source address. The option will not be applied if the mark is 0. - uint32 mark = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/proto_api_scrubber/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/proto_api_scrubber/v3/config.proto deleted file mode 100644 index 8143a04..0000000 --- a/src/main/proto/envoy/extensions/filters/http/proto_api_scrubber/v3/config.proto +++ /dev/null @@ -1,109 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.proto_api_scrubber.v3; - -import "envoy/config/core/v3/base.proto"; - -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.proto_api_scrubber.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/proto_api_scrubber/v3;proto_api_scrubberv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Proto API Scrubber] -// [#extension: envoy.filters.http.proto_api_scrubber] - -// ProtoApiScrubber filter supports filtering of the request and -// response payloads based on the configured field restrictions and actions. -// The field restrictions and actions can be defined using unified matcher API. -// The filter evaluates the configured restriction for each field -// to produce the filtered output using the configured actions. -// The design doc for this filter is available -// `here `_ - -message ProtoApiScrubberConfig { - // An enum enlisting all the filtering modes supported by this filter. - enum FilteringMode { - // Override the original request/response body with the filtered - // request/response body. - OVERRIDE = 0; - } - - // The proto descriptor set for the proto services. - DescriptorSet descriptor_set = 1; - - // Contains the restrictions for the supported proto elements. - Restrictions restrictions = 2; - - // Specifies the filtering mode of this filter. - FilteringMode filtering_mode = 3; -} - -// Specifies the descriptor set for proto services. -message DescriptorSet { - // It could be passed by a local file through ``Datasource.filename`` or - // embedded in the ``Datasource.inline_bytes``. - config.core.v3.DataSource data_source = 1; -} - -// Contains the restrictions for the methods. -message Restrictions { - // Specifies the method restrictions. - // Key - Fully qualified method name e.g., ``endpoints.examples.bookstore.BookStore/GetShelf``. - // Value - Method restrictions. - map method_restrictions = 1; - - // Specifies the message restrictions. - // Key - Fully qualified message name e.g., ``endpoints.examples.bookstore.Book``. - // Value - Message restrictions. - map message_restrictions = 2; -} - -// Contains the method restrictions which include the field level restrictions -// for the request and response fields. -message MethodRestrictions { - // Restrictions that apply to request fields of the method. - // Key - field mask like path of the field e.g., foo.bar.baz - // Value - Restrictions map containing the mapping from restriction name to - // the restriction values. - map request_field_restrictions = 1; - - // Restrictions that apply to response fields of the method. - // Key - field mask like path of the field e.g., foo.bar.baz - // Value - Restrictions map containing the mapping from restriction name to - // the restriction values. - map response_field_restrictions = 2; - - // Optional restriction that applies to the entire method. If present, this - // rule takes precedence for the method itself over field-level or - // message-level rules. The 'matcher' within RestrictionConfig will determine - // if the method is denied/scrubbed. If the matcher evaluates to true: - // - // - The request is **denied**, and further processing is stopped. - // - The implementation should generate an immediate error response - // (e.g., an HTTP 403 Forbidden status) and send it to the client. - RestrictionConfig method_restriction = 3; -} - -// Contains message-level restrictions. -message MessageRestrictions { - // The core restriction to apply to this message type. - // The 'matcher' within RestrictionConfig will determine if the message is - // scrubbed/denied/allowed. - RestrictionConfig config = 1; - - // Restrictions that apply to specific fields within this message type. - // Key - field mask (e.g. "social_security_number"). - // Value - The restriction configuration for that field. - map field_restrictions = 2; -} - -// The restriction configuration. -message RestrictionConfig { - // Matcher tree for matching requests and responses with the configured restrictions. - xds.type.matcher.v3.Matcher matcher = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/proto_api_scrubber/v3/matcher_actions.proto b/src/main/proto/envoy/extensions/filters/http/proto_api_scrubber/v3/matcher_actions.proto deleted file mode 100644 index 1beb39c..0000000 --- a/src/main/proto/envoy/extensions/filters/http/proto_api_scrubber/v3/matcher_actions.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.proto_api_scrubber.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.proto_api_scrubber.v3"; -option java_outer_classname = "MatcherActionsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/proto_api_scrubber/v3;proto_api_scrubberv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Proto API Scrubber Matcher Actions] - -// Specifies an :ref:`Unified Matcher API ` action to remove a field. -// This actual action needs to be implemented by the filter using it. -message RemoveFieldAction { -} diff --git a/src/main/proto/envoy/extensions/filters/http/proto_message_extraction/v3/config.proto b/src/main/proto/envoy/extensions/filters/http/proto_message_extraction/v3/config.proto deleted file mode 100644 index 0706771..0000000 --- a/src/main/proto/envoy/extensions/filters/http/proto_message_extraction/v3/config.proto +++ /dev/null @@ -1,274 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.proto_message_extraction.v3; - -import "envoy/config/core/v3/base.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.proto_message_extraction.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/proto_message_extraction/v3;proto_message_extractionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Proto Message Extraction] -// -// [#extension: envoy.filters.http.proto_message_extraction] -// -// Overview -// -------- -// -// ProtoMessageExtraction filter supports extracting gRPC -// requests/responses(proto messages) into google.protobuf.Struct and storing -// results in the dynamic metadata `envoy.filters.http.proto_message_extraction` -// for later access. -// -// Assumptions -// ----------- -// -// This filter assumes it is only applicable for gRPC with Protobuf as payload. -// -// Process Flow -// ------------ -// -// On the request path, it will check -// -// 1. if the incoming gRPC request is configured, the filter tries to: -// -// a. buffer the incoming data to complete protobuf messages -// b. extract individual protobuf messages according to directives -// c. write the result into the dynamic metadata. -// d. pass through the request data -// -// 2. otherwise, pass through the request. -// -// On the response path, it will check -// -// 1. if the incoming gRPC request is configured, the filter tries to: -// -// a. buffer the incoming data to complete protobuf messages -// b. extract individual protobuf messages according to directives -// c. write the result into the dynamic metadata. -// d. pass through the response data -// -// 2. otherwise, pass through the response. -// -// Config Requirements -// ------------------- - -// Here are config requirements - -// 1. the extracted target field should be among the following primitive types: -// `string`, `uint32`, `uint64`, `int32`, `int64`, `sint32`, `sint64`, -// `fixed32`, `fixed64`, `sfixed32`, `sfixed64`, `float`, `double`. - -// 2. the target field could be repeated. - -// 3. the intermediate type could also be repeated. - -// Output Format -// ------------- - -// The extracted requests and responses will be will be added in the dynamic -// ``metadata`` with the same layout of the message. - -// For the default `FIRST_AND_LAST` mode, it will be like: - -// .. code-block:: json - -// { -// "requests":{ -// "first":{ -// "foo": "val_foo1", -// } -// "last":{ -// "foo": "val_foo3", -// } -// }, -// "responses":{ -// "first":{ -// "baz": "val_baz1", -// } -// "last":{ -// "baz": "val_foo3", -// } -// } -// } - -// Example for `FIRST_AND_LAST` mode -// --------------------------------- -// -// Let's say we have the following definition for the bi-streaming request -// `pkg.svc.Method`. -// -// .. code-block:: proto -// -// message MethodRequest { -// string foo = 1; -// Nested nested = 2; -// Msg redacted = 3; -// ... -// } -// -// message MethodResponse { -// string baz = 1; -// } -// -// message Nested { -// Msg double_nested = 2; -// } -// -// message Msg { -// string bar = 1; -// string not_extracted = 2; -// } -// -// This is the filter config in JSON. -// -// .. code-block:: json -// -// { -// "descriptor_set":{}, -// "mode": "FIRST_AND_LAST", -// "extraction_by_method":{ -// "pkg.svc.Method":{ -// "request_extraction_by_field":{ -// "foo":"EXTRACT", -// "nested.doubled_nested.bar":"EXTRACT", -// "redacted":"EXTRACT_REDACT" -// }, -// "response_extraction_by_field":{ -// "bar":"EXTRACT", -// } -// } -// } -// } -// -// During runtime, the filter receives the following `MethodRequest` message in -// JSON. -// -// .. code-block:: json -// -// { -// "foo": "val_foo1", -// "nested": { "double_nested": {"bar": "val_bar1", "not_extracted": -// "val_not_extracted1"}, "redacted": { "bar": "val_redacted_bar1"} -// } -// { -// "foo": "val_foo2", -// "nested": { "double_nested": {"bar": "val_bar2", "not_extracted": -// "val_not_extracted2"}, "redacted": { "bar": "val_redacted_bar2"} -// } -// { -// "foo": "val_foo3", -// "nested": { "double_nested": {"bar": "val_bar3", "not_extracted": -// "val_not_extracted3"}, "redacted": { "bar": "val_redacted_bar3"} -// } -// -// the filter receives the following `MethodResponse` message in -// JSON. -// -// .. code-block:: json -// -// { -// "baz": "val_baz1", -// } -// { -// "baz": "val_baz2", -// } -// { -// "baz": "val_baz3", -// } -// -// The filter will write the following dynamic -// metadata(`envoy.filters.http.proto_message_extraction`) in JSON. -// -// .. code-block:: json -// -// { -// "requests":{ -// "first":{ -// "foo": "val_foo1", -// "nested": { "double_nested": {"bar": "val_bar1"}}, -// "redacted": {} -// } -// "last":{ -// "foo": "val_foo3", -// "nested": { "double_nested": {"bar": "val_bar3"}}, -// "redacted": {} -// } -// }, -// "responses":{ -// "first":{ -// "baz": "val_baz1" -// } -// "last":{ -// "baz": "val_foo3" -// } -// } -// } - -message ProtoMessageExtractionConfig { - enum ExtractMode { - ExtractMode_UNSPECIFIED = 0; - - // The filter will extract the first and the last message for - // for streaming cases, containing - // client-side streaming, server-side streaming or bi-directional streaming. - FIRST_AND_LAST = 1; - } - - // The proto descriptor set binary for the gRPC services. - oneof descriptor_set { - // It could be passed by a local file through ``Datasource.filename`` or - // embedded in the ``Datasource.inline_bytes``. - config.core.v3.DataSource data_source = 1; - - // Unimplemented, the key of proto descriptor TypedMetadata. - // Among filters depending on the proto descriptor, we can have a - // TypedMetadata for proto descriptors, so that these filters can share one - // copy of proto descriptor in memory. - string proto_descriptor_typed_metadata = 2; - } - - ExtractMode mode = 3; - - // Specify the message extraction info. - // The key is the fully qualified gRPC method name. - // ``${package}.${Service}.${Method}``, like - // ``endpoints.examples.bookstore.BookStore.GetShelf`` - // - // The value is the message extraction information for individual gRPC - // methods. - map extraction_by_method = 4; -} - -// This message can be used to support per route config approach later even -// though the Istio doesn't support that so far. -message MethodExtraction { - enum ExtractDirective { - ExtractDirective_UNSPECIFIED = 0; - - // The value of this field will be extracted. - EXTRACT = 1; - - // It should be only annotated on Message type fields so if the field isn't - // empty, an empty Struct will be extracted. - EXTRACT_REDACT = 2; - - // Extract a repeated top-level field and record its number of entries in - // the extraction result. Can be applied to at most one field in the - // response, and cannot be applied to any fields in the request. - EXTRACT_REPEATED_CARDINALITY = 3; - } - - // The mapping of field path to its ExtractDirective for request messages - map request_extraction_by_field = 2; - - // The mapping of field path to its ExtractDirective for response messages - map response_extraction_by_field = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.proto b/src/main/proto/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.proto deleted file mode 100644 index 57b8bde..0000000 --- a/src/main/proto/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.proto +++ /dev/null @@ -1,423 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.rate_limit_quota.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/type/v3/http_status.proto"; -import "envoy/type/v3/ratelimit_strategy.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; -import "google/rpc/status.proto"; - -import "xds/annotations/v3/status.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.rate_limit_quota.v3"; -option java_outer_classname = "RateLimitQuotaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/rate_limit_quota/v3;rate_limit_quotav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Rate Limit Quota] -// Rate Limit Quota :ref:`configuration overview `. -// [#extension: envoy.filters.http.rate_limit_quota] - -// Configures the Rate Limit Quota filter. -// -// Can be overridden in the per-route and per-host configurations. -// The more specific definition completely overrides the less specific definition. -// [#next-free-field: 7] -message RateLimitQuotaFilterConfig { - // Configures the gRPC Rate Limit Quota Service (RLQS) RateLimitQuotaService. - config.core.v3.GrpcService rlqs_server = 1 [(validate.rules).message = {required: true}]; - - // The application domain to use when calling the service. This enables sharing the quota - // server between different applications without fear of overlap. - // E.g., "envoy". - string domain = 2 [(validate.rules).string = {min_len: 1}]; - - // The match tree to use for grouping incoming requests into buckets. - // - // Example: - // - // .. validated-code-block:: yaml - // :type-name: xds.type.matcher.v3.Matcher - // - // matcher_list: - // matchers: - // # Assign requests with header['env'] set to 'staging' to the bucket { name: 'staging' } - // - predicate: - // single_predicate: - // input: - // typed_config: - // '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput - // header_name: env - // value_match: - // exact: staging - // on_match: - // action: - // typed_config: - // '@type': type.googleapis.com/envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings - // bucket_id_builder: - // bucket_id_builder: - // name: - // string_value: staging - // - // # Assign requests with header['user_group'] set to 'admin' to the bucket { acl: 'admin_users' } - // - predicate: - // single_predicate: - // input: - // typed_config: - // '@type': type.googleapis.com/xds.type.matcher.v3.HttpAttributesCelMatchInput - // custom_match: - // typed_config: - // '@type': type.googleapis.com/xds.type.matcher.v3.CelMatcher - // expr_match: - // # Shortened for illustration purposes. Here should be parsed CEL expression: - // # request.headers['user_group'] == 'admin' - // parsed_expr: {} - // on_match: - // action: - // typed_config: - // '@type': type.googleapis.com/envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings - // bucket_id_builder: - // bucket_id_builder: - // acl: - // string_value: admin_users - // - // # Catch-all clause for the requests not matched by any of the matchers. - // # In this example, deny all requests. - // on_no_match: - // action: - // typed_config: - // '@type': type.googleapis.com/envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings - // no_assignment_behavior: - // fallback_rate_limit: - // blanket_rule: DENY_ALL - // - // .. attention:: - // The first matched group wins. Once the request is matched into a bucket, matcher - // evaluation ends. - // - // Use ``on_no_match`` field to assign the catch-all bucket. If a request is not matched - // into any bucket, and there's no ``on_no_match`` field configured, the request will be - // ALLOWED by default. It will NOT be reported to the RLQS server. - // - // Refer to :ref:`Unified Matcher API ` - // documentation for more information on the matcher trees. - xds.type.matcher.v3.Matcher bucket_matchers = 3 [(validate.rules).message = {required: true}]; - - // If set, this will enable -- but not necessarily enforce -- the rate limit for the given - // fraction of requests. - // - // Defaults to 100% of requests. - config.core.v3.RuntimeFractionalPercent filter_enabled = 4; - - // If set, this will enforce the rate limit decisions for the given fraction of requests. - // For requests that are not enforced the filter will still obtain the quota and include it - // in the load computation, however the request will always be allowed regardless of the outcome - // of quota application. This allows validation or testing of the rate limiting service - // infrastructure without disrupting existing traffic. - // - // Note: this only applies to the fraction of enabled requests. - // - // Defaults to 100% of requests. - config.core.v3.RuntimeFractionalPercent filter_enforced = 5; - - // Specifies a list of HTTP headers that should be added to each request that - // has been rate limited and is also forwarded upstream. This can only occur when the - // filter is enabled but not enforced. - repeated config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 6 - [(validate.rules).repeated = {max_items: 10}]; -} - -// Per-route and per-host configuration overrides. The more specific definition completely -// overrides the less specific definition. -message RateLimitQuotaOverride { - // The application domain to use when calling the service. This enables sharing the quota - // server between different applications without fear of overlap. - // E.g., "envoy". - // - // If empty, inherits the value from the less specific definition. - string domain = 1; - - // The match tree to use for grouping incoming requests into buckets. - // - // If set, fully overrides the bucket matchers provided on the less specific definition. - // If not set, inherits the value from the less specific definition. - // - // See usage example: :ref:`RateLimitQuotaFilterConfig.bucket_matchers - // `. - xds.type.matcher.v3.Matcher bucket_matchers = 2; -} - -// Rate Limit Quota Bucket Settings to apply on the successful ``bucket_matchers`` match. -// -// Specify this message in the :ref:`Matcher.OnMatch.action -// ` field of the -// ``bucket_matchers`` matcher tree to assign the matched requests to the Quota Bucket. -// Usage example: :ref:`RateLimitQuotaFilterConfig.bucket_matchers -// `. -// [#next-free-field: 6] -message RateLimitQuotaBucketSettings { - // Configures the behavior after the first request has been matched to the bucket, and before the - // the RLQS server returns the first quota assignment. - message NoAssignmentBehavior { - oneof no_assignment_behavior { - option (validate.required) = true; - - // Apply pre-configured rate limiting strategy until the server sends the first assignment. - type.v3.RateLimitStrategy fallback_rate_limit = 1; - } - } - - // Specifies the behavior when the bucket's assignment has expired, and cannot be refreshed for - // any reason. - message ExpiredAssignmentBehavior { - // Reuse the last known quota assignment, effectively extending it for the duration - // specified in the :ref:`expired_assignment_behavior_timeout - // ` - // field. - message ReuseLastAssignment { - } - - // Limit the time :ref:`ExpiredAssignmentBehavior - // ` - // is applied. If the server doesn't respond within this duration: - // - // 1. Selected ``ExpiredAssignmentBehavior`` is no longer applied. - // 2. The bucket is abandoned. The process of abandoning the bucket is described in the - // :ref:`AbandonAction ` - // message. - // 3. If a new request is matched into the bucket that has become abandoned, - // the data plane restarts the subscription to the bucket. The process of restarting the - // subscription is described in the :ref:`AbandonAction - // ` - // message. - // - // If not set, defaults to zero, and the bucket is abandoned immediately. - google.protobuf.Duration expired_assignment_behavior_timeout = 1 - [(validate.rules).duration = {gt {}}]; - - oneof expired_assignment_behavior { - option (validate.required) = true; - - // Apply the rate limiting strategy to all requests matched into the bucket until the RLQS - // server sends a new assignment, or the :ref:`expired_assignment_behavior_timeout - // ` - // runs out. - type.v3.RateLimitStrategy fallback_rate_limit = 2; - - // Reuse the last ``active`` assignment until the RLQS server sends a new assignment, or the - // :ref:`expired_assignment_behavior_timeout - // ` - // runs out. - ReuseLastAssignment reuse_last_assignment = 3; - } - } - - // Customize the deny response to the requests over the rate limit. - message DenyResponseSettings { - // HTTP response code to deny for HTTP requests (gRPC excluded). - // Defaults to 429 (:ref:`StatusCode.TooManyRequests`). - type.v3.HttpStatus http_status = 1; - - // HTTP response body used to deny for HTTP requests (gRPC excluded). - // If not set, an empty body is returned. - google.protobuf.BytesValue http_body = 2; - - // Configure the deny response for gRPC requests over the rate limit. - // Allows to specify the `RPC status code - // `_, - // and the error message. - // Defaults to the Status with the RPC Code ``UNAVAILABLE`` and empty message. - // - // To identify gRPC requests, Envoy checks that the ``Content-Type`` header is - // ``application/grpc``, or one of the various ``application/grpc+`` values. - // - // .. note:: - // The HTTP code for a gRPC response is always 200. - google.rpc.Status grpc_status = 3; - - // Specifies a list of HTTP headers that should be added to each response for requests that - // have been rate limited. Applies both to plain HTTP, and gRPC requests. - // The headers are added even when the rate limit quota was not enforced. - repeated config.core.v3.HeaderValueOption response_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 10}]; - } - - // ``BucketIdBuilder`` makes it possible to build :ref:`BucketId - // ` with values substituted - // from the dynamic properties associated with each individual request. See usage examples in - // the docs to :ref:`bucket_id_builder - // ` - // field. - message BucketIdBuilder { - // Produces the value of the :ref:`BucketId - // ` map. - message ValueBuilder { - oneof value_specifier { - option (validate.required) = true; - - // Static string value — becomes the value in the :ref:`BucketId - // ` map as is. - string string_value = 1; - - // Dynamic value — evaluated for each request. Must produce a string output, which becomes - // the value in the :ref:`BucketId ` - // map. For example, extensions with the ``envoy.matching.http.input`` category can be used. - config.core.v3.TypedExtensionConfig custom_value = 2; - } - } - - // The map translated into the ``BucketId`` map. - // - // The ``string key`` of this map and becomes the key of ``BucketId`` map as is. - // - // The ``ValueBuilder value`` for the key can be: - // - // * static ``StringValue string_value`` — becomes the value in the ``BucketId`` map as is. - // * dynamic ``TypedExtensionConfig custom_value`` — evaluated for each request. Must produce - // a string output, which becomes the value in the the ``BucketId`` map. - // - // See usage examples in the docs to :ref:`bucket_id_builder - // ` - // field. - map bucket_id_builder = 1 [(validate.rules).map = {min_pairs: 1}]; - } - - // ``BucketId`` builder. - // - // :ref:`BucketId ` is a map from - // the string key to the string value which serves as bucket identifier common for on - // the control plane and the data plane. - // - // While ``BucketId`` is always static, ``BucketIdBuilder`` allows to populate map values - // with the dynamic properties associated with the each individual request. - // - // Example 1: static fields only - // - // ``BucketIdBuilder``: - // - // .. validated-code-block:: yaml - // :type-name: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder - // - // bucket_id_builder: - // name: - // string_value: my_bucket - // hello: - // string_value: world - // - // Produces the following ``BucketId`` for all requests: - // - // .. validated-code-block:: yaml - // :type-name: envoy.service.rate_limit_quota.v3.BucketId - // - // bucket: - // name: my_bucket - // hello: world - // - // Example 2: static and dynamic fields - // - // .. validated-code-block:: yaml - // :type-name: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder - // - // bucket_id_builder: - // name: - // string_value: my_bucket - // env: - // custom_value: - // typed_config: - // '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput - // header_name: environment - // - // In this example, the value of ``BucketId`` key ``env`` is substituted from the ``environment`` - // request header. - // - // This is equivalent to the following ``pseudo-code``: - // - // .. code-block:: yaml - // - // name: 'my_bucket' - // env: $header['environment'] - // - // For example, the request with the HTTP header ``env`` set to ``staging`` will produce - // the following ``BucketId``: - // - // .. validated-code-block:: yaml - // :type-name: envoy.service.rate_limit_quota.v3.BucketId - // - // bucket: - // name: my_bucket - // env: staging - // - // For the request with the HTTP header ``environment`` set to ``prod``, will produce: - // - // .. validated-code-block:: yaml - // :type-name: envoy.service.rate_limit_quota.v3.BucketId - // - // bucket: - // name: my_bucket - // env: prod - // - // .. note:: - // The order of ``BucketId`` keys do not matter. Buckets ``{ a: 'A', b: 'B' }`` and - // ``{ b: 'B', a: 'A' }`` are identical. - // - // If not set, requests will NOT be reported to the server, and will always limited - // according to :ref:`no_assignment_behavior - // ` - // configuration. - BucketIdBuilder bucket_id_builder = 1; - - // The interval at which the data plane (RLQS client) is to report quota usage for this bucket. - // - // When the first request is matched to a bucket with no assignment, the data plane is to report - // the request immediately in the :ref:`RateLimitQuotaUsageReports - // ` message. - // For the RLQS server, this signals that the data plane is now subscribed to - // the quota assignments in this bucket, and will start sending the assignment as described in - // the :ref:`RLQS documentation `. - // - // After sending the initial report, the data plane is to continue reporting the bucket usage with - // the internal specified in this field. - // - // If for any reason RLQS client doesn't receive the initial assignment for the reported bucket, - // the data plane will eventually consider the bucket abandoned and stop sending the usage - // reports. This is explained in more details at :ref:`Rate Limit Quota Service (RLQS) - // `. - // - // [#comment: 100000000 nanoseconds = 0.1 seconds] - google.protobuf.Duration reporting_interval = 2 [(validate.rules).duration = { - required: true - gt {nanos: 100000000} - }]; - - // Customize the deny response to the requests over the rate limit. - // If not set, the filter will be configured as if an empty message is set, - // and will behave according to the defaults specified in :ref:`DenyResponseSettings - // `. - DenyResponseSettings deny_response_settings = 3; - - // Configures the behavior in the "no assignment" state: after the first request has been - // matched to the bucket, and before the the RLQS server returns the first quota assignment. - // - // If not set, the default behavior is to allow all requests. - NoAssignmentBehavior no_assignment_behavior = 4; - - // Configures the behavior in the "expired assignment" state: the bucket's assignment has expired, - // and cannot be refreshed. - // - // If not set, the bucket is abandoned when its ``active`` assignment expires. - // The process of abandoning the bucket, and restarting the subscription is described in the - // :ref:`AbandonAction ` - // message. - ExpiredAssignmentBehavior expired_assignment_behavior = 5; -} diff --git a/src/main/proto/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto b/src/main/proto/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto deleted file mode 100644 index 5c5a9f3..0000000 --- a/src/main/proto/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto +++ /dev/null @@ -1,250 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.ratelimit.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/ratelimit/v3/rls.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/v3/http_status.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.ratelimit.v3"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/ratelimit/v3;ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.http.ratelimit] - -// [#next-free-field: 18] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.rate_limit.v2.RateLimit"; - - // Defines the version of the standard to use for X-RateLimit headers. - // - // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.XRateLimitHeadersRFCVersion instead.] - enum XRateLimitHeadersRFCVersion { - // X-RateLimit headers disabled. - OFF = 0; - - // Use `draft RFC Version 03 `_. - DRAFT_VERSION_03 = 1; - } - - // The rate limit domain to use when calling the rate limit service. - string domain = 1 [(validate.rules).string = {min_len: 1}]; - - // Specifies the rate limit configurations to be applied with the same - // stage number. If not set, the default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 2 [(validate.rules).uint32 = {lte: 10}]; - - // The type of requests the filter should apply to. The supported - // types are ``internal``, ``external`` or ``both``. A request is considered internal if - // :ref:`x-envoy-internal` is set to true. If - // :ref:`x-envoy-internal` is not set or false, a - // request is considered external. The filter defaults to ``both``, and it will apply to all request - // types. - string request_type = 3 - [(validate.rules).string = {in: "internal" in: "external" in: "both" in: ""}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 4; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - bool failure_mode_deny = 5; - - // Specifies whether a ``RESOURCE_EXHAUSTED`` gRPC code must be returned instead - // of the default ``UNAVAILABLE`` gRPC code for a rate limited gRPC call. The - // HTTP code will be 200 for a gRPC response. - bool rate_limited_as_resource_exhausted = 6; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - config.ratelimit.v3.RateLimitServiceConfig rate_limit_service = 7 - [(validate.rules).message = {required: true}]; - - // Defines the standard version to use for X-RateLimit headers emitted by the filter: - // - // * ``X-RateLimit-Limit`` - indicates the request-quota associated to the - // client in the current time-window followed by the description of the - // quota policy. The values are returned by the rate limiting service in - // :ref:`current_limit` - // field. Example: ``10, 10;w=1;name="per-ip", 1000;w=3600``. - // * ``X-RateLimit-Remaining`` - indicates the remaining requests in the - // current time-window. The values are returned by the rate limiting service - // in :ref:`limit_remaining` - // field. - // * ``X-RateLimit-Reset`` - indicates the number of seconds until reset of - // the current time-window. The values are returned by the rate limiting service - // in :ref:`duration_until_reset` - // field. - // - // In case rate limiting policy specifies more than one time window, the values - // above represent the window that is closest to reaching its limit. - // - // For more information about the headers specification see selected version of - // the `draft RFC `_. - // - // Disabled by default. - // - // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.XRateLimitHeadersRFCVersion instead.] - XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 8 - [(validate.rules).enum = {defined_only: true}]; - - // Disables emitting the :ref:`x-envoy-ratelimited` header - // in case of rate limiting (i.e. 429 responses). - // Having this header not present potentially makes the request retriable. - bool disable_x_envoy_ratelimited_header = 9; - - // This field allows for a custom HTTP response status code to the downstream client when - // the request has been rate limited. - // Defaults to 429 (TooManyRequests). - // - // .. note:: - // If this is set to < 400, 429 will be used instead. - type.v3.HttpStatus rate_limited_status = 10; - - // Specifies a list of HTTP headers that should be added to each response for requests that - // have been rate limited. - repeated config.core.v3.HeaderValueOption response_headers_to_add = 11 - [(validate.rules).repeated = {max_items: 10}]; - - // Sets the HTTP status that is returned to the client when the ratelimit server returns an error - // or cannot be reached. The default status is 500. - type.v3.HttpStatus status_on_error = 12; - - // Optional additional prefix to use when emitting statistics. This allows to distinguish - // emitted statistics between configured ``ratelimit`` filters in an HTTP filter chain. - string stat_prefix = 13; - - // If set, this will enable -- but not necessarily enforce -- the rate limit for the given - // fraction of requests. - // - // If not set then ``ratelimit.http_filter_enabled`` runtime key will be used to determine - // the fraction of requests to enforce rate limits on. And the default percentage of the - // runtime key is 100% for backwards compatibility. - config.core.v3.RuntimeFractionalPercent filter_enabled = 14; - - // If set, this will enforce the rate limit decisions for the given fraction of requests. - // - // Note: this only applies to the fraction of enabled requests. - // - // If not set then ``ratelimit.http_filter_enforcing`` runtime key will be used to determine - // the fraction of requests to enforce rate limits on. And the default percentage of the - // runtime key is 100% for backwards compatibility. - config.core.v3.RuntimeFractionalPercent filter_enforced = 15; - - // If set, this will override the failure_mode_deny parameter with a runtime fraction. - // If the runtime key is not specified, the value of failure_mode_deny will be used. - // - // Example: - // - // .. code-block:: yaml - // - // failure_mode_deny: true - // failure_mode_deny_percent: - // default_value: - // numerator: 50 - // denominator: HUNDRED - // runtime_key: ratelimit.failure_mode_deny_percent - // - // This means that when the rate limit service is unavailable, 50% of requests will be denied - // (fail closed) and 50% will be allowed (fail open). - config.core.v3.RuntimeFractionalPercent failure_mode_deny_percent = 16; - - // Rate limit configuration that is used to generate a list of descriptor entries based on - // the request context. The generated entries will be sent to the rate limit service. - // If this is set, then - // :ref:`VirtualHost.rate_limits` or - // :ref:`RouteAction.rate_limits` fields - // will be ignored. However, :ref:`RateLimitPerRoute.rate_limits` - // will take precedence over this field. - // - // .. note:: - // Not all configuration fields of - // :ref:`rate limit config ` is supported at here. - // Following fields are not supported: - // - // 1. :ref:`rate limit stage `. - // 2. :ref:`dynamic metadata `. - // 3. :ref:`disable_key `. - // 4. :ref:`override limit `. - repeated config.route.v3.RateLimit rate_limits = 17; -} - -message RateLimitPerRoute { - // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.VhRateLimitsOptions instead.] - enum VhRateLimitsOptions { - // Use the virtual host rate limits unless the route has a rate limit policy. - OVERRIDE = 0; - - // Use the virtual host rate limits even if the route has a rate limit policy. - INCLUDE = 1; - - // Ignore the virtual host rate limits even if the route does not have a rate limit policy. - IGNORE = 2; - } - - // The override option determines how the filter handles the cases where there is an override config at a more specific level than this one (from least to most specific: virtual host, route, cluster weight). - // [#not-implemented-hide:] - enum OverrideOptions { - // Client-defined default, typically OVERRIDE_POLICY. If VhRateLimitsOptions is set, that will be used instead. - DEFAULT = 0; - - // If there is an override config at a more specific level, use that instead of this one. - OVERRIDE_POLICY = 1; - - // If there is an override config at a more specific level, use data from both. - INCLUDE_POLICY = 2; - - // If there is an override config at a more specific level, ignore it and use only this one. - IGNORE_POLICY = 3; - } - - // Specifies if the rate limit filter should include the virtual host rate limits. - // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.VhRateLimitsOptions instead.] - VhRateLimitsOptions vh_rate_limits = 1 [(validate.rules).enum = {defined_only: true}]; - - // Specifies if the rate limit filter should include the lower levels (route level, virtual host level or cluster weight level) rate limits override options. - // [#not-implemented-hide:] - OverrideOptions override_option = 2 [(validate.rules).enum = {defined_only: true}]; - - // Rate limit configuration that is used to generate a list of descriptor entries based on - // the request context. The generated entries will be used to find one or multiple matched rate - // limit rule from the ``descriptors``. - // If this is set, then - // :ref:`VirtualHost.rate_limits`, - // :ref:`RouteAction.rate_limits` and - // :ref:`RateLimit.rate_limits` fields - // will be ignored. - // - // .. note:: - // Not all configuration fields of - // :ref:`rate limit config ` is supported at here. - // Following fields are not supported: - // - // 1. :ref:`rate limit stage `. - // 2. :ref:`dynamic metadata `. - // 3. :ref:`disable_key `. - // 4. :ref:`override limit `. - repeated config.route.v3.RateLimit rate_limits = 3; - - // Overrides the domain. If not set, uses the filter-level domain instead. - string domain = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/http/rbac/v3/rbac.proto b/src/main/proto/envoy/extensions/filters/http/rbac/v3/rbac.proto deleted file mode 100644 index a37efe1..0000000 --- a/src/main/proto/envoy/extensions/filters/http/rbac/v3/rbac.proto +++ /dev/null @@ -1,86 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.rbac.v3; - -import "envoy/config/rbac/v3/rbac.proto"; - -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.rbac.v3"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/rbac/v3;rbacv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RBAC] -// Role-Based Access Control :ref:`configuration overview `. -// [#extension: envoy.filters.http.rbac] - -// RBAC filter config. -// [#next-free-field: 8] -message RBAC { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.rbac.v2.RBAC"; - - // The primary RBAC policy which will be applied globally, to all the incoming requests. - // - // * If absent, no RBAC enforcement occurs. - // * If set but empty, all requests are denied. - // - // .. note:: - // - // When both ``rules`` and ``matcher`` are configured, ``rules`` will be ignored. - // - config.rbac.v3.RBAC rules = 1 - [(udpa.annotations.field_migrate).oneof_promotion = "rules_specifier"]; - - // If specified, rules will emit stats with the given prefix. - // This is useful for distinguishing metrics when multiple RBAC filters are configured. - string rules_stat_prefix = 6; - - // Match tree for evaluating RBAC actions on incoming requests. Requests not matching any matcher will be denied. - // - // * If absent, no RBAC enforcement occurs. - // * If set but empty, all requests are denied. - // - xds.type.matcher.v3.Matcher matcher = 4 - [(udpa.annotations.field_migrate).oneof_promotion = "rules_specifier"]; - - // Shadow policy for testing RBAC rules without enforcing them. These rules generate stats and logs but do not deny - // requests. If absent, no shadow RBAC policy will be applied. - // - // .. note:: - // - // When both ``shadow_rules`` and ``shadow_matcher`` are configured, ``shadow_rules`` will be ignored. - // - config.rbac.v3.RBAC shadow_rules = 2 - [(udpa.annotations.field_migrate).oneof_promotion = "shadow_rules_specifier"]; - - // If absent, no shadow matcher will be applied. - // Match tree for testing RBAC rules through stats and logs without enforcing them. - // If absent, no shadow matching occurs. - xds.type.matcher.v3.Matcher shadow_matcher = 5 - [(udpa.annotations.field_migrate).oneof_promotion = "shadow_rules_specifier"]; - - // If specified, shadow rules will emit stats with the given prefix. - // This is useful for distinguishing metrics when multiple RBAC filters use shadow rules. - string shadow_rules_stat_prefix = 3; - - // If ``track_per_rule_stats`` is ``true``, counters will be published for each rule and shadow rule. - bool track_per_rule_stats = 7; -} - -message RBACPerRoute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.rbac.v2.RBACPerRoute"; - - reserved 1; - - // Per-route specific RBAC configuration that overrides the global RBAC configuration. - // If absent, RBAC policy will be disabled for this route. - RBAC rbac = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/router/v3/router.proto b/src/main/proto/envoy/extensions/filters/http/router/v3/router.proto deleted file mode 100644 index 7da658b..0000000 --- a/src/main/proto/envoy/extensions/filters/http/router/v3/router.proto +++ /dev/null @@ -1,143 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.router.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.router.v3"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/router/v3;routerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Router] -// Router :ref:`configuration overview `. -// [#extension: envoy.filters.http.router] - -// [#next-free-field: 11] -message Router { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.router.v2.Router"; - - message UpstreamAccessLogOptions { - // If set to true, an upstream access log will be recorded when an upstream stream is - // associated to an http request. Note: Each HTTP request received for an already established - // connection will result in an upstream access log record. This includes, for example, - // consecutive HTTP requests over the same connection or a request that is retried. - // In case a retry is applied, an upstream access log will be recorded for each retry. - bool flush_upstream_log_on_upstream_stream = 1; - - // The interval to flush the upstream access logs. By default, the router will flush an upstream - // access log on stream close, when the HTTP request is complete. If this field is set, the router - // will flush access logs periodically at the specified interval. This is especially useful in the - // case of long-lived requests, such as CONNECT and Websockets. - // The interval must be at least 1 millisecond. - google.protobuf.Duration upstream_log_flush_interval = 2 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - } - - // Whether the router generates dynamic cluster statistics. Defaults to - // true. Can be disabled in high performance scenarios. - google.protobuf.BoolValue dynamic_stats = 1; - - // Whether to start a child span for egress routed calls. This can be - // useful in scenarios where other filters (auth, ratelimit, etc.) make - // outbound calls and have child spans rooted at the same ingress - // parent. Defaults to false. - // - // .. attention:: - // This field is deprecated by the - // :ref:`spawn_upstream_span `. - // Please use that ``spawn_upstream_span`` field to control the span creation. - bool start_child_span = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Configuration for HTTP upstream logs emitted by the router. Upstream logs - // are configured in the same way as access logs, but each log entry represents - // an upstream request. Presuming retries are configured, multiple upstream - // requests may be made for each downstream (inbound) request. - repeated config.accesslog.v3.AccessLog upstream_log = 3; - - // Additional upstream access log options. - UpstreamAccessLogOptions upstream_log_options = 9; - - // Do not add any additional ``x-envoy-`` headers to requests or responses. This - // only affects the :ref:`router filter generated x-envoy- headers - // `, other Envoy filters and the HTTP - // connection manager may continue to set ``x-envoy-`` headers. - bool suppress_envoy_headers = 4; - - // Specifies a list of HTTP headers to strictly validate. Envoy will reject a - // request and respond with HTTP status 400 if the request contains an invalid - // value for any of the headers listed in this field. Strict header checking - // is only supported for the following headers: - // - // Value must be a ','-delimited list (i.e. no spaces) of supported retry - // policy values: - // - // * :ref:`config_http_filters_router_x-envoy-retry-grpc-on` - // * :ref:`config_http_filters_router_x-envoy-retry-on` - // - // Value must be an integer: - // - // * :ref:`config_http_filters_router_x-envoy-max-retries` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-timeout-ms` - // * :ref:`config_http_filters_router_x-envoy-upstream-rq-per-try-timeout-ms` - repeated string strict_check_headers = 5 [(validate.rules).repeated = { - items { - string { - in: "x-envoy-upstream-rq-timeout-ms" - in: "x-envoy-upstream-rq-per-try-timeout-ms" - in: "x-envoy-max-retries" - in: "x-envoy-retry-grpc-on" - in: "x-envoy-retry-on" - } - } - }]; - - // If not set, ingress Envoy will ignore - // :ref:`config_http_filters_router_x-envoy-expected-rq-timeout-ms` header, populated by egress - // Envoy, when deriving timeout for upstream cluster. - bool respect_expected_rq_timeout = 6; - - // If set, Envoy will avoid incrementing HTTP failure code stats - // on gRPC requests. This includes the individual status code value - // (e.g. upstream_rq_504) and group stats (e.g. upstream_rq_5xx). - // This field is useful if interested in relying only on the gRPC - // stats filter to define success and failure metrics for gRPC requests - // as not all failed gRPC requests charge HTTP status code metrics. See - // :ref:`gRPC stats filter` documentation - // for more details. - bool suppress_grpc_request_failure_code_stats = 7; - - // Optional HTTP filters for the upstream HTTP filter chain. - // - // .. note:: - // Upstream HTTP filters are currently in alpha. - // - // These filters will be applied for all requests that pass through the router. - // They will also be applied to shadowed requests. - // Upstream HTTP filters cannot change route or cluster. - // Upstream HTTP filters specified on the cluster will override these filters. - // - // If using upstream HTTP filters, please be aware that local errors sent by - // upstream HTTP filters will not trigger retries, and local errors sent by - // upstream HTTP filters will count as a final response if hedging is configured. - // [#extension-category: envoy.filters.http.upstream] - repeated network.http_connection_manager.v3.HttpFilter upstream_http_filters = 8; - - // If set to true, Envoy will reject ``CONNECT`` requests that send data before - // receiving a ``200`` response from the upstream. This early data behavior - // is common for latency reduction but can cause issues with some upstreams. - // Defaults to false to allow early data and be compatible with common behavior. - google.protobuf.BoolValue reject_connect_request_early_data = 10; -} diff --git a/src/main/proto/envoy/extensions/filters/http/set_filter_state/v3/set_filter_state.proto b/src/main/proto/envoy/extensions/filters/http/set_filter_state/v3/set_filter_state.proto deleted file mode 100644 index 54f1f4c..0000000 --- a/src/main/proto/envoy/extensions/filters/http/set_filter_state/v3/set_filter_state.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.set_filter_state.v3; - -import "envoy/extensions/filters/common/set_filter_state/v3/value.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.set_filter_state.v3"; -option java_outer_classname = "SetFilterStateProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/set_filter_state/v3;set_filter_statev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Set-Filter-State Filter] -// -// This filter sets or updates the dynamic filter state. See :ref:`the filter -// documentation ` for more information on -// how this filter should be used. -// -// [#extension: envoy.filters.http.set_filter_state] - -message Config { - // A sequence of the filter state values to apply in the specified order - // when a new request is received. - repeated common.set_filter_state.v3.FilterStateValue on_request_headers = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto b/src/main/proto/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto deleted file mode 100644 index e3dc673..0000000 --- a/src/main/proto/envoy/extensions/filters/http/set_metadata/v3/set_metadata.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.set_metadata.v3; - -import "google/protobuf/any.proto"; -import "google/protobuf/struct.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.set_metadata.v3"; -option java_outer_classname = "SetMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/set_metadata/v3;set_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Set-Metadata Filter] -// -// This filters adds or updates dynamic metadata with static data. -// -// [#extension: envoy.filters.http.set_metadata] - -message Metadata { - // The metadata namespace. - string metadata_namespace = 1 [(validate.rules).string = {min_len: 1}]; - - // Allow the filter to overwrite or merge with an existing value in the namespace. - bool allow_overwrite = 2; - - // The value to place at the namespace. If ``allow_overwrite``, this will - // overwrite or merge with any existing values in that namespace. See - // :ref:`the filter documentation ` for - // more information on how this value is merged with potentially existing - // ones if ``allow_overwrite`` is configured. Only one of ``value`` and - // ``typed_value`` may be set. - google.protobuf.Struct value = 3; - - // The value to place at the namespace. If ``allow_overwrite``, this will - // overwrite any existing values in that namespace. Only one of ``value`` and - // ``typed_value`` may be set. - google.protobuf.Any typed_value = 4; -} - -message Config { - // The metadata namespace. - // This field is deprecated; please use ``metadata`` as replacement. - string metadata_namespace = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The untyped value to update the dynamic metadata namespace with. See - // :ref:`the filter documentation ` for - // more information on how this value is merged with potentially existing - // ones. - // This field is deprecated; please use ``metadata`` as replacement. - google.protobuf.Struct value = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Defines changes to be made to dynamic metadata. - repeated Metadata metadata = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto b/src/main/proto/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto deleted file mode 100644 index b3e5e53..0000000 --- a/src/main/proto/envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.stateful_session.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.stateful_session.v3"; -option java_outer_classname = "StatefulSessionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/stateful_session/v3;stateful_sessionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Stateful session filter] -// Stateful session :ref:`configuration overview `. -// [#extension: envoy.filters.http.stateful_session] - -message StatefulSession { - // Specifies the implementation of session state. This session state is used to store and retrieve the address of the - // upstream host assigned to the session. - // - // [#extension-category: envoy.http.stateful_session] - config.core.v3.TypedExtensionConfig session_state = 1; - - // Determines whether the HTTP request must be strictly routed to the requested destination. When set to ``true``, - // if the requested destination is unavailable, Envoy will return a 503 status code. The default value is ``false``, - // which allows Envoy to fall back to its load balancing mechanism. In this case, if the requested destination is not - // found, the request will be routed according to the load balancing algorithm. - bool strict = 2; - - // Optional stat prefix. If specified, the filter will emit statistics in the - // ``http..stateful_session..`` namespace. If not specified, no statistics will be emitted. - // - // .. note:: - // - // Per-route configuration overrides do not support statistics and will not emit stats even if this field is set - // in the per-route config. - string stat_prefix = 3; -} - -message StatefulSessionPerRoute { - oneof override { - option (validate.required) = true; - - // Disable the stateful session filter for this particular vhost or route. If disabled is - // specified in multiple per-filter-configs, the most specific one will be used. - bool disabled = 1 [(validate.rules).bool = {const: true}]; - - // Per-route stateful session configuration that can be served by RDS or static route table. - StatefulSession stateful_session = 2; - } -} diff --git a/src/main/proto/envoy/extensions/filters/http/tap/v3/tap.proto b/src/main/proto/envoy/extensions/filters/http/tap/v3/tap.proto deleted file mode 100644 index 0c12c3f..0000000 --- a/src/main/proto/envoy/extensions/filters/http/tap/v3/tap.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.tap.v3; - -import "envoy/extensions/common/tap/v3/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.tap.v3"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap] -// Tap :ref:`configuration overview `. -// [#extension: envoy.filters.http.tap] - -// Top level configuration for the tap filter. -message Tap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.http.tap.v2alpha.Tap"; - - // Common configuration for the HTTP tap filter. - common.tap.v3.CommonExtensionConfig common_config = 1 - [(validate.rules).message = {required: true}]; - - // Indicates whether HTTP tap filter records the time stamp for request/response headers. - // Request headers time stamp is stored after receiving request headers. - // Response headers time stamp is stored after receiving response headers. - bool record_headers_received_time = 2; - - // Indicates whether report downstream connection info - bool record_downstream_connection = 3; - - // If enabled, upstream connection information will be reported. - bool record_upstream_connection = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/http/thrift_to_metadata/v3/thrift_to_metadata.proto b/src/main/proto/envoy/extensions/filters/http/thrift_to_metadata/v3/thrift_to_metadata.proto deleted file mode 100644 index 204f02f..0000000 --- a/src/main/proto/envoy/extensions/filters/http/thrift_to_metadata/v3/thrift_to_metadata.proto +++ /dev/null @@ -1,194 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.thrift_to_metadata.v3; - -import "envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto"; - -import "google/protobuf/struct.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.thrift_to_metadata.v3"; -option java_outer_classname = "ThriftToMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/thrift_to_metadata/v3;thrift_to_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Thrift-To-Metadata Filter] -// -// The Thrift to Metadata filter serves for thrift over HTTP traffic, expecting serialized -// Thrift request and response bodies in the HTTP payload. It extracts *thrift metadata* from the -// HTTP body and put them into the *filter metadata*. This is useful for matching load balancer -// subsets, logging, etc. -// -// Thrift to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.http.thrift_to_metadata] - -enum Field { - // The Thrift method name, string value. - METHOD_NAME = 0; - - // The Thrift protocol name, string value. Values are "binary", "binary/non-strict", and "compact", with "(auto)" suffix if - // :ref:`protocol ` - // is set to :ref:`AUTO_PROTOCOL` - PROTOCOL = 1; - - // The Thrift transport name, string value. Values are "framed", "header", and "unframed", with "(auto)" suffix if - // :ref:`transport ` - // is set to :ref:`AUTO_TRANSPORT` - TRANSPORT = 2; - - // The Thrift message type, singed 16-bit integer value. - HEADER_FLAGS = 3; - - // The Thrift sequence ID, singed 32-bit integer value. - SEQUENCE_ID = 4; - - // The Thrift message type, string value. Values in request are "call" and "oneway", and in response are "reply" and "exception". - MESSAGE_TYPE = 5; - - // The Thrift reply type, string value. This is only valid for response rules. Values are "success" and "error". - REPLY_TYPE = 6; -} - -message KeyValuePair { - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - - // When used for on_present case, if value is non-empty it'll be used instead - // of the field value. - // - // When used for on_missing case, a non-empty value must be provided. - google.protobuf.Value value = 3; -} - -message FieldSelector { - // field name to log - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // field id to match - int32 id = 2 [(validate.rules).int32 = {lte: 32767 gte: -32768}]; - - // next node of the field selector - FieldSelector child = 3; -} - -// [#next-free-field: 6] -message Rule { - // The field to match on. - // :ref:`field_selector` - // takes precedence if both are set. - Field field = 1; - - // Specifies that a match will be performed on the value of a field in the thrift body. - // If set, the whole http body will be buffered to extract the field value, which - // may have performance implications. - // - // It's a thrift over http version of - // :ref:`field_selector`. - // - // See also `payload-to-metadata `_ - // for more reference. - // - // Example: - // - // .. code-block:: yaml - // - // method_name: foo - // field_selector: - // name: info - // id: 2 - // child: - // name: version - // id: 1 - // - // The above yaml will match on value of ``info.version`` in the below thrift schema as input of - // :ref:`on_present` or - // :ref:`on_missing` - // while we are processing ``foo`` method. This rule won't be applied to ``bar`` method. - // - // .. code-block:: thrift - // - // struct Info { - // 1: required string version; - // } - // service Server { - // bool foo(1: i32 id, 2: Info info); - // bool bar(1: i32 id, 2: Info info); - // } - // - FieldSelector field_selector = 2; - - // If specified, :ref:`field_selector` - // will be used to extract the field value *only* on the thrift message with method name. - string method_name = 3; - - // The key-value pair to set in the *filter metadata* if the field is present - // in *thrift metadata*. - // - // If the value in the KeyValuePair is non-empty, it'll be used instead - // of field value. - KeyValuePair on_present = 4; - - // The key-value pair to set in the *filter metadata* if the field is missing - // in *thrift metadata*. - // - // The value in the KeyValuePair must be set, since it'll be used in lieu - // of the missing field value. - KeyValuePair on_missing = 5; -} - -// The configuration for transforming thrift metadata into filter metadata. -// -// [#next-free-field: 7] -message ThriftToMetadata { - // The list of rules to apply to http request body to extract thrift metadata. - repeated Rule request_rules = 1; - - // The list of rules to apply to http response body to extract thrift metadata. - repeated Rule response_rules = 2; - - // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. - network.thrift_proxy.v3.TransportType transport = 3 - [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. - // Note that :ref:`LAX_BINARY` - // is not distinguished by :ref:`AUTO_PROTOCOL`, - // which is the same with :ref:`thrift_proxy network filter `. - // Note that :ref:`TWITTER` is - // not supported due to deprecation in envoy. - network.thrift_proxy.v3.ProtocolType protocol = 4 [(validate.rules).enum = {defined_only: true}]; - - // Allowed content-type for thrift payload to filter metadata transformation. - // Default to ``{"application/x-thrift"}``. - // - // Set ``allow_empty_content_type`` if empty/missing content-type header - // is allowed. - repeated string allow_content_types = 5 - [(validate.rules).repeated = {items {string {min_len: 1}}}]; - - // Allowed empty content-type for thrift payload to filter metadata transformation. - // Default to false. - bool allow_empty_content_type = 6; -} - -// Thrift to metadata configuration on a per-route basis, which overrides the global configuration for -// request rules and responses rules. -message ThriftToMetadataPerRoute { - option (xds.annotations.v3.message_status).work_in_progress = true; - - // The list of rules to apply to http request body to extract thrift metadata. - repeated Rule request_rules = 1; - - // The list of rules to apply to http response body to extract thrift metadata. - repeated Rule response_rules = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/transform/v3/transform.proto b/src/main/proto/envoy/extensions/filters/http/transform/v3/transform.proto deleted file mode 100644 index f971a31..0000000 --- a/src/main/proto/envoy/extensions/filters/http/transform/v3/transform.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.transform.v3; - -import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; -import "envoy/config/core/v3/substitution_format_string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.transform.v3"; -option java_outer_classname = "TransformProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/transform/v3;transformv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Transform filter configuration] -// Transform filter :ref:`configuration overview ` to perform -// HTTP header and body transformations. -// [#extension: envoy.filters.http.transform] - -// Configuration for the transform filter. The filter may buffer the request/response until the -// entire body is received, and then mutate the headers and body according to the contents -// of the request/response. The request and response transformations are independent and could -// be configured separately. -// Only JSON body transformation is supported for now. -message TransformConfig { - // Configuration for transforming request. - // - // .. note:: - // - // If set then the entire request headers and body will always be buffered on a JSON request - // even if only headers are transformed. - Transformation request_transformation = 1; - - // Configuration for transforming response. - // - // .. note:: - // - // If set then the entire response headers and body will always be buffered on a JSON response - // even if only headers are transformed. - Transformation response_transformation = 2; - - // If true and the request headers are transformed, Envoy will re-evaluate the target - // cluster in the same route. Please ensure the cluster specifier in the route supports - // dynamic evaluation or this flag will have no effect, e.g. - // :ref:`matcher cluster specifier - // `. - // - // Only one of ``clear_cluster_cache`` and ``clear_route_cache`` can be true. - bool clear_cluster_cache = 3; - - // If true and the request headers are transformed, Envoy will clear the route cache for - // the current request and force re-evaluation of the route. This has performance penalty and - // should only be used when the route match criteria depends on the transformed headers. - // - // Only one of ``clear_cluster_cache`` and ``clear_route_cache`` can be true. - bool clear_route_cache = 4; -} - -message Transformation { - // The header mutations to perform. - // The :ref:`substitution format specifier ` could be applied here. - // In addition to the commonly used format specifiers, this filter introduces additional format specifiers: - // - // * ``%REQUEST_BODY(KEY*)%``: the request body. And ``Key`` KEY is an optional - // lookup key in the namespace with the option of specifying nested keys separated by ':'. - // * ``%RESPONSE_BODY(KEY*)%``: the response body. And ``Key`` KEY is an optional - // lookup key in the namespace with the option of specifying nested keys separated by ':'. - repeated config.common.mutation_rules.v3.HeaderMutation headers_mutations = 1; - - // The body transformation configuration. If not set, no body transformation will be performed. - BodyTransformation body_transformation = 2; -} - -message BodyTransformation { - enum TransformAction { - // Merge the transformed body with the original body. This is the default action. - MERGE = 0; - - // Replace the original body with the transformed body. - REPLACE = 1; - } - - // Body transformation configuration. The substitution format string is used as the template - // to generate the transformed new body content. - // The :ref:`substitution format specifier ` could be applied here. - // And except the commonly used format specifiers, the additional format specifiers - // ``%REQUEST_BODY(KEY*)%`` and ``%RESPONSE_BODY(KEY*)%`` could also be used here. - config.core.v3.SubstitutionFormatString body_format = 1 - [(validate.rules).message = {required: true}]; - - // The action to perform for new body content and original body content. - // For example, if ``MERGE`` is used, then the new body content generated from the ``body_format`` - // will be merged into the original body content. - // - // Default is ``MERGE``. - TransformAction action = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/http/upstream_codec/v3/upstream_codec.proto b/src/main/proto/envoy/extensions/filters/http/upstream_codec/v3/upstream_codec.proto deleted file mode 100644 index ea39448..0000000 --- a/src/main/proto/envoy/extensions/filters/http/upstream_codec/v3/upstream_codec.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.upstream_codec.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.upstream_codec.v3"; -option java_outer_classname = "UpstreamCodecProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/upstream_codec/v3;upstream_codecv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UpstreamCodec] -// Codec :ref:`configuration overview `. -// [#extension: envoy.filters.http.upstream_codec] - -message UpstreamCodec { -} diff --git a/src/main/proto/envoy/extensions/filters/http/wasm/v3/wasm.proto b/src/main/proto/envoy/extensions/filters/http/wasm/v3/wasm.proto deleted file mode 100644 index e275140..0000000 --- a/src/main/proto/envoy/extensions/filters/http/wasm/v3/wasm.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.http.wasm.v3; - -import "envoy/extensions/wasm/v3/wasm.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.http.wasm.v3"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/wasm/v3;wasmv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Wasm] -// [#extension: envoy.filters.http.wasm] -// Wasm :ref:`configuration overview `. - -message Wasm { - // General Plugin configuration. - envoy.extensions.wasm.v3.PluginConfig config = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/filters/listener/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index f2a4eca..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,73 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.dynamic_modules.v3; - -import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Listener filter for dynamic modules] -// [#extension: envoy.filters.listener.dynamic_modules] - -// Configuration of the listener filter for dynamic modules. This filter allows loading shared object -// files that can be loaded via dlopen by the listener filter. -// -// A module can be loaded by multiple listener filters, hence the program can be structured in a way -// that the module is loaded only once and shared across multiple filters providing multiple -// functionalities. -// -// Unlike network filters which operate on established TCP connections, listener filters -// work with raw accepted sockets BEFORE a Connection object is created. The filter can: -// -// * Inspect initial bytes to detect protocols (TLS, HTTP, PostgreSQL, etc.). -// * Set socket properties (SNI, ALPN, transport protocol, fingerprints). -// * Modify connection addresses (original destination restoration). -// * Set dynamic metadata and filter state for downstream filters. -// * Rate limit incoming connections. -// -message DynamicModuleListenerFilter { - // Specifies the shared-object level configuration. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; - - // The name for this filter configuration. This can be used to distinguish between different - // filter implementations inside a dynamic module. For example, a module can have completely - // different filter implementations (TLS inspector, rate limiter, proxy protocol parser). - // When Envoy receives this configuration, it passes the ``filter_name`` to the dynamic module's - // listener filter config init function together with the ``filter_config``. That way a module - // can decide which in-module filter implementation to use based on the name at load time. - string filter_name = 2; - - // The configuration for the filter chosen by ``filter_name``. This is passed to the module's - // listener filter initialization function. Together with the ``filter_name``, the module can - // decide which in-module filter implementation to use and fine-tune the behavior of the filter. - // - // For example, if a module has two filter implementations, one for TLS inspection and one for - // rate limiting, ``filter_name`` is used to choose either TLS or rate limiting. The ``filter_config`` - // can be used to configure the TLS inspection options or the rate limiting parameters. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the module. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly - // without the wrapper. - // - // .. code-block:: yaml - // - // # Passing a string value - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: hello - // - // # Passing raw bytes - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.BytesValue" - // value: aGVsbG8= # echo -n "hello" | base64 - // - google.protobuf.Any filter_config = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto b/src/main/proto/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto deleted file mode 100644 index c8ee26d..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.http_inspector.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.http_inspector.v3"; -option java_outer_classname = "HttpInspectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/http_inspector/v3;http_inspectorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP Inspector Filter] -// Detect whether the application protocol is HTTP. -// [#extension: envoy.filters.listener.http_inspector] - -message HttpInspector { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.listener.http_inspector.v2.HttpInspector"; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/local_ratelimit/v3/local_ratelimit.proto b/src/main/proto/envoy/extensions/filters/listener/local_ratelimit/v3/local_ratelimit.proto deleted file mode 100644 index 37051ae..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/local_ratelimit/v3/local_ratelimit.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.local_ratelimit.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/v3/token_bucket.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.local_ratelimit.v3"; -option java_outer_classname = "LocalRatelimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/local_ratelimit/v3;local_ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Local Rate Limit Filter] -// Local rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.listener.local_ratelimit] - -message LocalRateLimit { - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The token bucket configuration to use for rate limiting all incoming sockets. If the token is available, - // the socket will be allowed. If no tokens are available, the socket will be immediately closed. - // - // .. note:: - // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive - // refills. - type.v3.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; - - // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults - // to enabled. - config.core.v3.RuntimeFeatureFlag runtime_enabled = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto b/src/main/proto/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto deleted file mode 100644 index be6cf41..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/original_dst/v3/original_dst.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.original_dst.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.original_dst.v3"; -option java_outer_classname = "OriginalDstProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/original_dst/v3;original_dstv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Original Dst Filter] -// Use the Original destination address on downstream connections. -// [#extension: envoy.filters.listener.original_dst] - -message OriginalDst { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.listener.original_dst.v2.OriginalDst"; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/original_src/v3/original_src.proto b/src/main/proto/envoy/extensions/filters/listener/original_src/v3/original_src.proto deleted file mode 100644 index 8cafe7d..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/original_src/v3/original_src.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.original_src.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.original_src.v3"; -option java_outer_classname = "OriginalSrcProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/original_src/v3;original_srcv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Original Src Filter] -// Use the Original source address on upstream connections. -// [#extension: envoy.filters.listener.original_src] - -// The Original Src filter binds upstream connections to the original source address determined -// for the connection. This address could come from something like the Proxy Protocol filter, or it -// could come from trusted http headers. -message OriginalSrc { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.listener.original_src.v2alpha1.OriginalSrc"; - - // Whether to bind the port to the one used in the original downstream connection. - // [#not-implemented-hide:] - bool bind_port = 1; - - // Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to - // ensure that non-local addresses may be routed back through envoy when binding to the original - // source address. The option will not be applied if the mark is 0. - uint32 mark = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto b/src/main/proto/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto deleted file mode 100644 index b90d08d..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto +++ /dev/null @@ -1,107 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.proxy_protocol.v3; - -import "envoy/config/core/v3/proxy_protocol.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.proxy_protocol.v3"; -option java_outer_classname = "ProxyProtocolProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/proxy_protocol/v3;proxy_protocolv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Proxy Protocol Filter] -// PROXY protocol listener filter. -// [#extension: envoy.filters.listener.proxy_protocol] - -// [#next-free-field: 7] -message ProxyProtocol { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.listener.proxy_protocol.v2.ProxyProtocol"; - - // Controls where TLV values are stored when rules match. - enum TlvLocation { - // Store TLV values in dynamic metadata. - DYNAMIC_METADATA = 0; - - // Store TLV values in filter state as a single map-like object. - FILTER_STATE = 1; - } - - message KeyValuePair { - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - } - - // A Rule defines what metadata to apply when a header is present or missing. - message Rule { - // The type that triggers the rule - required - // TLV type is defined as uint8_t in proxy protocol. See `the spec - // `_ for details. - uint32 tlv_type = 1 [(validate.rules).uint32 = {lt: 256}]; - - // If the TLV type is present, apply this metadata KeyValuePair. - KeyValuePair on_tlv_present = 2; - } - - // The list of rules to apply to requests. - repeated Rule rules = 1; - - // Allow requests through that don't use proxy protocol. Defaults to false. - // - // .. attention:: - // - // This breaks conformance with the specification. - // Only enable if ALL traffic to the listener comes from a trusted source. - // For more information on the security implications of this feature, see - // https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt - // - // .. attention:: - // - // Requests of 12 or fewer bytes that match the proxy protocol v2 signature - // and requests of 6 or fewer bytes that match the proxy protocol v1 - // signature will timeout (Envoy is unable to differentiate these requests - // from incomplete proxy protocol requests). - bool allow_requests_without_proxy_protocol = 2; - - // This config controls which TLVs can be passed to filter state if it is Proxy Protocol - // V2 header. If there is no setting for this field, no TLVs will be passed through. - // - // .. note:: - // - // If this is configured, you likely also want to set - // :ref:`core.v3.ProxyProtocolConfig.pass_through_tlvs `, - // which controls pass-through for the upstream. - config.core.v3.ProxyProtocolPassThroughTLVs pass_through_tlvs = 3; - - // The PROXY protocol versions that won't be matched. Useful to limit the scope and attack surface of the filter. - // - // When the filter receives PROXY protocol data that is disallowed, it will reject the connection. - // By default, the filter will match all PROXY protocol versions. - // See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details. - // - // .. attention:: - // - // When used in conjunction with the :ref:`allow_requests_without_proxy_protocol `, - // the filter will not attempt to match signatures for the disallowed versions. - // For example, when ``disallowed_versions=V2``, ``allow_requests_without_proxy_protocol=true``, - // and an incoming request matches the V2 signature, the filter will allow the request through without any modification. - // The filter treats this request as if it did not have any PROXY protocol information. - repeated config.core.v3.ProxyProtocolConfig.Version disallowed_versions = 4; - - // The human readable prefix to use when emitting statistics for the filter. - // If not configured, statistics will be emitted without the prefix segment. - // See the :ref:`filter's statistics documentation ` for - // more information. - string stat_prefix = 5; - - // Controls where TLV values are stored when rules match. Defaults to DYNAMIC_METADATA. - TlvLocation tlv_location = 6; -} diff --git a/src/main/proto/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto b/src/main/proto/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto deleted file mode 100644 index 365af52..0000000 --- a/src/main/proto/envoy/extensions/filters/listener/tls_inspector/v3/tls_inspector.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.listener.tls_inspector.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.listener.tls_inspector.v3"; -option java_outer_classname = "TlsInspectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/tls_inspector/v3;tls_inspectorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: TLS Inspector Filter] -// Allows detecting whether the transport appears to be TLS or plaintext. -// [#extension: envoy.filters.listener.tls_inspector] - -// [#next-free-field: 6] -message TlsInspector { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.listener.tls_inspector.v2.TlsInspector"; - - // Populate ``JA3`` fingerprint hash using data from the TLS Client Hello packet. Default is false. - google.protobuf.BoolValue enable_ja3_fingerprinting = 1; - - // Populate ``JA4`` fingerprint hash using data from the TLS Client Hello packet. - // ``JA4`` is an improved version of ``JA3`` that includes TLS version, ciphers, extensions, - // and ALPN information in a hex format. Default is false. - google.protobuf.BoolValue enable_ja4_fingerprinting = 3; - - // The size in bytes of the initial buffer requested by the tls_inspector. - // If the filter needs to read additional bytes from the socket, the - // filter will double the buffer up to it's default maximum of 16KiB. - // If this size is not defined, defaults to maximum 16KiB that the - // tls inspector will consume. - google.protobuf.UInt32Value initial_read_buffer_size = 2 - [(validate.rules).uint32 = {lt: 65537 gt: 255}]; - - // Close connection when TLS ClientHello message could not be parsed. - // This flag should be enabled only if it is known that incoming connections are expected to use - // TLS protocol, as Envoy does not distinguish between a plain text message or a malformed TLS - // ClientHello message. - // By default this flag is false and TLS ClientHello parsing errors are interpreted as a - // plain text connection. - // Setting this to true will cause connections to be terminated and the ``client_hello_too_large`` - // counter to be incremented if the ClientHello message is over implementation defined limit - // (currently 16Kb). - bool close_connection_on_client_hello_parsing_errors = 4; - - // The maximum size in bytes of the ClientHello that the tls_inspector will - // process. If the ClientHello is larger than this size, the tls_inspector - // will stop processing and indicate failure. If not defined, defaults to - // 16KiB. - google.protobuf.UInt32Value max_client_hello_size = 5 - [(validate.rules).uint32 = {lte: 16384 gt: 255}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto b/src/main/proto/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto deleted file mode 100644 index 61bf64b..0000000 --- a/src/main/proto/envoy/extensions/filters/network/connection_limit/v3/connection_limit.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.connection_limit.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.connection_limit.v3"; -option java_outer_classname = "ConnectionLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/connection_limit/v3;connection_limitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Connection limit] -// Connection limit :ref:`configuration overview `. -// [#extension: envoy.filters.network.connection_limit] - -message ConnectionLimit { - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The max connections configuration to use for new incoming connections that are processed - // by the filter's filter chain. When max_connection is reached, the incoming connection - // will be closed after delay duration. - google.protobuf.UInt64Value max_connections = 2 [(validate.rules).uint64 = {gte: 1}]; - - // The delay configuration to use for rejecting the connection after some specified time duration - // instead of immediately rejecting the connection. That way, a malicious user is not able to - // retry as fast as possible which provides a better DoS protection for Envoy. If this is not present, - // the connection will be closed immediately. - google.protobuf.Duration delay = 3; - - // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults - // to enabled. - config.core.v3.RuntimeFeatureFlag runtime_enabled = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/network/direct_response/v3/config.proto b/src/main/proto/envoy/extensions/filters/network/direct_response/v3/config.proto deleted file mode 100644 index e5a8347..0000000 --- a/src/main/proto/envoy/extensions/filters/network/direct_response/v3/config.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.direct_response.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.direct_response.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/direct_response/v3;direct_responsev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Direct response] -// Direct response :ref:`configuration overview `. -// [#extension: envoy.filters.network.direct_response] - -message Config { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.direct_response.v2.Config"; - - // Response data as a data source. - config.core.v3.DataSource response = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto b/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto deleted file mode 100644 index 6242596..0000000 --- a/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.dubbo_proxy.router.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.router.v3"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dubbo_proxy/router/v3;routerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Router] -// Dubbo router :ref:`configuration overview `. - -message Router { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.dubbo.router.v2alpha1.Router"; -} diff --git a/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto b/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto deleted file mode 100644 index 5d4a2ae..0000000 --- a/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.dubbo_proxy.v3; - -import "envoy/config/core/v3/config_source.proto"; -import "envoy/extensions/filters/network/dubbo_proxy/v3/route.proto"; - -import "google/protobuf/any.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.v3"; -option java_outer_classname = "DubboProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dubbo_proxy/v3;dubbo_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dubbo Proxy] -// Dubbo Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.dubbo_proxy] - -// Dubbo Protocol types supported by Envoy. -enum ProtocolType { - // the default protocol. - Dubbo = 0; -} - -// Dubbo Serialization types supported by Envoy. -enum SerializationType { - // the default serialization protocol. - Hessian2 = 0; -} - -message Drds { - // Configuration source specifier. - // In case of ``api_config_source`` only aggregated ``api_type`` is supported. - config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // The name of the multiple route configuration. This allows to use different multiple route - // configurations. Tells which multiple route configuration should be fetched from the configuration - // source. Leave unspecified is also valid and means the unnamed multiple route configuration. - string route_config_name = 2; -} - -// [#next-free-field: 8] -message DubboProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.DubboProxy"; - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Configure the protocol used. - ProtocolType protocol_type = 2 [(validate.rules).enum = {defined_only: true}]; - - // Configure the serialization protocol used. - SerializationType serialization_type = 3 [(validate.rules).enum = {defined_only: true}]; - - // The route table for the connection manager is static and is specified in this property. - // - // .. note:: - // - // This field is deprecated. Please use ``drds`` or ``multiple_route_config`` first. - repeated RouteConfiguration route_config = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - oneof route_specifier { - // Use xDS to fetch the route configuration. It is invalid to define both ``route_config`` and ``drds``. - Drds drds = 6 [(udpa.annotations.field_migrate).oneof_promotion = "route_specifier"]; - - MultipleRouteConfiguration multiple_route_config = 7; - } - - // A list of individual Dubbo filters that make up the filter chain for requests made to the - // Dubbo proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no dubbo_filters are specified, a default Dubbo router filter - // (``envoy.filters.dubbo.router``) is used. - repeated DubboFilter dubbo_filters = 5; -} - -// DubboFilter configures a Dubbo filter. -message DubboFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.DubboFilter"; - - // The name of the filter to instantiate. The name must match a supported - // filter. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - google.protobuf.Any config = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto b/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto deleted file mode 100644 index 1ec0989..0000000 --- a/src/main/proto/envoy/extensions/filters/network/dubbo_proxy/v3/route.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.dubbo_proxy.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/v3/range.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.dubbo_proxy.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dubbo_proxy/v3;dubbo_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dubbo Proxy Route Configuration] -// Dubbo Proxy :ref:`configuration overview `. - -// [#next-free-field: 6] -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.RouteConfiguration"; - - // The name of the route configuration. Reserved for future use in asynchronous route discovery. - string name = 1; - - // The interface name of the service. Wildcard interface are supported in the suffix or prefix form. - // e.g. ``*.methods.add`` will match ``com.dev.methods.add``, ``com.prod.methods.add``, etc. - // ``com.dev.methods.*`` will match ``com.dev.methods.add``, ``com.dev.methods.update``, etc. - // Special wildcard ``*`` matching any interface. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*.methods.add`` will match ``com.dev.methods.add`` but not ``.methods.add``. - string interface = 2; - - // Which group does the interface belong to. - string group = 3; - - // The version number of the interface. - string version = 4; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 5; -} - -message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.Route"; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.RouteMatch"; - - // Method level routing matching. - MethodMatch method = 1; - - // Specifies a set of headers that the route should match on. The router will check the request’s - // headers against all the specified headers in the route config. A match will happen if all the - // headers in the route are present in the request with the same values (or based on presence if - // the value field is not in the config). - repeated config.route.v3.HeaderMatcher headers = 2; -} - -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.RouteAction"; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - // Currently ClusterWeight only supports the name and weight fields. - config.route.v3.WeightedCluster weighted_clusters = 2; - } - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered for - // load balancing. The filter name should be specified as ``envoy.lb``. - config.core.v3.Metadata metadata_match = 3; -} - -message MethodMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.MethodMatch"; - - // The parameter matching type. - message ParameterMatchSpecifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.dubbo_proxy.v2alpha1.MethodMatch.ParameterMatchSpecifier"; - - oneof parameter_match_specifier { - // If specified, header match will be performed based on the value of the header. - string exact_match = 3; - - // If specified, header match will be performed based on range. - // The rule will match if the request header value is within this range. - // The entire request header value must represent an integer in base 10 notation: consisting - // of an optional plus or minus sign followed by a sequence of digits. The rule will not match - // if the header value does not represent an integer. Match will fail for empty values, - // floating point numbers or if only a subsequence of the header value is an integer. - // - // Examples: - // - // * For range [-10,0), route will match for header value -1, but not for 0, - // "somestring", 10.9, "-1somestring" - type.v3.Int64Range range_match = 4; - } - } - - // The name of the method. - type.matcher.v3.StringMatcher name = 1; - - // Method parameter definition. - // The key is the parameter index, starting from 0. - // The value is the parameter matching type. - map params_match = 2; -} - -message MultipleRouteConfiguration { - // The name of the named route configurations. This name is used in asynchronous route discovery. - string name = 1; - - // The route table of the dubbo connection manager. - repeated RouteConfiguration route_config = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/network/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/filters/network/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index 808acc6..0000000 --- a/src/main/proto/envoy/extensions/filters/network/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.dynamic_modules.v3; - -import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic Modules Network Filter] -// [#extension: envoy.filters.network.dynamic_modules] - -// Configuration for the Dynamic Modules network filter. This filter allows loading shared object -// files that can be loaded via ``dlopen`` to extend the network filter chain. -// -// A module can be loaded by multiple network filters; the module is loaded only once and shared -// across multiple filters. -// -// Unlike HTTP filters which operate on structured headers, body, and trailers, network filters work -// with raw TCP byte streams. The filter can: -// -// * Inspect, modify, or inject data into the downstream connection. -// * Access connection-level information such as addresses and TLS status. -// * Control connection lifecycle (e.g., close the connection). -message DynamicModuleNetworkFilter { - // Specifies the shared-object level configuration. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; - - // The name for this filter configuration. - // - // This can be used to distinguish between different filter implementations inside a dynamic - // module. For example, a module can have completely different filter implementations. When Envoy - // receives this configuration, it passes the ``filter_name`` to the dynamic module's network - // filter config init function together with the ``filter_config``. That way a module can decide - // which in-module filter implementation to use based on the name at load time. - string filter_name = 2; - - // The configuration for the filter chosen by ``filter_name``. - // - // This is passed to the module's network filter initialization function. Together with the - // ``filter_name``, the module can decide which in-module filter implementation to use and - // fine-tune the behavior of the filter. - // - // For example, if a module has two filter implementations, one for echo and one for rate - // limiting, ``filter_name`` is used to choose either echo or rate limiting. The - // ``filter_config`` can be used to configure the echo behavior or the rate limiting parameters. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the module. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly - // without the wrapper. - // - // .. code-block:: yaml - // - // # Passing a string value - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: hello - // - // # Passing raw bytes - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.BytesValue" - // value: aGVsbG8= # echo -n "hello" | base64 - // - google.protobuf.Any filter_config = 3; - - // If ``true``, the dynamic module is a terminal filter to use without an upstream connection. - // - // The dynamic module is responsible for creating and sending the response to downstream. - // - // Defaults to ``false``. - bool terminal_filter = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/network/echo/v3/echo.proto b/src/main/proto/envoy/extensions/filters/network/echo/v3/echo.proto deleted file mode 100644 index 495a55c..0000000 --- a/src/main/proto/envoy/extensions/filters/network/echo/v3/echo.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.echo.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.echo.v3"; -option java_outer_classname = "EchoProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/echo/v3;echov3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Echo] -// Echo :ref:`configuration overview `. -// [#extension: envoy.filters.network.echo] - -message Echo { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.echo.v2.Echo"; -} diff --git a/src/main/proto/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto b/src/main/proto/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto deleted file mode 100644 index 64668a7..0000000 --- a/src/main/proto/envoy/extensions/filters/network/ext_authz/v3/ext_authz.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.ext_authz.v3; - -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/type/matcher/v3/metadata.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.ext_authz.v3"; -option java_outer_classname = "ExtAuthzProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/ext_authz/v3;ext_authzv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Network External Authorization ] -// The network layer external authorization service configuration -// :ref:`configuration overview `. -// [#extension: envoy.filters.network.ext_authz] - -// External Authorization filter calls out to an external service over the -// gRPC Authorization API defined by -// :ref:`CheckRequest `. -// A failed check will cause this filter to close the TCP connection. -// [#next-free-field: 12] -message ExtAuthz { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.ext_authz.v2.ExtAuthz"; - - // The prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The external authorization gRPC service configuration. - // The default timeout is set to 200ms by this filter. - config.core.v3.GrpcService grpc_service = 2; - - // The filter's behaviour in case the external authorization service does - // not respond back. When it is set to true, Envoy will also allow traffic in case of - // communication failure between authorization service and the proxy. - // Defaults to false. - bool failure_mode_allow = 3; - - // Specifies if the peer certificate is sent to the external service. - // - // When this field is true, Envoy will include the peer X.509 certificate, if available, in the - // :ref:`certificate`. - bool include_peer_certificate = 4; - - // API version for ext_authz transport protocol. This describes the ext_authz gRPC endpoint and - // version of Check{Request,Response} used on the wire. - config.core.v3.ApiVersion transport_api_version = 5 - [(validate.rules).enum = {defined_only: true}]; - - // Specifies if the filter is enabled with metadata matcher. - // If this field is not specified, the filter will be enabled for all requests. - type.matcher.v3.MetadataMatcher filter_enabled_metadata = 6; - - // Optional labels that will be passed to :ref:`labels` in - // :ref:`destination`. - // The labels will be read from :ref:`metadata` with the specified key. - string bootstrap_metadata_labels_key = 7; - - // Specifies if the TLS session level details like SNI are sent to the external service. - // - // When this field is true, Envoy will include the SNI name used for TLSClientHello, if available, in the - // :ref:`tls_session`. - bool include_tls_session = 8; - - // When set to ``true``, the filter will send a TLS ``access_denied(49)`` alert before closing - // the connection when authorization is denied. This provides better visibility to TLS clients - // about the reason for connection closure. This alert is only sent for TLS connections. The - // non-TLS connections will be closed without sending an alert. - // - // Defaults to ``false``. - bool send_tls_alert_on_denial = 9; - - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service. The :ref:`filter_metadata ` - // is passed as an opaque ``protobuf::Struct``. - // - // For example, if the ``proxy_protocol`` listener filter is used and populates TLV metadata, - // then the following will pass that metadata to the authorization server for making decisions - // based on proxy protocol information. - // - // .. code-block:: yaml - // - // metadata_context_namespaces: - // - envoy.filters.listener.proxy_protocol - // - repeated string metadata_context_namespaces = 10; - - // Specifies a list of metadata namespaces whose values, if present, will be passed to the - // ext_authz service. :ref:`typed_filter_metadata ` - // is passed as a ``protobuf::Any``. - // - // This works similarly to ``metadata_context_namespaces`` but allows Envoy and the ext_authz server to share - // the protobuf message definition in order to perform safe parsing. - // - repeated string typed_metadata_context_namespaces = 11; -} diff --git a/src/main/proto/envoy/extensions/filters/network/ext_proc/v3/ext_proc.proto b/src/main/proto/envoy/extensions/filters/network/ext_proc/v3/ext_proc.proto deleted file mode 100644 index f37feaa..0000000 --- a/src/main/proto/envoy/extensions/filters/network/ext_proc/v3/ext_proc.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.ext_proc.v3; - -import "envoy/config/core/v3/grpc_service.proto"; - -import "google/protobuf/duration.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.ext_proc.v3"; -option java_outer_classname = "ExtProcProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/ext_proc/v3;ext_procv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: External Processing Filter] -// External Processing Filter: Process network traffic using an external service. -// [#extension: envoy.filters.network.ext_proc] - -// The Network External Processing filter allows an external service to process raw TCP/UDP traffic -// in a flexible way using a bidirectional gRPC stream. Unlike the HTTP External Processing filter, -// this filter operates at the L4 (transport) layer, giving access to raw network traffic. -// -// The filter communicates with an external gRPC service that can: -// -// 1. Inspect traffic in both directions -// 2. Modify the network traffic -// 3. Control connection lifecycle (continue, close, or reset) -// -// By using the filter's processing mode, you can selectively choose which data -// directions to process (read, write or both), allowing for efficient processing. -// [#next-free-field: 7] -message NetworkExternalProcessor { - // The gRPC service that will process network traffic. - // This service must implement the NetworkExternalProcessor service - // defined in the proto file /envoy/service/network_ext_proc/v3/external_processor.proto. - config.core.v3.GrpcService grpc_service = 1; - - // By default, if the gRPC stream cannot be established, or if it is closed - // prematurely with an error, the filter will fail, leading to the close of connection. - // With this parameter set to true, however, then if the gRPC stream is prematurely closed - // or could not be opened, processing continues without error. - bool failure_mode_allow = 2; - - // Options for controlling processing behavior. - ProcessingMode processing_mode = 3; - - // Specifies the timeout for each individual message sent on the stream and - // when the filter is running in synchronous mode. Whenever - // the proxy sends a message on the stream that requires a response, it will - // reset this timer, and will stop processing and return an error (subject - // to the processing mode) if the timer expires. Default is 200 ms. - google.protobuf.Duration message_timeout = 4 [(validate.rules).duration = { - lte {seconds: 3600} - gte {} - }]; - - string stat_prefix = 5 [(validate.rules).string = {min_len: 1}]; - - // Options related to the sending and receiving of dynamic metadata. - MetadataOptions metadata_options = 6; -} - -// Options for controlling processing behavior. -// Filter will reject the config if both read and write are SKIP mode. -message ProcessingMode { - // Defines how traffic should be handled by the external processor. - enum DataSendMode { - // Send the data to the external processor for processing whenever the data is ready. - STREAMED = 0; - - // Skip sending the data to the external processor. - SKIP = 1; - } - - // Controls whether inbound (read) data from the client is sent to the external processor. - // Default: STREAMED - DataSendMode process_read = 1; - - // Controls whether outbound (write) data to the client is sent to the external processor. - // Default: STREAMED - DataSendMode process_write = 2; -} - -// The MetadataOptions structure defines options for sending dynamic metadata. Specifically, -// which namespaces to send to the server. -message MetadataOptions { - message MetadataNamespaces { - // Specifies a list of metadata namespaces whose values, if present, - // will be passed to the ext_proc service as an opaque *protobuf::Struct*. - repeated string untyped = 1; - - // Specifies a list of metadata namespaces whose values, if present, - // will be passed to the ext_proc service as a *protobuf::Any*. This allows - // envoy and the external processing server to share the protobuf message - // definition for safe parsing. - repeated string typed = 2; - } - - // Describes which typed or untyped dynamic metadata namespaces to forward to - // the external processing server. - MetadataNamespaces forwarding_namespaces = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/action/v3/action.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/action/v3/action.proto deleted file mode 100644 index 3e1b7a7..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/action/v3/action.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.action.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.action.v3"; -option java_outer_classname = "ActionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/action/v3;actionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Generic Proxy Route Action Configuration] - -// Configuration for the route match action. -// [#next-free-field: 8] -message RouteAction { - // The name of the route action. This should be unique across all route actions. - string name = 5; - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1; - - // [#not-implemented-hide:] - // Multiple upstream clusters can be specified for a given route. The request is routed to one - // of the upstream clusters based on weights assigned to each cluster. - // Currently ClusterWeight only supports the name and weight fields. - config.route.v3.WeightedCluster weighted_clusters = 2; - } - - // Route metadata. - config.core.v3.Metadata metadata = 3; - - // Route level config for L7 generic filters. The key should be the related :ref:`extension name - // ` in the :ref:`generic filters - // `. - map per_filter_config = 4; - - // Specifies the upstream timeout for the route. If not specified, the default is 15s. This - // spans between the point at which the entire downstream request (i.e. end-of-stream) has been - // processed and when the upstream response has been completely processed. A value of 0 will - // disable the route's timeout. - google.protobuf.Duration timeout = 6; - - // Specifies the retry policy for the route. If not specified, then no retries will be performed. - // - // .. note:: - // Only simplest retry policy is supported and only ``num_retries`` field is used for generic - // proxy. The default value for ``num_retries`` is 1 means that the request will be tried once - // and no additional retries will be performed. - config.core.v3.RetryPolicy retry_policy = 7; -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3/dubbo.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3/dubbo.proto deleted file mode 100644 index d5b6782..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3/dubbo.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.codecs.dubbo.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.codecs.dubbo.v3"; -option java_outer_classname = "DubboProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/codecs/dubbo/v3;dubbov3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Dubbo codec configuration for Generic Proxy] -// [#extension: envoy.generic_proxy.codecs.dubbo] - -message DubboCodecConfig { -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/codecs/http1/v3/http1.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/codecs/http1/v3/http1.proto deleted file mode 100644 index 2a57db6..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/codecs/http1/v3/http1.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.codecs.http1.v3; - -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.codecs.http1.v3"; -option java_outer_classname = "Http1Proto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/codecs/http1/v3;http1v3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: HTTP1 codec configuration for Generic Proxy] -// [#extension: envoy.generic_proxy.codecs.http1] - -// Configuration for HTTP codec. This HTTP1 codec is used to parse and serialize HTTP1 messages -// for the generic proxy filter. -// Any decoding error will result in the generic proxy closing the connection. -// -// .. note:: -// This codec only supports HTTP1.1 messages and does not support HTTP1.0 messages. And it limits -// part of the HTTP1.1 features, such as upgrade, connect, etc. -// This codec is mainly designed for the features evaluation of the generic proxy filter. Please -// be cautious when using it in production. -message Http1CodecConfig { - // If true, the codec will parse and serialize HTTP1 messages in a single frame per message. - // - // A frame is a minimal unit of data that can be processed by the generic proxy. If false, the - // codec will parse and serialize HTTP1 messages in a streaming way. In this case, the codec - // will output multiple frames for a single HTTP1 message to the generic proxy. - // If true, the codec will buffer the entire HTTP1 message body before sending it to the generic - // proxy. This may have better performance in small message scenarios and is more friendly to - // handle the HTTP1 message body. This also may result in higher memory usage and latency if - // the message body is large. - // - // Default is true. - google.protobuf.BoolValue single_frame_mode = 1; - - // The maximum size of the HTTP1 message body in bytes. If not set, 8*1024*1024 (8MB) is used. - // This only makes sense when single_frame_mode is true. - // If the HTTP1 message body size exceeds this value, this will result in a decoding error - // and the generic proxy will close the connection. - google.protobuf.UInt32Value max_buffer_size = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/matcher/v3/matcher.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/matcher/v3/matcher.proto deleted file mode 100644 index 1399086..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/matcher/v3/matcher.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.matcher.v3; - -import "envoy/type/matcher/v3/string.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.matcher.v3"; -option java_outer_classname = "MatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Generic Proxy Route Matcher Configuration] - -// Used to match request service of the downstream request. Only applicable if a service provided -// by the application protocol. -// This is deprecated and should be replaced by HostMatchInput. This is kept for backward compatibility. -message ServiceMatchInput { -} - -// Used to match request host of the generic downstream request. Only applicable if a host provided -// by the application protocol. -// This is same with the ServiceMatchInput and this should be preferred over ServiceMatchInput. -message HostMatchInput { -} - -// Used to match request path of the generic downstream request. Only applicable if a path provided -// by the application protocol. -message PathMatchInput { -} - -// Used to match request method of the generic downstream request. Only applicable if a method provided -// by the application protocol. -message MethodMatchInput { -} - -// Used to match an arbitrary property of the generic downstream request. -// These properties are populated by the codecs of application protocols. -message PropertyMatchInput { - // The property name to match on. - string property_name = 1 [(validate.rules).string = {min_len: 1}]; -} - -// Used to match an whole generic downstream request. -message RequestMatchInput { -} - -// Used to match an arbitrary key-value pair for headers, trailers or properties. -message KeyValueMatchEntry { - // The key name to match on. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The key value pattern. - type.matcher.v3.StringMatcher string_match = 2 [(validate.rules).message = {required: true}]; -} - -// Custom matcher to match on the generic downstream request. This is used to match -// multiple fields of the downstream request and avoid complex combinations of -// HostMatchInput, PathMatchInput, MethodMatchInput and PropertyMatchInput. -message RequestMatcher { - // Optional host pattern to match on. If not specified, any host will match. - type.matcher.v3.StringMatcher host = 1; - - // Optional path pattern to match on. If not specified, any path will match. - type.matcher.v3.StringMatcher path = 2; - - // Optional method pattern to match on. If not specified, any method will match. - type.matcher.v3.StringMatcher method = 3; - - // Optional arbitrary properties to match on. If not specified, any properties - // will match. The key is the property name and the value is the property value - // to match on. - repeated KeyValueMatchEntry properties = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/router/v3/router.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/router/v3/router.proto deleted file mode 100644 index 67f14fe..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/router/v3/router.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.router.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.router.v3"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/router/v3;routerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Router for generic proxy] -// [#extension: envoy.filters.generic.router] - -message Router { - // Set to true if the upstream connection should be bound to the downstream connection, false - // otherwise. - // - // By default, one random upstream connection will be selected from the upstream connection pool - // and used for every request. And after the request is finished, the upstream connection will be - // released back to the upstream connection pool. - // - // If this option is true, the upstream connection will be bound to the downstream connection and - // have same lifetime as the downstream connection. The same upstream connection will be used for - // all requests from the same downstream connection. - // - // And if this options is true, one of the following requirements must be met: - // - // 1. The request must be handled one by one. That is, the next request can not be sent to the - // upstream until the previous request is finished. - // 2. Unique request id must be provided for each request and response. The request id must be - // unique for each request and response pair in same connection pair. And the request id must - // be the same for the corresponding request and response. - // - // This could be useful for some protocols that require the same upstream connection to be used - // for all requests from the same downstream connection. For example, the protocol using stateful - // connection. - bool bind_upstream_connection = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/v3/generic_proxy.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/v3/generic_proxy.proto deleted file mode 100644 index 9ae2560..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/v3/generic_proxy.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/extensions/filters/network/generic_proxy/v3/route.proto"; -import "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.v3"; -option java_outer_classname = "GenericProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/v3;generic_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Generic Proxy] -// Generic proxy. -// [#extension: envoy.filters.network.generic_proxy] - -// [#next-free-field: 8] -message GenericProxy { - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The codec which encodes and decodes the application protocol. - // [#extension-category: envoy.generic_proxy.codecs] - config.core.v3.TypedExtensionConfig codec_config = 2 - [(validate.rules).message = {required: true}]; - - oneof route_specifier { - option (validate.required) = true; - - // The generic proxies route table will be dynamically loaded via the meta RDS API. - GenericRds generic_rds = 3; - - // The route table for the generic proxy is static and is specified in this property. - RouteConfiguration route_config = 4; - } - - // A list of individual Layer-7 filters that make up the filter chain for requests made to the - // proxy. Order matters as the filters are processed sequentially as request events - // happen. - // [#extension-category: envoy.generic_proxy.filters] - repeated config.core.v3.TypedExtensionConfig filters = 5; - - // Tracing configuration for the generic proxy. - http_connection_manager.v3.HttpConnectionManager.Tracing tracing = 6; - - // Configuration for :ref:`access logs ` emitted by generic proxy. - repeated config.accesslog.v3.AccessLog access_log = 7; -} - -message GenericRds { - // Configuration source specifier for RDS. - config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // The name of the route configuration. This name will be passed to the RDS API. This allows an - // Envoy configuration with multiple generic proxies to use different route configurations. - string route_config_name = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/generic_proxy/v3/route.proto b/src/main/proto/envoy/extensions/filters/network/generic_proxy/v3/route.proto deleted file mode 100644 index c298266..0000000 --- a/src/main/proto/envoy/extensions/filters/network/generic_proxy/v3/route.proto +++ /dev/null @@ -1,105 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.generic_proxy.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.generic_proxy.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/generic_proxy/v3;generic_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Generic Proxy Route Configuration] - -message VirtualHost { - // The name of the virtual host. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // A list of hosts that will be matched to this virtual host. Wildcard hosts are supported in - // the suffix or prefix form. - // - // Host search order: - // 1. Exact names: ``www.foo.com``. - // 2. Suffix wildcards: ``*.foo.com`` or ``*-bar.foo.com``. - // 3. Prefix wildcards: ``foo.*`` or ``foo-*``. - // 4. Special wildcard ``*`` matching any host and will be the default virtual host. - // - // .. note:: - // - // The wildcard will not match the empty string. - // e.g. ``*-bar.foo.com`` will match ``baz-bar.foo.com`` but not ``-bar.foo.com``. - // The longest wildcards match first. - // Only a single virtual host in the entire route configuration can match on ``*``. A domain - // must be unique across all virtual hosts or the config will fail to load. - repeated string hosts = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The match tree to use when resolving route actions for incoming requests. - xds.type.matcher.v3.Matcher routes = 3 [(validate.rules).message = {required: true}]; -} - -// The generic proxy makes use of the xDS matching API for routing configurations. -// -// In the below example, we combine a top level tree matcher with a linear matcher to match -// the incoming requests, and send the matching requests to v1 of the upstream service. -// -// .. code-block:: yaml -// -// name: example -// routes: -// matcher_tree: -// input: -// name: request-service -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.matcher.v3.ServiceMatchInput -// exact_match_map: -// map: -// service_name_0: -// matcher: -// matcher_list: -// matchers: -// - predicate: -// and_matcher: -// predicate: -// - single_predicate: -// input: -// name: request-properties -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.matcher.v3.PropertyMatchInput -// property_name: version -// value_match: -// exact: v1 -// - single_predicate: -// input: -// name: request-properties -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.matcher.v3.PropertyMatchInput -// property_name: user -// value_match: -// exact: john -// on_match: -// action: -// name: route -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.action.v3.routeAction -// cluster: cluster_0 -message RouteConfiguration { - // The name of the route configuration. For example, it might match route_config_name in - // envoy.extensions.filters.network.generic_proxy.v3.Rds. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The match tree to use when resolving route actions for incoming requests. - // If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard - // virtual host is configured, the ``routes`` field will be used as the default route table. - // If both the wildcard virtual host and ``routes`` are configured, the configuration will fail - // to load. - xds.type.matcher.v3.Matcher routes = 2; - - // An array of virtual hosts that make up the route table. - repeated VirtualHost virtual_hosts = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/network/geoip/v3/geoip.proto b/src/main/proto/envoy/extensions/filters/network/geoip/v3/geoip.proto deleted file mode 100644 index c5138f0..0000000 --- a/src/main/proto/envoy/extensions/filters/network/geoip/v3/geoip.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.geoip.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.geoip.v3"; -option java_outer_classname = "GeoipProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/geoip/v3;geoipv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Geoip] -// Geoip :ref:`configuration overview `. -// [#extension: envoy.filters.network.geoip] - -// The network geolocation filter performs IP geolocation lookups on incoming connections -// and stores the results in the connection's filter state under the well-known key -// ``envoy.geoip``. The stored data is a ``GeoipInfo`` object that supports -// serialization for access logging and field-level access. -// -// See :ref:`well known filter state ` for details on accessing -// the geolocation data. -message Geoip { - // The prefix to use when emitting statistics. This is useful when there are multiple - // listeners configured with geoip filters, allowing stats to be grouped per listener. - // For example, with ``stat_prefix: "listener_1."``, stats would be emitted as - // ``listener_1.geoip.total``. - string stat_prefix = 1; - - // Geoip driver specific configuration which depends on the driver being instantiated. - // [#extension-category: envoy.geoip_providers] - config.core.v3.TypedExtensionConfig provider = 2 [(validate.rules).message = {required: true}]; - - // Configuration for dynamically extracting the client IP address used for geolocation lookups. - // - // This field accepts the same :ref:`format specifiers ` as used for - // :ref:`HTTP access logging ` to extract the client IP. - // The formatted result must be a valid IPv4 or IPv6 address string. For example: - // - // * ``%FILTER_STATE(my.custom.client.ip:PLAIN)%`` - Read from filter state populated by a preceding filter. - // * ``%DYNAMIC_METADATA(namespace:key)%`` - Read from dynamic metadata. - // * ``%REQ(X-Forwarded-For)%`` - Extract from request header (if applicable in context). - // - // If not specified, defaults to the downstream connection's remote address. - // If specified but the result is empty, ``-``, or not a valid IP address, the filter - // falls back to the downstream connection's remote address. - // - // Example reading from filter state: - // - // .. code-block:: yaml - // - // client_ip: "%FILTER_STATE(my.custom.client.ip:PLAIN)%" - // - string client_ip = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto b/src/main/proto/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto deleted file mode 100644 index 9d8cf8b..0000000 --- a/src/main/proto/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto +++ /dev/null @@ -1,1357 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.http_connection_manager.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/protocol.proto"; -import "envoy/config/core/v3/substitution_format_string.proto"; -import "envoy/config/route/v3/route.proto"; -import "envoy/config/route/v3/scoped_route.proto"; -import "envoy/config/trace/v3/http_tracer.proto"; -import "envoy/type/http/v3/path_transformation.proto"; -import "envoy/type/tracing/v3/custom_tag.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/type/matcher/v3/matcher.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/security.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3"; -option java_outer_classname = "HttpConnectionManagerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3;http_connection_managerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP connection manager] -// HTTP connection manager :ref:`configuration overview `. -// [#extension: envoy.filters.network.http_connection_manager] - -// [#next-free-field: 61] -message HttpConnectionManager { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"; - - enum CodecType { - // For every new connection, the connection manager will determine which - // codec to use. This mode supports both ALPN for TLS listeners as well as - // protocol inference for plaintext listeners. If ALPN data is available, it - // is preferred, otherwise protocol inference is used. In almost all cases, - // this is the right option to choose for this setting. - AUTO = 0; - - // The connection manager will assume that the client is speaking HTTP/1.1. - HTTP1 = 1; - - // The connection manager will assume that the client is speaking HTTP/2 - // (Envoy does not require HTTP/2 to take place over TLS or to use ALPN. - // Prior knowledge is allowed). - HTTP2 = 2; - - // The connection manager will assume that the client is speaking HTTP/3. - // This needs to be consistent with listener and transport socket config. - HTTP3 = 3; - } - - enum ServerHeaderTransformation { - // Overwrite any Server header with the contents of server_name. - OVERWRITE = 0; - - // If no Server header is present, append Server server_name - // If a Server header is present, pass it through. - APPEND_IF_ABSENT = 1; - - // Pass through the value of the server header, and do not append a header - // if none is present. - PASS_THROUGH = 2; - } - - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - enum ForwardClientCertDetails { - // Do not send the XFCC header to the next hop. This is the default value. - SANITIZE = 0; - - // When the client connection is mTLS (Mutual TLS), forward the XFCC header - // in the request. - FORWARD_ONLY = 1; - - // When the client connection is mTLS, append the client certificate - // information to the request’s XFCC header and forward it. - APPEND_FORWARD = 2; - - // When the client connection is mTLS, reset the XFCC header with the client - // certificate information and send it to the next hop. - SANITIZE_SET = 3; - - // Always forward the XFCC header in the request, regardless of whether the - // client connection is mTLS. - ALWAYS_FORWARD_ONLY = 4; - } - - // Determines the action for request that contain ``%2F``, ``%2f``, ``%5C`` or ``%5c`` sequences in the URI path. - // This operation occurs before URL normalization and the merge slashes transformations if they were enabled. - enum PathWithEscapedSlashesAction { - // Default behavior specific to implementation (i.e. Envoy) of this configuration option. - // Envoy, by default, takes the KEEP_UNCHANGED action. - // - // .. note:: - // - // The implementation may change the default behavior at-will. - IMPLEMENTATION_SPECIFIC_DEFAULT = 0; - - // Keep escaped slashes. - KEEP_UNCHANGED = 1; - - // Reject client request with the 400 status. gRPC requests will be rejected with the INTERNAL (13) error code. - // The ``httpN.downstream_rq_failed_path_normalization`` counter is incremented for each rejected request. - REJECT_REQUEST = 2; - - // Unescape ``%2F`` and ``%5C`` sequences and redirect request to the new path if these sequences were present. - // Redirect occurs after path normalization and merge slashes transformations if they were configured. - // - // .. note:: - // - // gRPC requests will be rejected with the INTERNAL (13) error code. This option minimizes possibility of path - // confusion exploits by forcing request with unescaped slashes to traverse all parties: downstream client, - // intermediate proxies, Envoy and upstream server. The ``httpN.downstream_rq_redirected_with_normalized_path`` - // counter is incremented for each redirected request. - // - UNESCAPE_AND_REDIRECT = 3; - - // Unescape ``%2F`` and ``%5C`` sequences. - // - // .. note:: - // - // This option should not be enabled if intermediaries perform path based access control as it may lead to path - // confusion vulnerabilities. - // - UNESCAPE_AND_FORWARD = 4; - } - - // [#next-free-field: 13] - message Tracing { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing"; - - // This OperationName makes no sense and is unnecessary in the current tracing API. - // [#not-implemented-hide:] - enum OperationName { - // The HTTP listener is used for ingress/incoming requests. - INGRESS = 0; - - // The HTTP listener is used for egress/outgoing requests. - EGRESS = 1; - } - - reserved 1, 2; - - reserved "operation_name", "request_headers_for_tags"; - - // Target percentage of requests managed by this HTTP connection manager that will be force - // traced if the :ref:`x-client-trace-id ` - // header is set. This field is a direct analog for the runtime variable - // 'tracing.client_enabled' in the :ref:`HTTP Connection Manager - // `. - // Default: 100% - type.v3.Percent client_sampling = 3; - - // Target percentage of requests managed by this HTTP connection manager that will be randomly - // selected for trace generation, if not requested by the client or not forced. This field is - // a direct analog for the runtime variable 'tracing.random_sampling' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.v3.Percent random_sampling = 4; - - // Target percentage of requests managed by this HTTP connection manager that will be traced - // after all other sampling checks have been applied (client-directed, force tracing, random - // sampling). This field functions as an upper limit on the total configured sampling rate. For - // instance, setting client_sampling to 100% but overall_sampling to 1% will result in only 1% - // of client requests with the appropriate headers to be force traced. This field is a direct - // analog for the runtime variable 'tracing.global_enabled' in the - // :ref:`HTTP Connection Manager `. - // Default: 100% - type.v3.Percent overall_sampling = 5; - - // Whether to annotate spans with additional data. If true, spans will include logs for stream - // events. - bool verbose = 6; - - // Maximum length of the request path to extract and include in the HttpUrl tag. Used to - // truncate lengthy request paths to meet the needs of a tracing backend. - // Default: 256 - google.protobuf.UInt32Value max_path_tag_length = 7; - - // A list of custom tags with unique tag name to create tags for the active span. - repeated type.tracing.v3.CustomTag custom_tags = 8; - - // Configuration for an external tracing provider. - // If not specified, no tracing will be performed. - config.trace.v3.Tracing.Http provider = 9; - - // Create separate tracing span for each upstream request if true. And if this flag is set to true, - // the tracing provider will assume that Envoy will be independent hop in the trace chain and may - // set span type to client or server based on this flag. - // This will deprecate the - // :ref:`start_child_span ` - // in the router. - // - // Users should set appropriate value based on their tracing provider and actual scenario: - // - // * If Envoy is used as sidecar and users want to make the sidecar and its application as only one - // hop in the trace chain, this flag should be set to false. And please also make sure the - // :ref:`start_child_span ` - // in the router is not set to true. - // * If Envoy is used as gateway or independent proxy, or users want to make the sidecar and its - // application as different hops in the trace chain, this flag should be set to true. - // * If tracing provider that has explicit requirements on span creation (like SkyWalking), - // this flag should be set to true. - // - // The default value is false for now for backward compatibility. - google.protobuf.BoolValue spawn_upstream_span = 10; - - // The operation name of the span which will be used for tracing. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - // - // This field will take precedence over and make following settings ineffective: - // - // * :ref:`route decorator ` and - // * :ref:`x-envoy-decorator-operation ` - // header will be ignored. - string operation = 11; - - // The operation name of the upstream span which will be used for tracing. - // This only takes effect when ``spawn_upstream_span`` is set to true and the upstream - // span is created. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - string upstream_operation = 12; - } - - message InternalAddressConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager." - "InternalAddressConfig"; - - // Whether unix socket addresses should be considered internal. - bool unix_sockets = 1; - - // List of CIDR ranges that are treated as internal. If unset, then RFC1918 / RFC4193 - // IP addresses will be considered internal. - repeated config.core.v3.CidrRange cidr_ranges = 2; - } - - // [#next-free-field: 7] - message SetCurrentClientCertDetails { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager." - "SetCurrentClientCertDetails"; - - reserved 2; - - // Whether to forward the subject of the client cert. Defaults to false. - google.protobuf.BoolValue subject = 1; - - // Whether to forward the entire client cert in URL encoded PEM format. This will appear in the - // XFCC header comma separated from other values with the value Cert="PEM". - // Defaults to false. - bool cert = 3; - - // Whether to forward the entire client cert chain (including the leaf cert) in URL encoded PEM - // format. This will appear in the XFCC header comma separated from other values with the value - // Chain="PEM". - // Defaults to false. - bool chain = 6; - - // Whether to forward the DNS type Subject Alternative Names of the client cert. - // Defaults to false. - bool dns = 4; - - // Whether to forward the URI type Subject Alternative Name of the client cert. Defaults to - // false. - bool uri = 5; - } - - // The configuration for forwarding client cert details. - message ForwardClientCertConfig { - // How to handle the XFCC header. - ForwardClientCertDetails forward_client_cert_details = 1; - - // How to set the current client cert details. - SetCurrentClientCertDetails set_current_client_cert_details = 2; - } - - // The configuration for HTTP upgrades. - // For each upgrade type desired, an UpgradeConfig must be added. - // - // .. warning:: - // - // The current implementation of upgrade headers does not handle multi-valued upgrade headers. Support for - // multi-valued headers may be added in the future if needed. - // - // .. warning:: - // The current implementation of upgrade headers does not work with HTTP/2 upstreams. - // - message UpgradeConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager." - "UpgradeConfig"; - - // The case-insensitive name of this upgrade, e.g. "websocket". - // For each upgrade type present in upgrade_configs, requests with - // Upgrade: [upgrade_type] - // will be proxied upstream. - string upgrade_type = 1; - - // If present, this represents the filter chain which will be created for - // this type of upgrade. If no filters are present, the filter chain for - // HTTP connections will be used for this upgrade type. - repeated HttpFilter filters = 2; - - // Determines if upgrades are enabled or disabled by default. Defaults to true. - // This can be overridden on a per-route basis with :ref:`cluster - // ` as documented in the - // :ref:`upgrade documentation `. - google.protobuf.BoolValue enabled = 3; - } - - // [#not-implemented-hide:] Transformations that apply to path headers. Transformations are applied - // before any processing of requests by HTTP filters, routing, and matching. Only the normalized - // path will be visible internally if a transformation is enabled. Any path rewrites that the - // router performs (e.g. :ref:`regex_rewrite - // ` or :ref:`prefix_rewrite - // `) will apply to the ``:path`` header - // destined for the upstream. - // - // .. note:: - // - // Access logging and tracing will show the original ``:path`` header. - // - message PathNormalizationOptions { - // [#not-implemented-hide:] Normalization applies internally before any processing of requests by - // HTTP filters, routing, and matching *and* will affect the forwarded ``:path`` header. Defaults - // to :ref:`NormalizePathRFC3986 - // `. When not - // specified, this value may be overridden by the runtime variable - // :ref:`http_connection_manager.normalize_path`. - // Envoy will respond with 400 to paths that are malformed (e.g. for paths that fail RFC 3986 - // normalization due to disallowed characters.) - type.http.v3.PathTransformation forwarding_transformation = 1; - - // [#not-implemented-hide:] Normalization only applies internally before any processing of - // requests by HTTP filters, routing, and matching. These will be applied after full - // transformation is applied. The ``:path`` header before this transformation will be restored in - // the router filter and sent upstream unless it was mutated by a filter. Defaults to no - // transformations. - // Multiple actions can be applied in the same Transformation, forming a sequential - // pipeline. The transformations will be performed in the order that they appear. Envoy will - // respond with 400 to paths that are malformed (e.g. for paths that fail RFC 3986 - // normalization due to disallowed characters.) - type.http.v3.PathTransformation http_filter_transformation = 2; - } - - // Configures the manner in which the Proxy-Status HTTP response header is - // populated. - // - // See the [Proxy-Status - // RFC](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-proxy-status-08). - // [#comment:TODO: Update this with the non-draft URL when finalized.] - // - // The Proxy-Status header is a string of the form: - // - // "; error=; details=
" - // [#next-free-field: 7] - message ProxyStatusConfig { - // If true, the details field of the Proxy-Status header is not populated with stream_info.response_code_details. - // This value defaults to ``false``, i.e. the ``details`` field is populated by default. - bool remove_details = 1; - - // If true, the details field of the Proxy-Status header will not contain - // connection termination details. This value defaults to ``false``, i.e. the - // ``details`` field will contain connection termination details by default. - bool remove_connection_termination_details = 2; - - // If true, the details field of the Proxy-Status header will not contain an - // enumeration of the Envoy ResponseFlags. This value defaults to ``false``, - // i.e. the ``details`` field will contain a list of ResponseFlags by default. - bool remove_response_flags = 3; - - // If true, overwrites the existing Status header with the response code - // recommended by the Proxy-Status spec. - // This value defaults to ``false``, i.e. the HTTP response code is not - // overwritten. - bool set_recommended_response_code = 4; - - // The name of the proxy as it appears at the start of the Proxy-Status - // header. - // - // If neither of these values are set, this value defaults to ``server_name``, - // which itself defaults to "envoy". - oneof proxy_name { - // If ``use_node_id`` is set, Proxy-Status headers will use the Envoy's node - // ID as the name of the proxy. - bool use_node_id = 5; - - // If ``literal_proxy_name`` is set, Proxy-Status headers will use this - // value as the name of the proxy. - string literal_proxy_name = 6; - } - } - - message HcmAccessLogOptions { - // The interval to flush the above access logs. By default, the HCM will flush exactly one access log - // on stream close, when the HTTP request is complete. If this field is set, the HCM will flush access - // logs periodically at the specified interval. This is especially useful in the case of long-lived - // requests, such as CONNECT and Websockets. Final access logs can be detected via the - // ``requestComplete()`` method of ``StreamInfo`` in access log filters, or through the ``%DURATION%`` substitution - // string. - // The interval must be at least 1 millisecond. - google.protobuf.Duration access_log_flush_interval = 1 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // If set to true, HCM will flush an access log when a new HTTP request is received, after request - // headers have been evaluated, before iterating through the HTTP filter chain. - // This log record, if enabled, does not depend on periodic log records or request completion log. - // Details related to upstream cluster, such as upstream host, will not be available for this log. - bool flush_access_log_on_new_request = 2; - - // If true, the HCM will flush an access log when a tunnel is successfully established. For example, - // this could be when an upstream has successfully returned 101 Switching Protocols, or when the proxy - // has returned 200 to a CONNECT request. - bool flush_log_on_tunnel_successfully_established = 3; - } - - reserved 27, 11; - - reserved "idle_timeout"; - - // Supplies the type of codec that the connection manager should use. - CodecType codec_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // The human readable prefix to use when emitting statistics for the - // connection manager. See the :ref:`statistics documentation ` for - // more information. - string stat_prefix = 2 [(validate.rules).string = {min_len: 1}]; - - oneof route_specifier { - option (validate.required) = true; - - // The connection manager’s route table will be dynamically loaded via the RDS API. - Rds rds = 3; - - // The route table for the connection manager is static and is specified in this property. - config.route.v3.RouteConfiguration route_config = 4; - - // A route table will be dynamically assigned to each request based on request attributes - // (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are - // specified in this message. - ScopedRoutes scoped_routes = 31; - } - - // A list of individual HTTP filters that make up the filter chain for - // requests made to the connection manager. :ref:`Order matters ` - // as the filters are processed sequentially as request events happen. - repeated HttpFilter http_filters = 5; - - // Whether the connection manager manipulates the :ref:`config_http_conn_man_headers_user-agent` - // and :ref:`config_http_conn_man_headers_downstream-service-cluster` headers. See the linked - // documentation for more information. Defaults to false. - google.protobuf.BoolValue add_user_agent = 6; - - // Presence of the object defines whether the connection manager - // emits :ref:`tracing ` data to the :ref:`configured tracing provider - // `. - Tracing tracing = 7; - - // Additional settings for HTTP requests handled by the connection manager. These will be - // applicable to both HTTP/1.1 and HTTP/2 requests. - config.core.v3.HttpProtocolOptions common_http_protocol_options = 35 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // If set to ``true``, Envoy will not initiate an immediate drain timer for downstream HTTP/1 connections - // once :ref:`common_http_protocol_options.max_connection_duration - // ` is exceeded. - // Instead, Envoy will wait until the next downstream request arrives, add a ``connection: close`` header - // to the response, and then gracefully close the connection once the stream has completed. - // - // This behavior adheres to `RFC 9112, Section 9.6 `_. - // - // If set to ``false``, exceeding ``max_connection_duration`` triggers Envoy's default drain behavior for HTTP/1, - // where the connection is eventually closed after all active streams finish. - // - // This option has no effect if ``max_connection_duration`` is not configured. - // Defaults to ``false``. - bool http1_safe_max_connection_duration = 58; - - // Additional HTTP/1 settings that are passed to the HTTP/1 codec. - // [#comment:TODO: The following fields are ignored when the - // :ref:`header validation configuration ` - // is present: - // 1. :ref:`allow_chunked_length `] - config.core.v3.Http1ProtocolOptions http_protocol_options = 8; - - // Additional HTTP/2 settings that are passed directly to the HTTP/2 codec. - config.core.v3.Http2ProtocolOptions http2_protocol_options = 9 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // Additional HTTP/3 settings that are passed directly to the HTTP/3 codec. - config.core.v3.Http3ProtocolOptions http3_protocol_options = 44; - - // An optional override that the connection manager will write to the server - // header in responses. If not set, the default is ``envoy``. - string server_name = 10 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Defines the action to be applied to the Server header on the response path. - // By default, Envoy will overwrite the header with the value specified in - // server_name. - ServerHeaderTransformation server_header_transformation = 34 - [(validate.rules).enum = {defined_only: true}]; - - // Allows for explicit transformation of the :scheme header on the request path. - // If not set, Envoy's default :ref:`scheme ` - // handling applies. - config.core.v3.SchemeHeaderTransformation scheme_header_transformation = 48; - - // The maximum request headers size for incoming connections. - // If unconfigured, the default max request headers allowed is 60 KiB. - // The default value can be overridden by setting runtime key ``envoy.reloadable_features.max_request_headers_size_kb``. - // Requests that exceed this limit will receive a 431 response. - // - // .. note:: - // - // Currently some protocol codecs impose limits on the maximum size of a single header. - // - // * HTTP/2 (when using nghttp2) limits a single header to around 100kb. - // * HTTP/3 limits a single header to around 1024kb. - // - google.protobuf.UInt32Value max_request_headers_kb = 29 - [(validate.rules).uint32 = {lte: 8192 gt: 0}]; - - // The stream idle timeout for connections managed by the connection manager. - // If not specified, this defaults to 5 minutes. The default value was selected - // so as not to interfere with any smaller configured timeouts that may have - // existed in configurations prior to the introduction of this feature, while - // introducing robustness to TCP connections that terminate without a FIN. - // - // This idle timeout applies to new streams and is overridable by the - // :ref:`route-level idle_timeout - // `. Even on a stream in - // which the override applies, prior to receipt of the initial request - // headers, the :ref:`stream_idle_timeout - // ` - // applies. Each time an encode/decode event for headers or data is processed - // for the stream, the timer will be reset. If the timeout fires, the stream - // is terminated with a 408 Request Timeout error code if no upstream response - // header has been received, otherwise a stream reset occurs. - // - // If the :ref:`overload action ` "envoy.overload_actions.reduce_timeouts" - // is configured, this timeout is scaled according to the value for - // :ref:`HTTP_DOWNSTREAM_STREAM_IDLE `. - // - // Note that it is possible to idle timeout even if the wire traffic for a stream is non-idle, due - // to the granularity of events presented to the connection manager. For example, while receiving - // very large request headers, it may be the case that there is traffic regularly arriving on the - // wire while the connection manage is only able to observe the end-of-headers event, hence the - // stream may still idle timeout. - // - // A value of 0 will completely disable the connection manager stream idle - // timeout, although per-route idle timeout overrides will continue to apply. - // - // This timeout is also used as the default value for :ref:`stream_flush_timeout - // `. - google.protobuf.Duration stream_idle_timeout = 24 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // The stream flush timeout for connections managed by the connection manager. - // - // If not specified, the value of stream_idle_timeout is used. This is for backwards compatibility - // since this was the original behavior. In essence this timeout is an override for the - // stream_idle_timeout that applies specifically to the end of stream flush case. - // - // This timeout specifies the amount of time that Envoy will wait for the peer to open enough - // window to write any remaining stream data once the entirety of stream data (local end stream is - // true) has been buffered pending available window. In other words, this timeout defends against - // a peer that does not release enough window to completely write the stream, even though all - // data has been proxied within available flow control windows. If the timeout is hit in this - // case, the :ref:`tx_flush_timeout ` counter will be - // incremented. Note that :ref:`max_stream_duration - // ` does not apply to - // this corner case. - google.protobuf.Duration stream_flush_timeout = 59; - - // The amount of time that Envoy will wait for the entire request to be received. - // The timer is activated when the request is initiated, and is disarmed when the last byte of the - // request is sent upstream (i.e. all decoding filters have processed the request), OR when the - // response is initiated. If not specified or set to 0, this timeout is disabled. - google.protobuf.Duration request_timeout = 28 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // The amount of time that Envoy will wait for the request headers to be received. The timer is - // activated when the first byte of the headers is received, and is disarmed when the last byte of - // the headers has been received. If not specified or set to 0, this timeout is disabled. - google.protobuf.Duration request_headers_timeout = 41 [ - (validate.rules).duration = {gte {}}, - (udpa.annotations.security).configure_for_untrusted_downstream = true - ]; - - // The time that Envoy will wait between sending an HTTP/2 “shutdown - // notification” (GOAWAY frame with max stream ID) and a final GOAWAY frame. - // This is used so that Envoy provides a grace period for new streams that - // race with the final GOAWAY frame. During this grace period, Envoy will - // continue to accept new streams. After the grace period, a final GOAWAY - // frame is sent and Envoy will start refusing new streams. Draining occurs - // either when a connection hits the idle timeout, when :ref:`max_connection_duration - // ` - // is reached, or during general server draining. The default grace period is - // 5000 milliseconds (5 seconds) if this option is not specified. - google.protobuf.Duration drain_timeout = 12; - - // The delayed close timeout is for downstream connections managed by the HTTP connection manager. - // It is defined as a grace period after connection close processing has been locally initiated - // during which Envoy will wait for the peer to close (i.e., a TCP FIN/RST is received by Envoy - // from the downstream connection) prior to Envoy closing the socket associated with that - // connection. - // - // .. note:: - // - // This timeout is enforced even when the socket associated with the downstream connection is pending a flush of - // the write buffer. However, any progress made writing data to the socket will restart the timer associated with - // this timeout. This means that the total grace period for a socket in this state will be - // +. - // - // Delaying Envoy's connection close and giving the peer the opportunity to initiate the close - // sequence mitigates a race condition that exists when downstream clients do not drain/process - // data in a connection's receive buffer after a remote close has been detected via a socket - // ``write()``. This race leads to such clients failing to process the response code sent by Envoy, - // which could result in erroneous downstream processing. - // - // If the timeout triggers, Envoy will close the connection's socket. - // - // The default timeout is 1000 ms if this option is not specified. - // - // .. note:: - // To be useful in avoiding the race condition described above, this timeout must be set - // to *at least* +<100ms to account for - // a reasonable "worst" case processing time for a full iteration of Envoy's event loop>. - // - // .. warning:: - // A value of ``0`` will completely disable delayed close processing. When disabled, the downstream - // connection's socket will be closed immediately after the write flush is completed or will - // never close if the write flush does not complete. - // - google.protobuf.Duration delayed_close_timeout = 26; - - // Configuration for :ref:`HTTP access logs ` - // emitted by the connection manager. - repeated config.accesslog.v3.AccessLog access_log = 13; - - // The interval to flush the above access logs. - // - // .. attention:: - // - // This field is deprecated in favor of - // :ref:`access_log_flush_interval - // `. - // Note that if both this field and :ref:`access_log_flush_interval - // ` - // are specified, the former (deprecated field) is ignored. - google.protobuf.Duration access_log_flush_interval = 54 [ - deprecated = true, - (validate.rules).duration = {gte {nanos: 1000000}}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If set to true, HCM will flush an access log once when a new HTTP request is received, after the request - // headers have been evaluated, and before iterating through the HTTP filter chain. - // - // .. attention:: - // - // This field is deprecated in favor of - // :ref:`flush_access_log_on_new_request - // `. - // Note that if both this field and :ref:`flush_access_log_on_new_request - // ` - // are specified, the former (deprecated field) is ignored. - bool flush_access_log_on_new_request = 55 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Additional access log options for HTTP connection manager. - HcmAccessLogOptions access_log_options = 56; - - // If set to true, the connection manager will use the real remote address - // of the client connection when determining internal versus external origin and manipulating - // various headers. If set to false or absent, the connection manager will use the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for`, - // :ref:`config_http_conn_man_headers_x-envoy-internal`, and - // :ref:`config_http_conn_man_headers_x-envoy-external-address` for more information. - google.protobuf.BoolValue use_remote_address = 14 - [(udpa.annotations.security).configure_for_untrusted_downstream = true]; - - // The number of additional ingress proxy hops from the right side of the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when - // determining the origin client's IP address. The default is zero if this option - // is not specified. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. - uint32 xff_num_trusted_hops = 19; - - // Configuration for original IP detection extensions. - // - // When these extensions are configured, Envoy will invoke them with the incoming request headers and - // details about the downstream connection, including the directly connected address. Each extension uses - // this information to determine the effective remote IP address for the request. If an extension cannot - // identify the original IP address and isn't set to reject the request, Envoy will sequentially attempt - // the remaining extensions until one successfully determines the IP or explicitly rejects the request. - // If all extensions fail without rejection, Envoy defaults to using the directly connected remote address. - // - // .. warning:: - // These extensions cannot be configured simultaneously with :ref:`use_remote_address - // ` - // or :ref:`xff_num_trusted_hops - // `. - // - // [#extension-category: envoy.http.original_ip_detection] - repeated config.core.v3.TypedExtensionConfig original_ip_detection_extensions = 46; - - // The configuration for the early header mutation extensions. - // - // When configured the extensions will be called before any routing, tracing, or any filter processing. - // Each extension will be applied in the order they are configured. - // If the same header is mutated by multiple extensions, then the last extension will win. - // - // [#extension-category: envoy.http.early_header_mutation] - repeated config.core.v3.TypedExtensionConfig early_header_mutation_extensions = 52; - - // Configures what network addresses are considered internal for stats and header sanitation - // purposes. If unspecified, only RFC1918 IP addresses will be considered internal. - // See the documentation for :ref:`config_http_conn_man_headers_x-envoy-internal` for more - // information about internal/external addresses. - // - // .. warning:: - // As of Envoy 1.33.0 no IP addresses will be considered trusted. If you have tooling such as probes - // on your private network which need to be treated as trusted (e.g. changing arbitrary x-envoy headers) - // you will have to manually include those addresses or CIDR ranges like: - // - // .. validated-code-block:: yaml - // :type-name: envoy.extensions.filters.network.http_connection_manager.v3.InternalAddressConfig - // - // cidr_ranges: - // address_prefix: 10.0.0.0 - // prefix_len: 8 - // cidr_ranges: - // address_prefix: 192.168.0.0 - // prefix_len: 16 - // cidr_ranges: - // address_prefix: 172.16.0.0 - // prefix_len: 12 - // cidr_ranges: - // address_prefix: 127.0.0.1 - // prefix_len: 32 - // cidr_ranges: - // address_prefix: fd00:: - // prefix_len: 8 - // cidr_ranges: - // address_prefix: ::1 - // prefix_len: 128 - // - InternalAddressConfig internal_address_config = 25; - - // If set, Envoy will not append the remote address to the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. This may be used in - // conjunction with HTTP filters that explicitly manipulate XFF after the HTTP connection manager - // has mutated the request headers. While :ref:`use_remote_address - // ` - // will also suppress XFF addition, it has consequences for logging and other - // Envoy uses of the remote address, so ``skip_xff_append`` should be used - // when only an elision of XFF addition is intended. - bool skip_xff_append = 21; - - // Via header value to append to request and response headers. If this is - // empty, no via header will be appended. - string via = 22 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // Whether the connection manager will generate the :ref:`x-request-id - // ` header if it does not exist. This defaults to - // true. Generating a random UUID4 is expensive so in high throughput scenarios where this feature - // is not desired it can be disabled. - google.protobuf.BoolValue generate_request_id = 15; - - // Whether the connection manager will keep the :ref:`x-request-id - // ` header if passed for a request that is edge - // (Edge request is the request from external clients to front Envoy) and not reset it, which - // is the current Envoy behaviour. This defaults to false. - bool preserve_external_request_id = 32; - - // If set, Envoy will always set :ref:`x-request-id ` header in response. - // If this is false or not set, the request ID is returned in responses only if tracing is forced using - // :ref:`x-envoy-force-trace ` header. - bool always_set_request_id_in_response = 37; - - // How to handle the :ref:`config_http_conn_man_headers_x-forwarded-client-cert` (XFCC) HTTP - // header. - ForwardClientCertDetails forward_client_cert_details = 16 - [(validate.rules).enum = {defined_only: true}]; - - // This field is valid only when :ref:`forward_client_cert_details - // ` - // is APPEND_FORWARD or SANITIZE_SET and the client connection is mTLS. It specifies the fields in - // the client certificate to be forwarded. Note that in the - // :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, ``Hash`` is always set, and - // ``By`` is always set when the client certificate presents the URI type Subject Alternative Name - // value. - SetCurrentClientCertDetails set_current_client_cert_details = 17; - - // The matcher for forwarding client cert details. This allows per-request configuration - // of forward client cert behavior based on request properties. If a matcher is configured - // and matches a request, the matched action's forward client cert config will be used. - // If the matcher is not configured or doesn't match, the static - // :ref:`forward_client_cert_details - // ` - // and - // :ref:`set_current_client_cert_details - // ` - // config will be used as fallback. - // - // Example: If the x-forwarded-client-cert header contains "trusted-client", use APPEND_FORWARD, - // otherwise use SANITIZE_SET: - // - // .. code-block:: yaml - // - // forward_client_cert_matcher: - // matcher_list: - // matchers: - // - predicate: - // single_predicate: - // input: - // name: envoy.matching.inputs.request_headers - // typed_config: - // "@type": type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput - // header_name: "x-forwarded-client-cert" - // value_match: - // string_match: - // contains: "trusted-client" - // on_match: - // action: - // name: forward_client_cert - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertConfig - // forward_client_cert_details: APPEND_FORWARD - // set_current_client_cert_details: - // uri: true - // on_no_match: - // action: - // name: forward_client_cert - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertConfig - // forward_client_cert_details: SANITIZE_SET - // set_current_client_cert_details: - // uri: true - xds.type.matcher.v3.Matcher forward_client_cert_matcher = 60; - - // If proxy_100_continue is true, Envoy will proxy incoming "Expect: - // 100-continue" headers upstream, and forward "100 Continue" responses - // downstream. If this is false or not set, Envoy will instead strip the - // "Expect: 100-continue" header, and send a "100 Continue" response itself. - bool proxy_100_continue = 18; - - // If - // :ref:`use_remote_address - // ` - // is true and represent_ipv4_remote_address_as_ipv4_mapped_ipv6 is true and the remote address is - // an IPv4 address, the address will be mapped to IPv6 before it is appended to ``x-forwarded-for``. - // This is useful for testing compatibility of upstream services that parse the header value. For - // example, 50.0.0.1 is represented as ::FFFF:50.0.0.1. See `IPv4-Mapped IPv6 Addresses - // `_ for details. This will also affect the - // :ref:`config_http_conn_man_headers_x-envoy-external-address` header. See - // :ref:`http_connection_manager.represent_ipv4_remote_address_as_ipv4_mapped_ipv6 - // ` for runtime - // control. - // [#not-implemented-hide:] - bool represent_ipv4_remote_address_as_ipv4_mapped_ipv6 = 20; - - repeated UpgradeConfig upgrade_configs = 23; - - // Should paths be normalized according to RFC 3986 before any processing of - // requests by HTTP filters or routing? This affects the upstream ``:path`` header - // as well. For paths that fail this check, Envoy will respond with 400 to - // paths that are malformed. This defaults to false currently but will default - // true in the future. When not specified, this value may be overridden by the - // runtime variable - // :ref:`http_connection_manager.normalize_path`. - // See `Normalization and Comparison `_ - // for details of normalization. - // Note that Envoy does not perform - // `case normalization `_ - // [#comment:TODO: This field is ignored when the - // :ref:`header validation configuration ` - // is present.] - google.protobuf.BoolValue normalize_path = 30; - - // Determines if adjacent slashes in the path are merged into one before any processing of - // requests by HTTP filters or routing. This affects the upstream ``:path`` header as well. Without - // setting this option, incoming requests with path ``//dir///file`` will not match against route - // with ``prefix`` match set to ``/dir``. Defaults to ``false``. Note that slash merging is not part of - // `HTTP spec `_ and is provided for convenience. - // [#comment:TODO: This field is ignored when the - // :ref:`header validation configuration ` - // is present.] - bool merge_slashes = 33; - - // Action to take when request URL path contains escaped slash sequences (%2F, %2f, %5C and %5c). - // The default value can be overridden by the :ref:`http_connection_manager.path_with_escaped_slashes_action` - // runtime variable. - // The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime - // variable can be used to apply the action to a portion of all requests. - // [#comment:TODO: This field is ignored when the - // :ref:`header validation configuration ` - // is present.] - PathWithEscapedSlashesAction path_with_escaped_slashes_action = 45; - - // The configuration of the request ID extension. This includes operations such as - // generation, validation, and associated tracing operations. If empty, the - // :ref:`UuidRequestIdConfig ` - // default extension is used with default parameters. See the documentation for that extension - // for details on what it does. Customizing the configuration for the default extension can be - // achieved by configuring it explicitly here. For example, to disable trace reason packing, - // the following configuration can be used: - // - // .. validated-code-block:: yaml - // :type-name: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension - // - // typed_config: - // "@type": type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig - // pack_trace_reason: false - // - // [#extension-category: envoy.request_id] - RequestIDExtension request_id_extension = 36; - - // The configuration to customize local reply returned by Envoy. It can customize status code, - // body text and response content type. If not specified, status code and text body are hard - // coded in Envoy, the response content type is plain text. - LocalReplyConfig local_reply_config = 38; - - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. The port would be removed only if it is equal to the :ref:`listener's` - // local port. This affects the upstream host header unless the method is - // CONNECT in which case if no filter adds a port the original port will be restored before headers are - // sent upstream. - // Without setting this option, incoming requests with host ``example:443`` will not match against - // route with :ref:`domains` match set to ``example``. Defaults to ``false``. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // Only one of ``strip_matching_host_port`` or ``strip_any_host_port`` can be set. - bool strip_matching_host_port = 39 - [(udpa.annotations.field_migrate).oneof_promotion = "strip_port_mode"]; - - oneof strip_port_mode { - // Determines if the port part should be removed from host/authority header before any processing - // of request by HTTP filters or routing. - // This affects the upstream host header unless the method is CONNECT in - // which case if no filter adds a port the original port will be restored before headers are sent upstream. - // Without setting this option, incoming requests with host ``example:443`` will not match against - // route with :ref:`domains` match set to ``example``. Defaults to ``false``. Note that port removal is not part - // of `HTTP spec `_ and is provided for convenience. - // Only one of ``strip_matching_host_port`` or ``strip_any_host_port`` can be set. - bool strip_any_host_port = 42; - } - - // Governs Envoy's behavior when receiving invalid HTTP from downstream. - // If this option is false (default), Envoy will err on the conservative side handling HTTP - // errors, terminating both HTTP/1.1 and HTTP/2 connections when receiving an invalid request. - // If this option is set to true, Envoy will be more permissive, only resetting the invalid - // stream in the case of HTTP/2 and leaving the connection open where possible (if the entire - // request is read for HTTP/1.1) - // In general this should be true for deployments receiving trusted traffic (L2 Envoys, - // company-internal mesh) and false when receiving untrusted traffic (edge deployments). - // - // If different behaviors for invalid_http_message for HTTP/1 and HTTP/2 are - // desired, one should use the new HTTP/1 option :ref:`override_stream_error_on_invalid_http_message - // ` or the new HTTP/2 option - // :ref:`override_stream_error_on_invalid_http_message - // ` - // ``not`` the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging - // ` - google.protobuf.BoolValue stream_error_on_invalid_http_message = 40; - - // [#not-implemented-hide:] Path normalization configuration. This includes - // configurations for transformations (e.g. RFC 3986 normalization or merge - // adjacent slashes) and the policy to apply them. The policy determines - // whether transformations affect the forwarded ``:path`` header. RFC 3986 path - // normalization is enabled by default and the default policy is that the - // normalized header will be forwarded. See :ref:`PathNormalizationOptions - // ` - // for details. - PathNormalizationOptions path_normalization_options = 43; - - // Determines if trailing dot of the host should be removed from host/authority header before any - // processing of request by HTTP filters or routing. - // This affects the upstream host header. - // Without setting this option, incoming requests with host ``example.com.`` will not match against - // route with :ref:`domains` match set to ``example.com``. Defaults to ``false``. - // When the incoming request contains a host/authority header that includes a port number, - // setting this option will strip a trailing dot, if present, from the host section, - // leaving the port as is (e.g. host value ``example.com.:443`` will be updated to ``example.com:443``). - bool strip_trailing_host_dot = 47; - - // Proxy-Status HTTP response header configuration. - // If this config is set, the Proxy-Status HTTP response header field is - // populated. By default, it is not. - ProxyStatusConfig proxy_status_config = 49; - - // Configuration options for Header Validation (UHV). - // UHV is an extensible mechanism for checking validity of HTTP requests as well as providing - // normalization for request attributes, such as URI path. - // If the typed_header_validation_config is present it overrides the following options: - // ``normalize_path``, ``merge_slashes``, ``path_with_escaped_slashes_action`` - // ``http_protocol_options.allow_chunked_length``, ``common_http_protocol_options.headers_with_underscores_action``. - // - // The default UHV checks the following: - // - // #. HTTP/1 header map validity according to `RFC 7230 section 3.2`_ - // #. Syntax of HTTP/1 request target URI and response status - // #. HTTP/2 header map validity according to `RFC 7540 section 8.1.2`_ - // #. Syntax of HTTP/3 pseudo headers - // #. Syntax of ``Content-Length`` and ``Transfer-Encoding`` - // #. Validation of HTTP/1 requests with both ``Content-Length`` and ``Transfer-Encoding`` headers - // #. Normalization of the URI path according to `Normalization and Comparison `_ - // without `case normalization `_ - // - // [#not-implemented-hide:] - // [#extension-category: envoy.http.header_validators] - config.core.v3.TypedExtensionConfig typed_header_validation_config = 50; - - // Append the ``x-forwarded-port`` header with the port value client used to connect to Envoy. It - // will be ignored if the ``x-forwarded-port`` header has been set by any trusted proxy in front of Envoy. - bool append_x_forwarded_port = 51; - - // Append the :ref:`config_http_conn_man_headers_x-envoy-local-overloaded` HTTP header in the scenario where - // the Overload Manager has been triggered. - bool append_local_overload = 57; - - // Whether the HCM will add ProxyProtocolFilterState to the Connection lifetime filter state. Defaults to ``true``. - // This should be set to ``false`` in cases where Envoy's view of the downstream address may not correspond to the - // actual client address, for example, if there's another proxy in front of the Envoy. - google.protobuf.BoolValue add_proxy_protocol_connection_state = 53; -} - -// The configuration to customize local reply returned by Envoy. -message LocalReplyConfig { - // Configuration of list of mappers which allows to filter and change local response. - // The mappers will be checked by the specified order until one is matched. - repeated ResponseMapper mappers = 1; - - // The configuration to form response body from the :ref:`command operators ` - // and to specify response content type as one of: plain/text or application/json. - // - // Example one: "plain/text" ``body_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n" - // - // The following response body in "plain/text" format will be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: text - // - // upstream connect error:503:path=/foo - // - // Example two: "application/json" ``body_format``. - // - // .. validated-code-block:: yaml - // :type-name: envoy.config.core.v3.SubstitutionFormatString - // - // json_format: - // status: "%RESPONSE_CODE%" - // message: "%LOCAL_REPLY_BODY%" - // path: "%REQ(:path)%" - // - // The following response body in "application/json" format would be generated for a request with - // local reply body of "upstream connection error", response_code=503 and path=/foo. - // - // .. code-block:: json - // - // { - // "status": 503, - // "message": "upstream connection error", - // "path": "/foo" - // } - // - config.core.v3.SubstitutionFormatString body_format = 2; -} - -// The configuration to filter and change local response. -// [#next-free-field: 6] -message ResponseMapper { - // Filter to determine if this mapper should apply. - config.accesslog.v3.AccessLogFilter filter = 1 [(validate.rules).message = {required: true}]; - - // The new response status code if specified. - google.protobuf.UInt32Value status_code = 2 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // The new local reply body text if specified. It will be used in the ``%LOCAL_REPLY_BODY%`` - // command operator in the ``body_format``. - config.core.v3.DataSource body = 3; - - // A per mapper ``body_format`` to override the :ref:`body_format `. - // It will be used when this mapper is matched. - config.core.v3.SubstitutionFormatString body_format_override = 4; - - // HTTP headers to add to a local reply. This allows the response mapper to append, to add - // or to override headers of any local reply before it is sent to a downstream client. - repeated config.core.v3.HeaderValueOption headers_to_add = 5 - [(validate.rules).repeated = {max_items: 1000}]; -} - -message Rds { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.Rds"; - - // Configuration source specifier for RDS. - config.core.v3.ConfigSource config_source = 1; - - // The name of the route configuration. This name will be passed to the RDS - // API. This allows an Envoy configuration with multiple HTTP listeners (and - // associated HTTP connection manager filters) to use different route - // configurations. - string route_config_name = 2; -} - -// This message is used to work around the limitations with 'oneof' and repeated fields. -message ScopedRouteConfigurationsList { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList"; - - repeated config.route.v3.ScopedRouteConfiguration scoped_route_configurations = 1 - [(validate.rules).repeated = {min_items: 1}]; -} - -// [#next-free-field: 6] -message ScopedRoutes { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes"; - - // Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These - // keys are matched against a set of :ref:`Key` - // objects assembled from :ref:`ScopedRouteConfiguration` - // messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via - // :ref:`scoped_route_configurations_list`. - // - // Upon receiving a request's headers, the Router will build a key using the algorithm specified - // by this message. This key will be used to look up the routing table (i.e., the - // :ref:`RouteConfiguration`) to use for the request. - message ScopeKeyBuilder { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder"; - - // Specifies the mechanism for constructing key fragments which are composed into scope keys. - message FragmentBuilder { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder." - "FragmentBuilder"; - - // Specifies how the value of a header should be extracted. - // The following example maps the structure of a header to the fields in this message. - // - // .. code:: - // - // <0> <1> <-- index - // X-Header: a=b;c=d - // | || | - // | || \----> - // | || - // | |\----> - // | | - // | \----> - // | - // \----> - // - // Each 'a=b' key-value pair constitutes an 'element' of the header field. - message HeaderValueExtractor { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder." - "FragmentBuilder.HeaderValueExtractor"; - - // Specifies a header field's key value pair to match on. - message KvElement { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder." - "FragmentBuilder.HeaderValueExtractor.KvElement"; - - // The separator between key and value (e.g., '=' separates 'k=v;...'). - // If an element is an empty string, the element is ignored. - // If an element contains no separator, the whole element is parsed as key and the - // fragment value is an empty string. - // If there are multiple values for a matched key, the first value is returned. - string separator = 1 [(validate.rules).string = {min_len: 1}]; - - // The key to match on. - string key = 2 [(validate.rules).string = {min_len: 1}]; - } - - // The name of the header field to extract the value from. - // - // .. note:: - // - // If the header appears multiple times only the first value is used. - string name = 1 [ - (validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false} - ]; - - // The element separator (e.g., ';' separates 'a;b;c;d'). - // Default: empty string. This causes the entirety of the header field to be extracted. - // If this field is set to an empty string and 'index' is used in the oneof below, 'index' - // must be set to 0. - string element_separator = 2; - - oneof extract_type { - // Specifies the zero based index of the element to extract. - // Note Envoy concatenates multiple values of the same header key into a comma separated - // string, the splitting always happens after the concatenation. - uint32 index = 3; - - // Specifies the key value pair to extract the value from. - KvElement element = 4; - } - } - - oneof type { - option (validate.required) = true; - - // Specifies how a header field's value should be extracted. - HeaderValueExtractor header_value_extractor = 1; - } - } - - // The final(built) scope key consists of the ordered union of these fragments, which are compared in order with the - // fragments of a :ref:`ScopedRouteConfiguration`. - // A missing fragment during comparison will make the key invalid, i.e., the computed key doesn't match any key. - repeated FragmentBuilder fragments = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // The name assigned to the scoped routing configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The algorithm to use for constructing a scope key for each request. - ScopeKeyBuilder scope_key_builder = 2 [(validate.rules).message = {required: true}]; - - // Configuration source specifier for RDS. - // This config source is used to subscribe to RouteConfiguration resources specified in - // ScopedRouteConfiguration messages. - config.core.v3.ConfigSource rds_config_source = 3; - - oneof config_specifier { - option (validate.required) = true; - - // The set of routing scopes corresponding to the HCM. A scope is assigned to a request by - // matching a key constructed from the request's attributes according to the algorithm specified - // by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRouteConfigurationsList scoped_route_configurations_list = 4; - - // The set of routing scopes associated with the HCM will be dynamically loaded via the SRDS - // API. A scope is assigned to a request by matching a key constructed from the request's - // attributes according to the algorithm specified by the - // :ref:`ScopeKeyBuilder` - // in this message. - ScopedRds scoped_rds = 5; - } -} - -message ScopedRds { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.ScopedRds"; - - // Configuration source specifier for scoped RDS. - config.core.v3.ConfigSource scoped_rds_config_source = 1 - [(validate.rules).message = {required: true}]; - - // xdstp:// resource locator for scoped RDS collection. - // [#not-implemented-hide:] - string srds_resources_locator = 2; -} - -// [#next-free-field: 8] -message HttpFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.HttpFilter"; - - reserved 3, 2; - - reserved "config"; - - // The name of the filter configuration. It also serves as a resource name in ExtensionConfigDS. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - // - // To support configuring a :ref:`match tree `, use an - // :ref:`ExtensionWithMatcher ` - // with the desired HTTP filter. - // [#extension-category: envoy.filters.http] - google.protobuf.Any typed_config = 4; - - // Configuration source specifier for an extension configuration discovery service. - // In case of a failure and without the default configuration, the HTTP listener responds with code 500. - // Extension configs delivered through this mechanism are not expected to require warming (see https://github.com/envoyproxy/envoy/issues/12061). - // - // To support configuring a :ref:`match tree `, use an - // :ref:`ExtensionWithMatcher ` - // with the desired HTTP filter. This works for both the default filter configuration as well - // as for filters provided via the API. - config.core.v3.ExtensionConfigSource config_discovery = 5; - } - - // If true, clients that do not support this filter may ignore the - // filter but otherwise accept the config. - // Otherwise, clients that do not support this filter must reject the config. - bool is_optional = 6; - - // If true, the filter is disabled by default and must be explicitly enabled by setting - // per filter configuration in the route configuration. - // See :ref:`route based filter chain ` - // for more details. - // - // Terminal filters (e.g. ``envoy.filters.http.router``) cannot be marked as disabled. - bool disabled = 7; -} - -message RequestIDExtension { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension"; - - // Request ID extension specific configuration. - google.protobuf.Any typed_config = 1; -} - -// [#protodoc-title: Envoy Mobile HTTP connection manager] -// HTTP connection manager for use in Envoy mobile. -// [#extension: envoy.filters.network.envoy_mobile_http_connection_manager] -message EnvoyMobileHttpConnectionManager { - // The configuration for the underlying HttpConnectionManager which will be - // instantiated for Envoy mobile. - HttpConnectionManager config = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto b/src/main/proto/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto deleted file mode 100644 index 21ea6c4..0000000 --- a/src/main/proto/envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.local_ratelimit.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/v3/token_bucket.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.local_ratelimit.v3"; -option java_outer_classname = "LocalRateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/local_ratelimit/v3;local_ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Local rate limit] -// Local rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.network.local_ratelimit] - -message LocalRateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.local_rate_limit.v2alpha.LocalRateLimit"; - - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The token bucket configuration to use for rate limiting connections that are processed by the - // filter's filter chain. Each incoming connection processed by the filter consumes a single - // token. If the token is available, the connection will be allowed. If no tokens are available, - // the connection will be immediately closed. - // - // .. note:: - // In the current implementation each filter and filter chain has an independent rate limit, unless - // a shared rate limit is configured via :ref:`share_key `. - // - // .. note:: - // In the current implementation the token bucket's :ref:`fill_interval - // ` must be >= 50ms to avoid too aggressive - // refills. - type.v3.TokenBucket token_bucket = 2 [(validate.rules).message = {required: true}]; - - // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults - // to enabled. - config.core.v3.RuntimeFeatureFlag runtime_enabled = 3; - - // Specifies that the token bucket used for rate limiting should be shared with other local_rate_limit filters - // with a matching :ref:`token_bucket ` - // and ``share_key`` configuration. All fields of ``token_bucket`` must match exactly for the token bucket to be shared. If this - // field is empty, this filter will not share a token bucket with any other filter. - string share_key = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto b/src/main/proto/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto deleted file mode 100644 index 721f722..0000000 --- a/src/main/proto/envoy/extensions/filters/network/mongo_proxy/v3/mongo_proxy.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.mongo_proxy.v3; - -import "envoy/extensions/filters/common/fault/v3/fault.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.mongo_proxy.v3"; -option java_outer_classname = "MongoProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/mongo_proxy/v3;mongo_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Mongo proxy] -// MongoDB :ref:`configuration overview `. -// [#extension: envoy.filters.network.mongo_proxy] - -// [#next-free-field: 6] -message MongoProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.mongo_proxy.v2.MongoProxy"; - - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The optional path to use for writing Mongo access logs. If not access log - // path is specified no access logs will be written. Note that access log is - // also gated :ref:`runtime `. - string access_log = 2; - - // Inject a fixed delay before proxying a Mongo operation. Delays are - // applied to the following MongoDB operations: Query, Insert, GetMore, - // and KillCursors. Once an active delay is in progress, all incoming - // data up until the timer event fires will be a part of the delay. - common.fault.v3.FaultDelay delay = 3; - - // Flag to specify whether :ref:`dynamic metadata - // ` should be emitted. Defaults to false. - bool emit_dynamic_metadata = 4; - - // List of commands to emit metrics for. Defaults to "delete", "insert", and "update". - // Note that metrics will not be emitted for "find" commands, since those are considered - // queries, and metrics for those are emitted under a dedicated "query" namespace. - repeated string commands = 5; -} diff --git a/src/main/proto/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto b/src/main/proto/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto deleted file mode 100644 index 9e8ab8b..0000000 --- a/src/main/proto/envoy/extensions/filters/network/ratelimit/v3/rate_limit.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.ratelimit.v3; - -import "envoy/config/ratelimit/v3/rls.proto"; -import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.ratelimit.v3"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/ratelimit/v3;ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.network.ratelimit] - -// [#next-free-field: 7] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.rate_limit.v2.RateLimit"; - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The rate limit domain to use in the rate limit service request. - string domain = 2 [(validate.rules).string = {min_len: 1}]; - - // The rate limit descriptor list to use in the rate limit service request. - repeated common.ratelimit.v3.RateLimitDescriptor descriptors = 3 - [(validate.rules).repeated = {min_items: 1}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 4; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 5; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - config.ratelimit.v3.RateLimitServiceConfig rate_limit_service = 6 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/rbac/v3/rbac.proto b/src/main/proto/envoy/extensions/filters/network/rbac/v3/rbac.proto deleted file mode 100644 index a65bbab..0000000 --- a/src/main/proto/envoy/extensions/filters/network/rbac/v3/rbac.proto +++ /dev/null @@ -1,93 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.rbac.v3; - -import "envoy/config/rbac/v3/rbac.proto"; - -import "google/protobuf/duration.proto"; - -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.rbac.v3"; -option java_outer_classname = "RbacProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/rbac/v3;rbacv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RBAC] -// Role-Based Access Control :ref:`configuration overview `. -// [#extension: envoy.filters.network.rbac] - -// RBAC network filter config. -// -// Header should not be used in rules/shadow_rules in RBAC network filter as -// this information is only available in :ref:`RBAC http filter `. -// [#next-free-field: 9] -message RBAC { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.rbac.v2.RBAC"; - - enum EnforcementType { - // Apply RBAC policies when the first byte of data arrives on the connection. - ONE_TIME_ON_FIRST_BYTE = 0; - - // Continuously apply RBAC policies as data arrives. Use this mode when - // using RBAC with message oriented protocols such as Mongo, MySQL, Kafka, - // etc. when the protocol decoders emit dynamic metadata such as the - // resources being accessed and the operations on the resources. - CONTINUOUS = 1; - } - - // Specify the RBAC rules to be applied globally. - // If absent, no enforcing RBAC policy will be applied. - // If present and empty, DENY. - // If both rules and matcher are configured, rules will be ignored. - config.rbac.v3.RBAC rules = 1 - [(udpa.annotations.field_migrate).oneof_promotion = "rules_specifier"]; - - // The match tree to use when resolving RBAC action for incoming connections. Connections do - // not match any matcher will be denied. - // If absent, no enforcing RBAC matcher will be applied. - // If present and empty, deny all connections. - xds.type.matcher.v3.Matcher matcher = 6 - [(udpa.annotations.field_migrate).oneof_promotion = "rules_specifier"]; - - // Shadow rules are not enforced by the filter but will emit stats and logs - // and can be used for rule testing. - // If absent, no shadow RBAC policy will be applied. - // If both shadow rules and shadow matcher are configured, shadow rules will be ignored. - config.rbac.v3.RBAC shadow_rules = 2 - [(udpa.annotations.field_migrate).oneof_promotion = "shadow_rules_specifier"]; - - // The match tree to use for emitting stats and logs which can be used for rule testing for - // incoming connections. - // If absent, no shadow matcher will be applied. - xds.type.matcher.v3.Matcher shadow_matcher = 7 - [(udpa.annotations.field_migrate).oneof_promotion = "shadow_rules_specifier"]; - - // If specified, shadow rules will emit stats with the given prefix. - // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with - // shadow rules. - string shadow_rules_stat_prefix = 5; - - // The prefix to use when emitting statistics. - string stat_prefix = 3 [(validate.rules).string = {min_len: 1}]; - - // RBAC enforcement strategy. By default RBAC will be enforced only once - // when the first byte of data arrives from the downstream. When used in - // conjunction with filters that emit dynamic metadata after decoding - // every payload (e.g., Mongo, MySQL, Kafka) set the enforcement type to - // CONTINUOUS to enforce RBAC policies on every message boundary. - EnforcementType enforcement_type = 4; - - // Delay the specified duration before closing the connection when the policy evaluation - // result is ``DENY``. If this is not present, the connection will be closed immediately. - // This is useful to provide a better protection for Envoy against clients that retries - // aggressively when the connection is rejected by the RBAC filter. - google.protobuf.Duration delay_deny = 8; -} diff --git a/src/main/proto/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto b/src/main/proto/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto deleted file mode 100644 index f24ee63..0000000 --- a/src/main/proto/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto +++ /dev/null @@ -1,461 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.redis_proxy.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/grpc_service.proto"; -import "envoy/extensions/common/aws/v3/credential_provider.proto"; -import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.redis_proxy.v3"; -option java_outer_classname = "RedisProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/redis_proxy/v3;redis_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Redis Proxy] -// Redis Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.redis_proxy] - -// [#next-free-field: 12] -message RedisProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.redis_proxy.v2.RedisProxy"; - - // Redis connection pool settings. - // [#next-free-field: 11] - message ConnPoolSettings { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.redis_proxy.v2.RedisProxy.ConnPoolSettings"; - - // ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently - // supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data - // because replication is asynchronous and requires some delay. You need to ensure that your - // application can tolerate stale data. - enum ReadPolicy { - // Default mode. Read from the current primary node. - MASTER = 0 [(udpa.annotations.enum_value_migrate).rename = "PRIMARY"]; - - // Read from the primary, but if it is unavailable, read from replica nodes. - PREFER_MASTER = 1 [(udpa.annotations.enum_value_migrate).rename = "PREFER_PRIMARY"]; - - // Read from replica nodes. If multiple replica nodes are present within a shard, a random - // node is selected. Healthy nodes have precedent over unhealthy nodes. - REPLICA = 2; - - // Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not - // present or unhealthy), read from the primary. - PREFER_REPLICA = 3; - - // Read from any node of the cluster. A random node is selected among the primary and - // replicas, healthy nodes have precedent over unhealthy nodes. - ANY = 4; - } - - // Per-operation timeout in milliseconds. The timer starts when the first - // command of a pipeline is written to the backend connection. Each response received from Redis - // resets the timer since it signifies that the next command is being processed by the backend. - // The only exception to this behavior is when a connection to a backend is not yet established. - // In that case, the connect timeout on the cluster will govern the timeout until the connection - // is ready. - google.protobuf.Duration op_timeout = 1 [(validate.rules).duration = {required: true}]; - - // Use hash tagging on every redis key to guarantee that keys with the same hash tag will be - // forwarded to the same upstream. The hash key used for determining the upstream in a - // consistent hash ring configuration will be computed from the hash tagged key instead of the - // whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster - // implementation `_. - // - // Examples: - // - // * '{user1000}.following' and '{user1000}.followers' **will** be sent to the same upstream - // * '{user1000}.following' and '{user1001}.following' **might** be sent to the same upstream - bool enable_hashtagging = 2; - - // Accept `moved and ask redirection - // `_ errors from upstream - // redis servers, and retry commands to the specified target server. The target server does not - // need to be known to the cluster manager. If the command cannot be redirected, then the - // original error is passed downstream unchanged. By default, this support is not enabled. - bool enable_redirection = 3; - - // If ``enable_redirection`` is set to true this option configures the DNS cache that the - // connection pool will use to resolve hostnames that are returned with MOVED and ASK responses. - // If no configuration is provided, DNS lookups will not be performed (and thus the MOVED/ASK errors - // will be propagated verbatim to the user). - common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 9; - - // Maximum size of encoded request buffer before flush is triggered and encoded requests - // are sent upstream. If this is unset, the buffer flushes whenever it receives data - // and performs no batching. - // This feature makes it possible for multiple clients to send requests to Envoy and have - // them batched- for example if one is running several worker processes, each with its own - // Redis connection. There is no benefit to using this with a single downstream process. - // Recommended size (if enabled) is 1024 bytes. - uint32 max_buffer_size_before_flush = 4; - - // The encoded request buffer is flushed N milliseconds after the first request has been - // encoded, unless the buffer size has already exceeded ``max_buffer_size_before_flush``. - // If ``max_buffer_size_before_flush`` is not set, this flush timer is not used. Otherwise, - // the timer should be set according to the number of clients, overall request rate and - // desired maximum latency for a single command. For example, if there are many requests - // being batched together at a high rate, the buffer will likely be filled before the timer - // fires. Alternatively, if the request rate is lower the buffer will not be filled as often - // before the timer fires. - // If ``max_buffer_size_before_flush`` is set, but ``buffer_flush_timeout`` is not, the latter - // defaults to 3ms. - google.protobuf.Duration buffer_flush_timeout = 5; - - // ``max_upstream_unknown_connections`` controls how many upstream connections to unknown hosts - // can be created at any given time by any given worker thread (see ``enable_redirection`` for - // more details). If the host is unknown and a connection cannot be created due to enforcing - // this limit, then redirection will fail and the original redirection error will be passed - // downstream unchanged. This limit defaults to 100. - google.protobuf.UInt32Value max_upstream_unknown_connections = 6; - - // Enable per-command statistics per upstream cluster, in addition to the filter level aggregate - // count. These commands are measured in microseconds. - bool enable_command_stats = 8; - - // Read policy. The default is to read from the primary. - ReadPolicy read_policy = 7 [(validate.rules).enum = {defined_only: true}]; - - // Ops or connection timeout triggers reconnection to redis server which could result in reconnection - // storm to busy redis server. This config is a protection to rate limit reconnection rate. - // If not set, there will be no rate limiting on the reconnection. - ConnectionRateLimit connection_rate_limit = 10; - } - - message PrefixRoutes { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes"; - - // [#next-free-field: 7] - message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.Route"; - - // The router is capable of shadowing traffic from one cluster to another. The current - // implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to - // respond before returning the response from the primary cluster. All normal statistics are - // collected for the shadow cluster making this feature useful for testing. - message RequestMirrorPolicy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.redis_proxy.v2.RedisProxy.PrefixRoutes.Route." - "RequestMirrorPolicy"; - - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // If not specified or the runtime key is not present, all requests to the target cluster - // will be mirrored. - // - // If specified, Envoy will lookup the runtime key to get the percentage of requests to the - // mirror. - config.core.v3.RuntimeFractionalPercent runtime_fraction = 2; - - // Set this to TRUE to only mirror write commands, this is effectively replicating the - // writes in a "fire and forget" manner. - bool exclude_read_commands = 3; - } - - // ReadCommandPolicy specifies that Envoy should route read commands to another cluster. - message ReadCommandPolicy { - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - } - - // String prefix that must match the beginning of the keys. Envoy will always favor the - // longest match. - string prefix = 1 [(validate.rules).string = {max_bytes: 1000}]; - - // Indicates if the prefix needs to be removed from the key when forwarded. - bool remove_prefix = 2; - - // Upstream cluster to forward the command to. - string cluster = 3 [(validate.rules).string = {min_len: 1}]; - - // Indicates that the route has a request mirroring policy. - repeated RequestMirrorPolicy request_mirror_policy = 4; - - // Indicates how redis key should be formatted. To substitute redis key into the formatting - // expression, use %KEY% as a string replacement command. - string key_formatter = 5; - - // Indicates that the route has a read command policy - ReadCommandPolicy read_command_policy = 6; - } - - reserved 3; - - reserved "catch_all_cluster"; - - // List of prefix routes. - repeated Route routes = 1; - - // Indicates that prefix matching should be case insensitive. - bool case_insensitive = 2; - - // Optional catch-all route to forward commands that doesn't match any of the routes. The - // catch-all route becomes required when no routes are specified. - Route catch_all_route = 4; - } - - // RedisFault defines faults used for fault injection. - message RedisFault { - enum RedisFaultType { - // Delays requests. This is the base fault; other faults can have delays added. - DELAY = 0; - - // Returns errors on requests. - ERROR = 1; - } - - // Fault type. - RedisFaultType fault_type = 1 [(validate.rules).enum = {defined_only: true}]; - - // Percentage of requests fault applies to. - config.core.v3.RuntimeFractionalPercent fault_enabled = 2 - [(validate.rules).message = {required: true}]; - - // Delay for all faults. If not set, defaults to zero - google.protobuf.Duration delay = 3; - - // Commands fault is restricted to, if any. If not set, fault applies to all commands - // other than auth and ping (due to special handling of those commands in Envoy). - repeated string commands = 4; - } - - // Configuration to limit reconnection rate to redis server to protect redis server - // from client reconnection storm. - message ConnectionRateLimit { - // Reconnection rate per sec. Rate limiting is implemented with TokenBucket. - uint32 connection_rate_limit_per_sec = 1 [(validate.rules).uint32 = {gt: 0}]; - } - - reserved 2; - - reserved "cluster"; - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Network settings for the connection pool to the upstream clusters. - ConnPoolSettings settings = 3 [(validate.rules).message = {required: true}]; - - // Indicates that latency stat should be computed in microseconds. By default it is computed in - // milliseconds. This does not apply to upstream command stats currently. - bool latency_in_micros = 4; - - // List of **unique** prefixes used to separate keys from different workloads to different - // clusters. Envoy will always favor the longest match first in case of overlap. A catch-all - // cluster can be used to forward commands when there is no match. Time complexity of the - // lookups are in O(min(longest key prefix, key length)). - // - // Example: - // - // .. code-block:: yaml - // - // prefix_routes: - // routes: - // - prefix: "ab" - // cluster: "cluster_a" - // - prefix: "abc" - // cluster: "cluster_b" - // - // When using the above routes, the following prefixes would be sent to: - // - // * ``get abc:users`` would retrieve the key 'abc:users' from cluster_b. - // * ``get ab:users`` would retrieve the key 'ab:users' from cluster_a. - // * ``get z:users`` would return a NoUpstreamHost error. A :ref:`catch-all - // route` - // would have retrieved the key from that cluster instead. - // - // See the :ref:`configuration section - // ` of the architecture overview for recommendations on - // configuring the backing clusters. - PrefixRoutes prefix_routes = 5; - - // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis - // AUTH command `_ with this password before enabling any other - // command. If an AUTH command's password matches this password, an "OK" response will be returned - // to the client. If the AUTH command password does not match this password, then an "ERR invalid - // password" error will be returned. If any other command is received before AUTH when this - // password is set, then a "NOAUTH Authentication required." error response will be sent to the - // client. If an AUTH command is received when the password is not set, then an "ERR Client sent - // AUTH, but no password is set" error will be returned. - // - // .. attention:: - // This field is deprecated. Use :ref:`downstream_auth_passwords - // `. - config.core.v3.DataSource downstream_auth_password = 6 [ - deprecated = true, - (udpa.annotations.sensitive) = true, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis - // AUTH command `_ with one of these passwords before enabling any other - // command. If an AUTH command's password matches one of these passwords, an "OK" response will be returned - // to the client. If the AUTH command password does not match, then an "ERR invalid - // password" error will be returned. If any other command is received before AUTH when the - // password(s) are set, then a "NOAUTH Authentication required." error response will be sent to the - // client. If an AUTH command is received when the password is not set, then an "ERR Client sent - // AUTH, but no password is set" error will be returned. - repeated config.core.v3.DataSource downstream_auth_passwords = 9 - [(udpa.annotations.sensitive) = true]; - - // List of faults to inject. Faults currently come in two flavors: - // - Delay, which delays a request. - // - Error, which responds to a request with an error. Errors can also have delays attached. - // - // Example: - // - // .. code-block:: yaml - // - // faults: - // - fault_type: ERROR - // fault_enabled: - // default_value: - // numerator: 10 - // denominator: HUNDRED - // runtime_key: "bogus_key" - // commands: - // - GET - // - fault_type: DELAY - // fault_enabled: - // default_value: - // numerator: 10 - // denominator: HUNDRED - // runtime_key: "bogus_key" - // delay: 2s - // - // See the :ref:`fault injection section - // ` for more information on how to configure this. - repeated RedisFault faults = 8; - - // If a username is provided an ACL style AUTH command will be required with a username and password. - // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis - // AUTH command `_ with this username and the ``downstream_auth_password`` - // before enabling any other command. If an AUTH command's username and password matches this username - // and the ``downstream_auth_password`` , an "OK" response will be returned to the client. If the AUTH - // command username or password does not match this username or the ``downstream_auth_password``, then an - // "WRONGPASS invalid username-password pair" error will be returned. If any other command is received before AUTH when this - // password is set, then a "NOAUTH Authentication required." error response will be sent to the - // client. If an AUTH command is received when the password is not set, then an "ERR Client sent - // AUTH, but no ACL is set" error will be returned. - config.core.v3.DataSource downstream_auth_username = 7 [(udpa.annotations.sensitive) = true]; - - // External authentication configuration. If set, instead of validating username and password against ``downstream_auth_username`` and ``downstream_auth_password``, - // the filter will call an external gRPC service to authenticate the client. - // A typical usage of this feature is for situations where the password is a one-time token that needs to be validated against a remote service, like a sidecar. - // Expiration is also supported, which will disable any further commands from the client after the expiration time, unless a new AUTH command is received and the external auth service returns a new expiration time. - // If the external auth service returns an error, authentication is considered failed. - // If this setting is set together with ``downstream_auth_username`` and ``downstream_auth_password``, the external auth service will be source of truth, but those fields will still be used for downstream authentication to the cluster. - // The API is defined by :ref:`RedisProxyExternalAuthRequest `. - RedisExternalAuthProvider external_auth_provider = 10; - - // Optional configure redis custom commands for the proxy, eg -> ["my_custom_cmd1", "my_custom_cmd2"] - // - // .. note:: - // The is to support redis's feature wherein new commands can be added using redis' modules api: - // https://redis.io/docs/latest/develop/reference/modules/ - repeated string custom_commands = 11; -} - -// RedisProtocolOptions specifies Redis upstream protocol options. This object is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name ``envoy.filters.network.redis_proxy``. -message RedisProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.redis_proxy.v2.RedisProtocolOptions"; - - message Credential { - // The address to which this username and password applies. - config.core.v3.Address address = 1; - - // Upstream server password as defined by the ``requirepass`` directive - // ``_ in the server's configuration file. - config.core.v3.DataSource auth_password = 2 [(udpa.annotations.sensitive) = true]; - - // Upstream server username as defined by the ``user`` directive - // ``_ in the server's configuration file. - config.core.v3.DataSource auth_username = 3 [(udpa.annotations.sensitive) = true]; - } - - // Upstream server password as defined by the ``requirepass`` directive - // ``_ in the server's configuration file. - // If ``aws_iam`` is set, this field is ignored. - config.core.v3.DataSource auth_password = 1 [(udpa.annotations.sensitive) = true]; - - // Upstream server username as defined by the ``user`` directive - // ``_ in the server's configuration file. - // If ``aws_iam``` is set, this field will be used as the authenticating user for redis IAM authentication. - // See ``Create a new IAM-enabled user`` under `Setup `_ for more details. - config.core.v3.DataSource auth_username = 2 [(udpa.annotations.sensitive) = true]; - - // The cluster level configuration for AWS IAM authentication - AwsIam aws_iam = 3; - - // If specified, these credentials are used when connecting to upstream endpoints. Which - // credential is used is determined by matching the resolved ``address`` field here with each - // endpoint's resolved ``address`` field. The first entry for a given ``address`` here takes precedence. - // If no entry in ``credentials`` matches, then the ``auth_password`` and ``auth_username`` fields - // are used as defaults. - repeated Credential credentials = 4; -} - -// [#next-free-field: 6] -message AwsIam { - // An AwsCredentialProvider, allowing the use of a specific credential provider chain or specific provider settings - common.aws.v3.AwsCredentialProvider credential_provider = 1; - - // The name of the cache, used when generating the authentication token. - string cache_name = 2 [(validate.rules).string = {min_len: 1}]; - - // The optional service name to be used in AWS IAM authentication. If not provided, the service name will be set to ``elasticache``. For Amazon MemoryDB - // the service name should be set to ``memorydb``. - string service_name = 3; - - // The optional AWS region that your cache is located in. If not provided, the region will be deduced using the region provider chain - // as described in :ref:`config_http_filters_aws_request_signing_region`. - string region = 4; - - // Number of seconds before the IAM authentication token will expire. If not set, defaults to 60s (1 minute). Maximum of 900s (15 minutes) - // Expiration of the current authentication token will automatically trigger generation of a new token. - // As envoy will automatically continue to generate new tokens as required, there is no substantial benefit to using a long expiration value here. - google.protobuf.Duration expiration_time = 5 [(validate.rules).duration = { - lte {seconds: 900} - gte {} - }]; -} - -// RedisExternalAuthProvider specifies a gRPC service that can be used to authenticate Redis clients. -// This service will be called every time an AUTH command is received from a client. -// If the service returns an error, authentication is considered failed. -// If the service returns a success, the client is considered authenticated. -// The service can also return an expiration timestamp, which will be used to disable any further -// commands from the client after it passes, unless a new AUTH command is received and the -// external auth service returns a new expiration timestamp. -message RedisExternalAuthProvider { - // External auth gRPC service configuration. - // It will be called every time an AUTH command is received from a client. - config.core.v3.GrpcService grpc_service = 1; - - // If set to true, the filter will expect an expiration timestamp in the response from the external - // auth service. This timestamp will be used to disable any further commands from the client after - // the expiration time, unless a new AUTH command is received and the external auth service returns - // a new expiration timestamp. - bool enable_auth_expiration = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/network/reverse_tunnel/v3/reverse_tunnel.proto b/src/main/proto/envoy/extensions/filters/network/reverse_tunnel/v3/reverse_tunnel.proto deleted file mode 100644 index 98e9b72..0000000 --- a/src/main/proto/envoy/extensions/filters/network/reverse_tunnel/v3/reverse_tunnel.proto +++ /dev/null @@ -1,122 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.reverse_tunnel.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.reverse_tunnel.v3"; -option java_outer_classname = "ReverseTunnelProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/reverse_tunnel/v3;reverse_tunnelv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Reverse Tunnel Network Filter] -// Reverse Tunnel Network Filter :ref:`configuration overview `. -// [#extension: envoy.filters.network.reverse_tunnel] - -// Validation configuration for reverse tunnel identifiers. -// Validates the node ID and cluster ID extracted from reverse tunnel handshake headers -// against expected values specified using format strings. -message Validation { - // Format string to extract the expected node identifier for validation. - // The formatted value is compared against the ``x-envoy-reverse-tunnel-node-id`` header - // from the incoming handshake request. If they do not match, the connection is rejected - // with HTTP ``403 Forbidden``. - // - // Supports Envoy's :ref:`command operators `: - // - // * ``%DYNAMIC_METADATA(namespace:key)%``: Extract expected value from dynamic metadata. - // * ``%FILTER_STATE(key)%``: Extract expected value from filter state. - // * ``%DOWNSTREAM_REMOTE_ADDRESS%``: Use downstream connection IP address. - // * Plain strings: Use a static expected value. - // - // If empty, node ID validation is skipped. - // - // Example using dynamic metadata allowlist: - // - // .. code-block:: yaml - // - // node_id_format: "%DYNAMIC_METADATA(envoy.reverse_tunnel.allowlist:expected_node_id)%" - // - string node_id_format = 1 [(validate.rules).string = {max_len: 1024}]; - - // Format string to extract the expected cluster identifier for validation. - // The formatted value is compared against the ``x-envoy-reverse-tunnel-cluster-id`` header - // from the incoming handshake request. If they do not match, the connection is rejected - // with HTTP ``403 Forbidden``. - // - // Supports the same :ref:`command operators ` as - // ``node_id_format``. - // - // If empty, cluster ID validation is skipped. - // - // Example using filter state: - // - // .. code-block:: yaml - // - // cluster_id_format: "%FILTER_STATE(expected_cluster_id)%" - // - string cluster_id_format = 2 [(validate.rules).string = {max_len: 1024}]; - - // Whether to emit validation results as dynamic metadata. - // When enabled, the filter emits metadata under the namespace specified by - // ``dynamic_metadata_namespace`` containing: - // - // * ``node_id``: The actual node ID from the handshake request. - // * ``cluster_id``: The actual cluster ID from the handshake request. - // * ``validation_result``: Either ``allowed`` or ``denied``. - // - // This metadata can be used by subsequent filters or for access logging. - // Defaults to ``false``. - bool emit_dynamic_metadata = 3; - - // Namespace for emitted dynamic metadata when ``emit_dynamic_metadata`` is ``true``. - // If not specified, defaults to ``envoy.filters.network.reverse_tunnel``. - string dynamic_metadata_namespace = 4 [(validate.rules).string = {max_len: 255}]; -} - -// Configuration for the reverse tunnel network filter. -// This filter handles reverse tunnel connection acceptance and rejection by processing -// HTTP requests where required identification values are provided via HTTP headers. -// [#next-free-field: 7] -message ReverseTunnel { - // Ping interval for health checks on established reverse tunnel connections. - // If not specified, defaults to ``2 seconds``. - google.protobuf.Duration ping_interval = 1 [(validate.rules).duration = { - lte {seconds: 300} - gte {nanos: 1000000} - }]; - - // Whether to automatically close connections after processing reverse tunnel requests. - // - // * When set to ``true``, connections are closed after acceptance or rejection. - // * When set to ``false``, connections remain open for potential reuse. - // - // Defaults to ``false``. - bool auto_close_connections = 2; - - // HTTP path to match for reverse tunnel requests. - // If not specified, defaults to ``/reverse_connections/request``. - string request_path = 3 [(validate.rules).string = {min_len: 1 max_len: 255 ignore_empty: true}]; - - // HTTP method to match for reverse tunnel requests. - // If not specified (``METHOD_UNSPECIFIED``), this defaults to ``GET``. - config.core.v3.RequestMethod request_method = 4 [(validate.rules).enum = {defined_only: true}]; - - // Optional validation configuration for node and cluster identifiers. - // If specified, the filter validates the ``x-envoy-reverse-tunnel-node-id`` and - // ``x-envoy-reverse-tunnel-cluster-id`` headers against expected values extracted - // using format strings. Requests that fail validation are rejected with HTTP ``403 Forbidden``. - Validation validation = 5; - - // Required cluster name for validating reverse tunnel connection initiations. - // When set, the filter validates that the upstream cluster of the initiator envoy matches this name - // via ``x-envoy-reverse-tunnel-upstream-cluster-name`` header. Connections with mismatched or missing - // cluster names are rejected with HTTP ``400 Bad Request``. When empty, no cluster name validation is performed. - string required_cluster_name = 6 [(validate.rules).string = {max_len: 255 ignore_empty: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/set_filter_state/v3/set_filter_state.proto b/src/main/proto/envoy/extensions/filters/network/set_filter_state/v3/set_filter_state.proto deleted file mode 100644 index f4be26f..0000000 --- a/src/main/proto/envoy/extensions/filters/network/set_filter_state/v3/set_filter_state.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.set_filter_state.v3; - -import "envoy/extensions/filters/common/set_filter_state/v3/value.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.set_filter_state.v3"; -option java_outer_classname = "SetFilterStateProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/set_filter_state/v3;set_filter_statev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Set-Filter-State Filter] -// -// This filter sets or updates the dynamic filter state. See :ref:`the filter -// documentation ` for more -// information on how this filter should be used. -// -// [#extension: envoy.filters.network.set_filter_state] - -message Config { - // A sequence of the filter state values to apply in the specified order - // when a new connection is received. - repeated common.set_filter_state.v3.FilterStateValue on_new_connection = 1; - - // A sequence of the filter state values to apply in the specified order - // when the downstream TLS handshake is complete. - // - // For non-TLS downstream connections (where there is no TLS handshake), this - // list is applied when a new connection is received. - repeated common.set_filter_state.v3.FilterStateValue on_downstream_tls_handshake = 2; -} diff --git a/src/main/proto/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto b/src/main/proto/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto deleted file mode 100644 index 15eae78..0000000 --- a/src/main/proto/envoy/extensions/filters/network/sni_cluster/v3/sni_cluster.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.sni_cluster.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_cluster.v3"; -option java_outer_classname = "SniClusterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sni_cluster/v3;sni_clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SNI Cluster Filter] -// Set the upstream cluster name from the SNI field in the TLS connection. -// [#extension: envoy.filters.network.sni_cluster] - -message SniCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.sni_cluster.v2.SniCluster"; -} diff --git a/src/main/proto/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto b/src/main/proto/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto deleted file mode 100644 index 0f01889..0000000 --- a/src/main/proto/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3/sni_dynamic_forward_proxy.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3; - -import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3"; -option java_outer_classname = "SniDynamicForwardProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3;sni_dynamic_forward_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SNI dynamic forward proxy] - -// Configuration for the SNI-based dynamic forward proxy filter. See the -// :ref:`architecture overview ` for -// more information. Note this filter must be configured along with -// :ref:`TLS inspector listener filter ` -// to work. -// [#extension: envoy.filters.network.sni_dynamic_forward_proxy] -message FilterConfig { - // The DNS cache configuration that the filter will attach to. Note this - // configuration must match that of associated :ref:`dynamic forward proxy - // cluster configuration - // `. - common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1 - [(validate.rules).message = {required: true}]; - - oneof port_specifier { - // The port number to connect to the upstream. - uint32 port_value = 2 [(validate.rules).uint32 = {lte: 65535 gt: 0}]; - } - - // When this flag is set, the filter will add the resolved upstream address in the filter - // state. The state should be saved with key - // ``envoy.stream.upstream_address`` (See - // :repo:`upstream_address.h`). - bool save_upstream_address = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto b/src/main/proto/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto deleted file mode 100644 index ff21568..0000000 --- a/src/main/proto/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto +++ /dev/null @@ -1,367 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.tcp_proxy.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/backoff.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/proxy_protocol.proto"; -import "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto"; -import "envoy/type/v3/hash_policy.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.tcp_proxy.v3"; -option java_outer_classname = "TcpProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/tcp_proxy/v3;tcp_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: TCP Proxy] -// TCP Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.tcp_proxy] - -// Specifies when the TCP proxy establishes the upstream connection. -enum UpstreamConnectMode { - // Establish the upstream connection immediately when the downstream connection is accepted. - // This is the default behavior and provides the lowest latency. - IMMEDIATE = 0; - - // Wait for initial data from the downstream connection before establishing the upstream connection. - // This allows preceding filters to inspect the initial data (e.g., extracting SNI from TLS ClientHello) - // before the upstream connection is established. - // - // This mode requires ``max_early_data_bytes`` to be set. - // - // .. warning:: - // This mode is not suitable for server-first protocols (e.g., SMTP, MySQL, POP3) where the - // server sends the initial greeting. For such protocols, use ``IMMEDIATE`` mode. - ON_DOWNSTREAM_DATA = 1; - - // Wait for the downstream TLS handshake to complete before establishing the upstream connection. - // This allows access to the full TLS connection information, including client certificates - // and negotiated parameters, which can be used for routing decisions or passed as metadata - // to the upstream. - // - // .. note:: - // This mode is only effective when the downstream connection uses TLS. For non-TLS - // connections, it behaves the same as ``IMMEDIATE``. - ON_DOWNSTREAM_TLS_HANDSHAKE = 2; -} - -// [#next-free-field: 23] -message TcpProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.tcp_proxy.v2.TcpProxy"; - - // Allows specification of multiple upstream clusters along with weights indicating the percentage of - // traffic forwarded to each cluster. The cluster selection is based on these weights. - message WeightedCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster"; - - message ClusterWeight { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.WeightedCluster.ClusterWeight"; - - // Name of the upstream cluster. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // When a request matches the route, the choice of an upstream cluster is - // determined by its weight. The sum of weights across all entries in the - // clusters array determines the total weight. - uint32 weight = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what is set in this field will be considered - // for load balancing. Note that this will be merged with what's provided in - // :ref:`TcpProxy.metadata_match - // `, with values - // here taking precedence. The filter name should be specified as ``envoy.lb``. - config.core.v3.Metadata metadata_match = 3; - } - - // Specifies the upstream clusters associated with this configuration. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - // Configuration for tunneling TCP over other transports or application layers. - // Tunneling is supported over HTTP/1.1 and HTTP/2. The upstream protocol is - // determined by the cluster configuration. - // [#next-free-field: 10] - message TunnelingConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.tcp_proxy.v2.TcpProxy.TunnelingConfig"; - - // The hostname to send in the synthesized CONNECT headers to the upstream proxy. - // This field evaluates command operators if present; otherwise, the value is used as-is. - // - // For example, dynamically set the hostname using downstream SNI: - // - // .. code-block:: yaml - // - // tunneling_config: - // hostname: "%REQUESTED_SERVER_NAME%:443" - // - // For example, dynamically set the hostname using dynamic metadata: - // - // .. code-block:: yaml - // - // tunneling_config: - // hostname: "%DYNAMIC_METADATA(tunnel:address)%" - // - string hostname = 1 [(validate.rules).string = {min_len: 1}]; - - // Use the ``POST`` method instead of the ``CONNECT`` method to tunnel the TCP stream. - // The ``protocol: bytestream`` header is not set for HTTP/2 to comply with the specification. - // - // The upstream proxy is expected to interpret the POST payload as raw TCP. - bool use_post = 2; - - // Additional request headers to send to the upstream proxy. This is mainly used to - // trigger the upstream to convert POST requests back to CONNECT requests. - // - // Neither ``:``-prefixed pseudo-headers like ``:path`` nor the ``host`` header can be overridden. - repeated config.core.v3.HeaderValueOption headers_to_add = 3 - [(validate.rules).repeated = {max_items: 1000}]; - - // Save response headers to the downstream connection's filter state for consumption - // by network filters. The filter state key is ``envoy.tcp_proxy.propagate_response_headers``. - bool propagate_response_headers = 4; - - // The path used with the POST method. The default path is ``/``. If this field is specified and - // :ref:`use_post field ` - // is not set to true, the configuration will be rejected. - string post_path = 5; - - // Save response trailers to the downstream connection's filter state for consumption - // by network filters. The filter state key is ``envoy.tcp_proxy.propagate_response_trailers``. - bool propagate_response_trailers = 6; - - // The configuration of the request ID extension used for generation, validation, and - // associated tracing operations when tunneling. - // - // If this field is set, a request ID is generated using the specified extension. If - // this field is not set, no request ID is generated. - // - // When a request ID is generated, it is also stored in the downstream connection's - // dynamic metadata under the namespace ``envoy.filters.network.tcp_proxy`` with the key - // ``tunnel_request_id`` to allow emission from TCP proxy access logs via the - // ``%DYNAMIC_METADATA(envoy.filters.network.tcp_proxy:tunnel_request_id)%`` formatter. - // [#extension-category: envoy.request_id] - http_connection_manager.v3.RequestIDExtension request_id_extension = 7; - - // The request header name to use for emitting the generated request ID on the tunneling - // HTTP request. - // - // If not specified or set to an empty string, the default header name ``x-request-id`` is - // used. - // - // .. note:: - // This setting does not alter the internal request ID handling elsewhere in Envoy and - // only controls the header emitted on the tunneling request. - string request_id_header = 8; - - // The dynamic metadata key to use when storing the generated request ID. The metadata is - // stored under the namespace ``envoy.filters.network.tcp_proxy``. - // - // If not specified or set to an empty string, the default key ``tunnel_request_id`` is used. - // This enables customizing the key used by access log formatters such as - // ``%DYNAMIC_METADATA(envoy.filters.network.tcp_proxy:)%``. - string request_id_metadata_key = 9; - } - - message OnDemand { - // Optional configuration for the on-demand cluster discovery service. - // If not specified, on-demand cluster discovery is disabled. When specified, the filter pauses a request - // to an unknown cluster and begins a cluster discovery process. When discovery completes (successfully - // or not), the request is resumed. - config.core.v3.ConfigSource odcds_config = 1; - - // xdstp:// resource locator for on-demand cluster collection. - // [#not-implemented-hide:] - string resources_locator = 2; - - // The timeout for on-demand cluster lookup. If the CDS cannot return the required cluster, - // the downstream request will be closed with the error code detail NO_CLUSTER_FOUND. - // [#not-implemented-hide:] - google.protobuf.Duration timeout = 3; - } - - message TcpAccessLogOptions { - // The interval for flushing access logs. By default, the TCP proxy flushes a single access log when the - // connection is closed. If this field is set, the TCP proxy flushes access logs periodically at the - // specified interval. - // The interval must be at least 1ms. - google.protobuf.Duration access_log_flush_interval = 1 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // If set to true, the access log is flushed when the TCP proxy successfully establishes a - // connection with the upstream. If the connection fails, the access log is not flushed. - bool flush_access_log_on_connected = 2; - } - - reserved 6; - - reserved "deprecated_v1"; - - // The prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - oneof cluster_specifier { - option (validate.required) = true; - - // The upstream cluster to connect to. - string cluster = 2; - - // Multiple upstream clusters can be specified. The request is routed to one of the upstream clusters - // based on the weights assigned to each cluster. - WeightedCluster weighted_clusters = 10; - } - - // The on demand policy for the upstream cluster. - // It applies to both - // :ref:`TcpProxy.cluster ` - // and - // :ref:`TcpProxy.weighted_clusters `. - OnDemand on_demand = 14; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints - // in the upstream cluster with metadata matching what is set in this field will be considered - // for load balancing. The filter name should be specified as ``envoy.lb``. - config.core.v3.Metadata metadata_match = 9; - - // The idle timeout for connections managed by the TCP proxy filter. The idle timeout is defined as the - // period in which there are no bytes sent or received on either the upstream or downstream connection. - // If not set, the default idle timeout is 1 hour. If set to ``0s``, the timeout is disabled. - // It is possible to dynamically override this configuration by setting a per-connection filter state - // object for the key ``envoy.tcp_proxy.per_connection_idle_timeout_ms``. - // - // .. warning:: - // Disabling this timeout is likely to yield connection leaks due to lost TCP FIN packets, etc. - google.protobuf.Duration idle_timeout = 8; - - // [#not-implemented-hide:] The idle timeout for connections managed by the TCP proxy - // filter. The idle timeout is defined as the period in which there is no - // active traffic. If not set, there is no idle timeout. When the idle timeout - // is reached the connection will be closed. The distinction between - // downstream_idle_timeout/upstream_idle_timeout provides a means to set - // timeout based on the last byte sent on the downstream/upstream connection. - google.protobuf.Duration downstream_idle_timeout = 3; - - // [#not-implemented-hide:] - google.protobuf.Duration upstream_idle_timeout = 4; - - // Configuration for :ref:`access logs ` emitted by this TCP proxy. - repeated config.accesslog.v3.AccessLog access_log = 5; - - // The maximum number of unsuccessful connection attempts that will be made before - // giving up. If the parameter is not specified, 1 connection attempt will be made. - google.protobuf.UInt32Value max_connect_attempts = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Sets the backoff strategy. If not set, the retries are performed without backoff. - config.core.v3.BackoffStrategy backoff_options = 18; - - // Optional configuration for TCP proxy hash policy. If hash_policy is not set, the hash-based - // load balancing algorithms will select a host randomly. Currently the number of hash policies is - // limited to 1. - repeated type.v3.HashPolicy hash_policy = 11 [(validate.rules).repeated = {max_items: 1}]; - - // If set, this configures tunneling, for example configuration options to tunnel TCP payload over - // HTTP CONNECT. If this message is absent, the payload is proxied upstream as usual. - // It is possible to dynamically override this configuration and disable tunneling per connection by - // setting a per-connection filter state object for the key ``envoy.tcp_proxy.disable_tunneling``. - TunnelingConfig tunneling_config = 12; - - // The maximum duration of a connection. The duration is defined as the period since a connection was - // established. If not set, there is no maximum duration. When ``max_downstream_connection_duration`` is - // reached, the connection is closed. The duration must be at least ``1ms``. - google.protobuf.Duration max_downstream_connection_duration = 13 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // Percentage-based jitter for ``max_downstream_connection_duration``. The jitter increases the - // ``max_downstream_connection_duration`` by a random duration up to the provided percentage. - // This field is ignored if ``max_downstream_connection_duration`` is not set. If not set, no jitter - // is added. - type.v3.Percent max_downstream_connection_duration_jitter_percentage = 20; - - // If both this field and :ref:`access_log_flush_interval - // ` - // are specified, the former (deprecated field) is ignored. - // - // .. attention:: - // This field is deprecated in favor of - // :ref:`access_log_flush_interval - // `. - google.protobuf.Duration access_log_flush_interval = 15 [ - deprecated = true, - (validate.rules).duration = {gte {nanos: 1000000}}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If both this field and :ref:`flush_access_log_on_connected - // ` - // are specified, the former (deprecated field) is ignored. - // - // .. attention:: - // This field is deprecated in favor of - // :ref:`flush_access_log_on_connected - // `. - bool flush_access_log_on_connected = 16 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Additional access log options for the TCP proxy. - TcpAccessLogOptions access_log_options = 17; - - // If set, the specified ``PROXY`` protocol TLVs (Type-Length-Value) are added to the ``PROXY`` protocol state - // created by the TCP proxy filter. These TLVs are sent in the PROXY protocol v2 header to the upstream. - // - // This field only takes effect when the TCP proxy filter is creating new ``PROXY`` protocol state and an - // upstream proxy protocol transport socket is configured in the cluster. If the connection already - // contains ``PROXY`` protocol state (including any TLVs) parsed by a downstream proxy protocol listener - // upstream proxy protocol transport socket is configured in the cluster. If the connection already - // contains PROXY protocol state (including any TLVs) parsed by a downstream proxy protocol listener - // filter, the TLVs specified here are ignored. - // - // .. note:: - // To ensure the specified TLVs are allowed in the upstream ``PROXY`` protocol header, you must also - // configure passthrough TLVs on the upstream proxy protocol transport. See - // :ref:`core.v3.ProxyProtocolConfig.pass_through_tlvs ` - // for details. - repeated config.core.v3.TlvEntry proxy_protocol_tlvs = 19; - - // Specifies when to establish the upstream connection. - // - // When not specified, defaults to ``IMMEDIATE`` for backward compatibility. - // - // .. attention:: - // Server-first protocols (e.g., SMTP, MySQL, POP3) require ``IMMEDIATE`` mode. - UpstreamConnectMode upstream_connect_mode = 21 [(validate.rules).enum = {defined_only: true}]; - - // Maximum bytes of early data to buffer from the downstream connection before - // the upstream connection is established. - // - // If not set, the TCP proxy will read-disable the downstream connection until the - // upstream connection is established (legacy behavior). - // - // If set, enables ``receive_before_connect`` mode where the filter allows the filter - // chain to read downstream data before the upstream connection exists. The data is - // buffered and forwarded once the upstream connection is ready. When the buffer exceeds - // this limit, the downstream connection is read-disabled to prevent excessive memory usage. - // - // This field is required when ``upstream_connect_mode`` is ``ON_DOWNSTREAM_DATA``. - // - // .. note:: - // Use this carefully with server-first protocols. The upstream may send data before - // receiving anything from downstream, which could fill the early data buffer. - google.protobuf.UInt32Value max_early_data_bytes = 22 [(validate.rules).uint32 = {lte: 1048576}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto b/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto deleted file mode 100644 index 2f1e0b2..0000000 --- a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3; - -import "envoy/type/matcher/v3/regex.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3"; -option java_outer_classname = "HeaderToMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3;header_to_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Header-To-Metadata Filter] -// -// The configuration for transforming headers into metadata. This is useful -// for matching load balancer subsets, logging, etc. -// -// Header to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.header_to_metadata] - -message HeaderToMetadata { - enum ValueType { - STRING = 0; - - NUMBER = 1; - - // The value is a serialized `protobuf.Value - // `_. - PROTOBUF_VALUE = 2; - } - - // ValueEncode defines the encoding algorithm. - enum ValueEncode { - // The value is not encoded. - NONE = 0; - - // The value is encoded in `Base64 `_. - // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the - // non-ASCII characters in the header. - BASE64 = 1; - } - - // [#next-free-field: 7] - message KeyValuePair { - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - - oneof value_type { - // The value to pair with the given key. - // - // When used for on_present case, if value is non-empty it'll be used instead - // of the header value. If both are empty, the header value is used as-is. - // - // When used for on_missing case, a non-empty value must be provided. - string value = 3; - - // If present, the header's value will be matched and substituted with this. - // If there is no match or substitution, the header value is used as-is. - // - // This is only used for on_present. - type.matcher.v3.RegexMatchAndSubstitute regex_value_rewrite = 4; - } - - // The value's type — defaults to string. - ValueType type = 5 [(validate.rules).enum = {defined_only: true}]; - - // How is the value encoded, default is NONE (not encoded). - // The value will be decoded accordingly before storing to metadata. - ValueEncode encode = 6; - } - - // A Rule defines what metadata to apply when a header is present or missing. - message Rule { - // Specifies that a match will be performed on the value of a header. - // - // The header to be extracted. - string header = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // If the header is present, apply this metadata KeyValuePair. - // - // If the value in the KeyValuePair is non-empty, it'll be used instead - // of the header value. - KeyValuePair on_present = 2; - - // If the header is not present, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set, since it'll be used in lieu - // of the missing header value. - KeyValuePair on_missing = 3; - - // Whether or not to remove the header after a rule is applied. - // - // This prevents headers from leaking. - bool remove = 4; - } - - // The list of rules to apply to requests. - repeated Rule request_rules = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/payload_to_metadata/v3/payload_to_metadata.proto b/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/payload_to_metadata/v3/payload_to_metadata.proto deleted file mode 100644 index 894df76..0000000 --- a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/payload_to_metadata/v3/payload_to_metadata.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.filters.payload_to_metadata.v3; - -import "envoy/type/matcher/v3/regex.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.filters.payload_to_metadata.v3"; -option java_outer_classname = "PayloadToMetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/filters/payload_to_metadata/v3;payload_to_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Payload-To-Metadata Filter] -// -// The configuration for transforming payloads into metadata. This is useful -// for matching load balancer subsets, logging, etc. -// -// Payload to Metadata :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.payload_to_metadata] - -message PayloadToMetadata { - enum ValueType { - STRING = 0; - NUMBER = 1; - } - - // [#next-free-field: 6] - message KeyValuePair { - // The namespace — if this is empty, the filter's namespace will be used. - string metadata_namespace = 1; - - // The key to use within the namespace. - string key = 2 [(validate.rules).string = {min_len: 1}]; - - oneof value_type { - // The value to pair with the given key. - // - // When used for on_present case, if value is non-empty it'll be used instead - // of the field value. If both are empty, the field value is used as-is. - // - // When used for on_missing case, a non-empty value must be provided. - string value = 3; - - // If present, the header's value will be matched and substituted with this. - // If there is no match or substitution, the field value is used as-is. - // - // This is only used for on_present. - type.matcher.v3.RegexMatchAndSubstitute regex_value_rewrite = 4; - } - - // The value's type — defaults to string. - ValueType type = 5 [(validate.rules).enum = {defined_only: true}]; - } - - // A Rule defines what metadata to apply when a field is present or missing. - // [#next-free-field: 6] - message Rule { - oneof match_specifier { - option (validate.required) = true; - - // If specified, the route must exactly match the request method name. As a special case, - // an empty string matches any request method name. - string method_name = 1; - - // If specified, the route must have the service name as the request method name prefix. - // As a special case, an empty string matches any service name. Only relevant when service - // multiplexing. - string service_name = 2; - } - - // Specifies that a match will be performed on the value of a field. - FieldSelector field_selector = 3 [(validate.rules).message = {required: true}]; - - // If the field is present, apply this metadata KeyValuePair. - KeyValuePair on_present = 4; - - // If the field is missing, apply this metadata KeyValuePair. - // - // The value in the KeyValuePair must be set, since it'll be used in lieu - // of the missing field value. - KeyValuePair on_missing = 5; - } - - message FieldSelector { - // field name to log - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // field id to match - int32 id = 2 [(validate.rules).int32 = {lte: 32767 gte: -32768}]; - - // next node of the field selector - FieldSelector child = 3; - } - - // The list of rules to apply to requests. - repeated Rule request_rules = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto b/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto deleted file mode 100644 index e92b0c6..0000000 --- a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3; - -import "envoy/config/ratelimit/v3/rls.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3"; -option java_outer_classname = "RateLimitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3;ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rate limit] -// Rate limit :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.rate_limit] - -// [#next-free-field: 6] -message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.thrift.rate_limit.v2alpha1.RateLimit"; - - // The rate limit domain to use in the rate limit service request. - string domain = 1 [(validate.rules).string = {min_len: 1}]; - - // Specifies the rate limit configuration stage. Each configured rate limit filter performs a - // rate limit check using descriptors configured in the - // :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.RouteAction` for the request. - // Only those entries with a matching stage number are used for a given filter. If not set, the - // default stage number is 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - uint32 stage = 2 [(validate.rules).uint32 = {lte: 10}]; - - // The timeout in milliseconds for the rate limit service RPC. If not - // set, this defaults to 20ms. - google.protobuf.Duration timeout = 3; - - // The filter's behaviour in case the rate limiting service does - // not respond back. When it is set to true, Envoy will not allow traffic in case of - // communication failure between rate limiting service and the proxy. - // Defaults to false. - bool failure_mode_deny = 4; - - // Configuration for an external rate limit service provider. If not - // specified, any calls to the rate limit service will immediately return - // success. - config.ratelimit.v3.RateLimitServiceConfig rate_limit_service = 5 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto b/src/main/proto/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto deleted file mode 100644 index a9cb47f..0000000 --- a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.router.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.router.v3"; -option java_outer_classname = "RouterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/router/v3;routerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Router] -// Thrift router :ref:`configuration overview `. -// [#extension: envoy.filters.thrift.router] - -message Router { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.thrift.router.v2alpha1.Router"; - - // Close downstream connection in case of routing or upstream connection problem. Default: true - google.protobuf.BoolValue close_downstream_on_upstream_error = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/v3/route.proto b/src/main/proto/envoy/extensions/filters/network/thrift_proxy/v3/route.proto deleted file mode 100644 index 77ba470..0000000 --- a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/v3/route.proto +++ /dev/null @@ -1,203 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/v3;thrift_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Thrift Proxy Route Configuration] -// Thrift Proxy :ref:`configuration overview `. - -message RouteConfiguration { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.RouteConfiguration"; - - // The name of the route configuration. This name is used in asynchronous route discovery. - // For example, it might match - // :ref:`route_config_name - // ` in - // :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.Trds`. - string name = 1; - - // The list of routes that will be matched, in order, against incoming requests. The first route - // that matches will be used. - repeated Route routes = 2; - - // An optional boolean that specifies whether the clusters that the route - // table refers to will be validated by the cluster manager. If set to true - // and a route refers to a non-existent cluster, the route table will not - // load. If set to false and a route refers to a non-existent cluster, the - // route table will load and the router filter will return a INTERNAL_ERROR - // if the route is selected at runtime. This setting defaults to true if the route table - // is statically defined via the :ref:`route_config - // ` - // option. This setting default to false if the route table is loaded dynamically via the - // :ref:`trds - // ` - // option. Users may wish to override the default behavior in certain cases (for example when - // using CDS with a static route table). - google.protobuf.BoolValue validate_clusters = 3; -} - -message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.Route"; - - // Route matching parameters. - RouteMatch match = 1 [(validate.rules).message = {required: true}]; - - // Route request to some upstream cluster. - RouteAction route = 2 [(validate.rules).message = {required: true}]; -} - -message RouteMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.RouteMatch"; - - oneof match_specifier { - option (validate.required) = true; - - // If specified, the route must exactly match the request method name. As a special case, an - // empty string matches any request method name. - string method_name = 1; - - // If specified, the route must have the service name as the request method name prefix. As a - // special case, an empty string matches any service name. Only relevant when service - // multiplexing. - string service_name = 2; - } - - // Inverts whatever matching is done in the :ref:`method_name - // ` or - // :ref:`service_name - // ` fields. - // Cannot be combined with wildcard matching as that would result in routes never being matched. - // - // .. note:: - // - // This does not invert matching done as part of the :ref:`headers field - // ` field. To - // invert header matching, see :ref:`invert_match - // `. - bool invert = 3; - - // Specifies a set of headers that the route should match on. The router will check the request’s - // headers against all the specified headers in the route config. A match will happen if all the - // headers in the route are present in the request with the same values (or based on presence if - // the value field is not in the config). Note that this only applies for Thrift transports and/or - // protocols that support headers. - repeated config.route.v3.HeaderMatcher headers = 4; -} - -// [#next-free-field: 8] -message RouteAction { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.RouteAction"; - - // The router is capable of shadowing traffic from one cluster to another. The current - // implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to - // respond before returning the response from the primary cluster. All normal statistics are - // collected for the shadow cluster making this feature useful for testing. - // - // .. note:: - // - // Shadowing will not be triggered if the primary cluster does not exist. - message RequestMirrorPolicy { - // Specifies the cluster that requests will be mirrored to. The cluster must - // exist in the cluster manager configuration when the route configuration is loaded. - // If it disappears at runtime, the shadow request will silently be ignored. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // If not specified, all requests to the target cluster will be mirrored. - // - // For some fraction N/D, a random number in the range [0,D) is selected. If the - // number is <= the value of the numerator N, or if the key is not present, the default - // value, the request will be mirrored. - config.core.v3.RuntimeFractionalPercent runtime_fraction = 2; - } - - oneof cluster_specifier { - option (validate.required) = true; - - // Indicates a single upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // Multiple upstream clusters can be specified for a given route. The - // request is routed to one of the upstream clusters based on weights - // assigned to each cluster. - WeightedCluster weighted_clusters = 2; - - // Envoy will determine the cluster to route to by reading the value of the - // Thrift header named by cluster_header from the request headers. If the - // header is not found or the referenced cluster does not exist Envoy will - // respond with an unknown method exception or an internal error exception, - // respectively. - string cluster_header = 6 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}]; - } - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field will be considered. - // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match - // `, - // with values there taking precedence. Keys and values should be provided under the "envoy.lb" - // metadata key. - config.core.v3.Metadata metadata_match = 3; - - // Specifies a set of rate limit configurations that could be applied to the route. - // N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders - // action with the header name ":method-name". - repeated config.route.v3.RateLimit rate_limits = 4; - - // Strip the service prefix from the method name, if there's a prefix. For - // example, the method call Service:method would end up being just method. - bool strip_service_name = 5; - - // Indicates that the route has request mirroring policies. - repeated RequestMirrorPolicy request_mirror_policies = 7; -} - -// Allows for specification of multiple upstream clusters along with weights that indicate the -// percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster -// based on these weights. -message WeightedCluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.WeightedCluster"; - - message ClusterWeight { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight"; - - // Name of the upstream cluster. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // When a request matches the route, the choice of an upstream cluster is determined by its - // weight. The sum of weights across all entries in the clusters array determines the total - // weight. - google.protobuf.UInt32Value weight = 2 [(validate.rules).uint32 = {gte: 1}]; - - // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in - // the upstream cluster with metadata matching what is set in this field, combined with what's - // provided in :ref:`RouteAction's metadata_match - // `, - // will be considered. Values here will take precedence. Keys and values should be provided - // under the "envoy.lb" metadata key. - config.core.v3.Metadata metadata_match = 3; - } - - // Specifies one or more upstream clusters associated with the route. - repeated ClusterWeight clusters = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto b/src/main/proto/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto deleted file mode 100644 index 4bdf97c..0000000 --- a/src/main/proto/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto +++ /dev/null @@ -1,172 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.thrift_proxy.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/extensions/filters/network/thrift_proxy/v3/route.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.thrift_proxy.v3"; -option java_outer_classname = "ThriftProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/thrift_proxy/v3;thrift_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Thrift Proxy] -// Thrift Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.thrift_proxy] - -// Thrift transport types supported by Envoy. -enum TransportType { - // For downstream connections, the Thrift proxy will attempt to determine which transport to use. - // For upstream connections, the Thrift proxy will use same transport as the downstream - // connection. - AUTO_TRANSPORT = 0; - - // The Thrift proxy will use the Thrift framed transport. - FRAMED = 1; - - // The Thrift proxy will use the Thrift unframed transport. - UNFRAMED = 2; - - // The Thrift proxy will assume the client is using the Thrift header transport. - HEADER = 3; -} - -// Thrift Protocol types supported by Envoy. -enum ProtocolType { - // For downstream connections, the Thrift proxy will attempt to determine which protocol to use. - // Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol - // detection. For upstream connections, the Thrift proxy will use the same protocol as the - // downstream connection. - AUTO_PROTOCOL = 0; - - // The Thrift proxy will use the Thrift binary protocol. - BINARY = 1; - - // The Thrift proxy will use Thrift non-strict binary protocol. - LAX_BINARY = 2; - - // The Thrift proxy will use the Thrift compact protocol. - COMPACT = 3; - - // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. - TWITTER = 4 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; -} - -message Trds { - // Configuration source specifier. - // In case of ``api_config_source`` only aggregated ``api_type`` is supported. - config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // The name of the route configuration. This allows to use different route - // configurations. Tells which route configuration should be fetched from the configuration source. - // Leave unspecified is also valid and means the unnamed route configuration. - string route_config_name = 2; -} - -// [#next-free-field: 11] -message ThriftProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftProxy"; - - // Supplies the type of transport that the Thrift proxy should use. Defaults to - // :ref:`AUTO_TRANSPORT`. - TransportType transport = 2 [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use. Defaults to - // :ref:`AUTO_PROTOCOL`. - ProtocolType protocol = 3 [(validate.rules).enum = {defined_only: true}]; - - // The human readable prefix to use when emitting statistics. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // The route table for the connection manager is static and is specified in this property. - // It is invalid to define both ``route_config`` and ``trds``. - RouteConfiguration route_config = 4 - [(udpa.annotations.field_migrate).oneof_promotion = "route_specifier"]; - - // Use xDS to fetch the route configuration. It is invalid to define both ``route_config`` and ``trds``. - Trds trds = 8 [(udpa.annotations.field_migrate).oneof_promotion = "route_specifier"]; - - // A list of individual Thrift filters that make up the filter chain for requests made to the - // Thrift proxy. Order matters as the filters are processed sequentially. For backwards - // compatibility, if no thrift_filters are specified, a default Thrift router filter - // (``envoy.filters.thrift.router``) is used. - // [#extension-category: envoy.thrift_proxy.filters] - repeated ThriftFilter thrift_filters = 5; - - // If set to true, Envoy will try to skip decode data after metadata in the Thrift message. - // This mode will only work if the upstream and downstream protocols are the same and the transports - // are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will - // fallback to decode the data. - bool payload_passthrough = 6; - - // Optional maximum requests for a single downstream connection. If not specified, there is no limit. - google.protobuf.UInt32Value max_requests_per_connection = 7; - - // Configuration for :ref:`access logs ` - // emitted by Thrift proxy. - repeated config.accesslog.v3.AccessLog access_log = 9; - - // If set to true, Envoy will preserve the case of Thrift header keys instead of serializing them to - // lower case as per the default behavior. Note that NUL, CR and LF characters will also be preserved - // as mandated by the Thrift spec. - // - // More info: https://github.com/apache/thrift/commit/e165fa3c85d00cb984f4d9635ed60909a1266ce1. - bool header_keys_preserve_case = 10; -} - -// ThriftFilter configures a Thrift filter. -message ThriftFilter { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftFilter"; - - reserved 2; - - reserved "config"; - - // The name of the filter to instantiate. The name must match a supported - // filter. The built-in filters are: - // - // [#comment:TODO(zuercher): Auto generate the following list] - // * :ref:`envoy.filters.thrift.router ` - // * :ref:`envoy.filters.thrift.rate_limit ` - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Filter specific configuration which depends on the filter being instantiated. See the supported - // filters for further documentation. - oneof config_type { - google.protobuf.Any typed_config = 3; - } -} - -// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in -// in -// :ref:`typed_extension_protocol_options`, -// keyed by the name ``envoy.filters.network.thrift_proxy``. -message ThriftProtocolOptions { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftProtocolOptions"; - - // Supplies the type of transport that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_TRANSPORT`, - // which is the default, causes the proxy to use the same transport as the downstream connection. - TransportType transport = 1 [(validate.rules).enum = {defined_only: true}]; - - // Supplies the type of protocol that the Thrift proxy should use for upstream connections. - // Selecting - // :ref:`AUTO_PROTOCOL`, - // which is the default, causes the proxy to use the same protocol as the downstream connection. - ProtocolType protocol = 2 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/filters/network/wasm/v3/wasm.proto b/src/main/proto/envoy/extensions/filters/network/wasm/v3/wasm.proto deleted file mode 100644 index 4fe6712..0000000 --- a/src/main/proto/envoy/extensions/filters/network/wasm/v3/wasm.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.wasm.v3; - -import "envoy/extensions/wasm/v3/wasm.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.wasm.v3"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/wasm/v3;wasmv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Wasm] -// [#extension: envoy.filters.network.wasm] -// Wasm :ref:`configuration overview `. - -message Wasm { - // General Plugin configuration. - envoy.extensions.wasm.v3.PluginConfig config = 1; -} diff --git a/src/main/proto/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto b/src/main/proto/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto deleted file mode 100644 index bb19c75..0000000 --- a/src/main/proto/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto +++ /dev/null @@ -1,115 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.network.zookeeper_proxy.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.network.zookeeper_proxy.v3"; -option java_outer_classname = "ZookeeperProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/zookeeper_proxy/v3;zookeeper_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ZooKeeper proxy] -// ZooKeeper Proxy :ref:`configuration overview `. -// [#extension: envoy.filters.network.zookeeper_proxy] - -// [#next-free-field: 10] -message ZooKeeperProxy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.network.zookeeper_proxy.v1alpha1.ZooKeeperProxy"; - - // The human readable prefix to use when emitting :ref:`statistics - // `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // [#not-implemented-hide:] The optional path to use for writing ZooKeeper access logs. - // If the access log field is empty, access logs will not be written. - string access_log = 2; - - // Messages — requests, responses and events — that are bigger than this value will - // be ignored. If it is not set, the default value is 1Mb. - // - // The value here should match the jute.maxbuffer property in your cluster configuration: - // - // https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#Unsafe+Options - // - // if that is set. If it isn't, ZooKeeper's default is also 1Mb. - google.protobuf.UInt32Value max_packet_bytes = 3; - - // Whether to emit latency threshold metrics. If not set, it defaults to false. - // If false, setting ``default_latency_threshold`` and ``latency_threshold_overrides`` will not have effect. - bool enable_latency_threshold_metrics = 4; - - // The default latency threshold to decide the fast/slow responses and emit metrics (used for error budget calculation). - // - // https://sre.google/workbook/implementing-slos/ - // - // If it is not set, the default value is 100 milliseconds. - google.protobuf.Duration default_latency_threshold = 5 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // List of latency threshold overrides for opcodes. - // If the threshold override of one opcode is not set, it will fallback to the default latency - // threshold. - // Specifying latency threshold overrides multiple times for one opcode is not allowed. - repeated LatencyThresholdOverride latency_threshold_overrides = 6; - - // Whether to emit per opcode request bytes metrics. If not set, it defaults to false. - bool enable_per_opcode_request_bytes_metrics = 7; - - // Whether to emit per opcode response bytes metrics. If not set, it defaults to false. - bool enable_per_opcode_response_bytes_metrics = 8; - - // Whether to emit per opcode decoder error metrics. If not set, it defaults to false. - bool enable_per_opcode_decoder_error_metrics = 9; -} - -message LatencyThresholdOverride { - enum Opcode { - Connect = 0; - Create = 1; - Delete = 2; - Exists = 3; - GetData = 4; - SetData = 5; - GetAcl = 6; - SetAcl = 7; - GetChildren = 8; - Sync = 9; - Ping = 10; - GetChildren2 = 11; - Check = 12; - Multi = 13; - Create2 = 14; - Reconfig = 15; - CheckWatches = 16; - RemoveWatches = 17; - CreateContainer = 18; - CreateTtl = 19; - Close = 20; - SetAuth = 21; - SetWatches = 22; - GetEphemerals = 23; - GetAllChildrenNumber = 24; - SetWatches2 = 25; - AddWatch = 26; - } - - // The ZooKeeper opcodes. Can be found as part of the ZooKeeper source code: - // - // https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/ZooDefs.java - // - Opcode opcode = 1 [(validate.rules).enum = {defined_only: true}]; - - // The latency threshold override of certain opcode. - google.protobuf.Duration threshold = 2 [(validate.rules).duration = { - required: true - gte {nanos: 1000000} - }]; -} diff --git a/src/main/proto/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto b/src/main/proto/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto deleted file mode 100644 index 621a0ff..0000000 --- a/src/main/proto/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto +++ /dev/null @@ -1,126 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.dns_filter.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/resolver.proto"; -import "envoy/data/dns/v3/dns_table.proto"; - -import "google/protobuf/duration.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.dns_filter.v3"; -option java_outer_classname = "DnsFilterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/dns_filter/v3;dns_filterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: DNS Filter] -// DNS Filter :ref:`configuration overview `. -// [#extension: envoy.filters.udp.dns_filter] - -// Configuration for the DNS filter. -message DnsFilterConfig { - // This message contains the configuration for the DNS Filter operating - // in a server context. This message will contain the virtual hosts and - // associated addresses with which Envoy will respond to queries - message ServerContextConfig { - oneof config_source { - option (validate.required) = true; - - // Load the configuration specified from the control plane - data.dns.v3.DnsTable inline_dns_table = 1; - - // Seed the filter configuration from an external path. This source - // is a yaml formatted file that contains the DnsTable driving Envoy's - // responses to DNS queries - config.core.v3.DataSource external_dns_table = 2; - } - } - - // This message contains the configuration for the DNS Filter operating - // in a client context. This message will contain the timeouts, retry, - // and forwarding configuration for Envoy to make DNS requests to other - // resolvers - // - // [#next-free-field: 6] - message ClientContextConfig { - // Sets the maximum time we will wait for the upstream query to complete - // We allow 5s for the upstream resolution to complete, so the minimum - // value here is 1. Note that the total latency for a failed query is the - // number of retries multiplied by the resolver_timeout. - google.protobuf.Duration resolver_timeout = 1 [(validate.rules).duration = {gte {seconds: 1}}]; - - // This field was used for `dns_resolution_config` in Envoy 1.19.0 and - // 1.19.1. - // Control planes that need to set this field for Envoy 1.19.0 and - // 1.19.1 clients should fork the protobufs and change the field type - // to `DnsResolutionConfig`. - // Control planes that need to simultaneously support Envoy 1.18.x and - // Envoy 1.19.x should avoid Envoy 1.19.0 and 1.19.1. - // - // [#not-implemented-hide:] - repeated config.core.v3.Address upstream_resolvers = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolution configuration which includes the underlying dns resolver addresses and options. - // This field is deprecated in favor of - // :ref:`typed_dns_resolver_config `. - config.core.v3.DnsResolutionConfig dns_resolution_config = 5 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, - // or any other DNS resolver types and the related parameters. - // For example, an object of - // :ref:`CaresDnsResolverConfig ` - // can be packed into this ``typed_dns_resolver_config``. This configuration replaces the - // :ref:`dns_resolution_config ` - // configuration. - // During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exists, - // when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. - // When ``typed_dns_resolver_config`` is missing, the default behavior is in place. - // [#extension-category: envoy.network.dns_resolver] - config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 4; - - // Controls how many outstanding external lookup contexts the filter tracks. - // The context structure allows the filter to respond to every query even if the external - // resolution times out or is otherwise unsuccessful - uint64 max_pending_lookups = 3 [(validate.rules).uint64 = {gte: 1}]; - } - - // The stat prefix used when emitting DNS filter statistics - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Server context configuration contains the data that the filter uses to respond - // to DNS requests. - ServerContextConfig server_config = 2; - - // Client context configuration controls Envoy's behavior when it must use external - // resolvers to answer a query. This object is optional and if omitted instructs - // the filter to resolve queries from the data in the server_config. - // Also, if ``client_config`` is omitted, here is the Envoy's behavior to create DNS resolver: - // - // 1. If :ref:`typed_dns_resolver_config ` - // is not empty, uses it. - // - // 2. Otherwise, uses the default c-ares DNS resolver. - // - ClientContextConfig client_config = 3; - - // Configuration for :ref:`access logs ` - // emitted by the DNS filter for each DNS query received. - // Supports custom format commands for DNS-specific attributes: - // - ``QUERY_NAME``: The DNS query name being resolved - // - ``QUERY_TYPE``: The DNS query type (A, AAAA, SRV, etc.) - // - ``QUERY_CLASS``: The DNS query class - // - ``ANSWER_COUNT``: Number of answers in the response - // - ``RESPONSE_CODE``: DNS response code - // - ``PARSE_STATUS``: Whether the query was successfully parsed - repeated config.accesslog.v3.AccessLog access_log = 4; -} diff --git a/src/main/proto/envoy/extensions/filters/udp/dynamic_modules/v3/dynamic_modules.proto b/src/main/proto/envoy/extensions/filters/udp/dynamic_modules/v3/dynamic_modules.proto deleted file mode 100644 index 7f0defc..0000000 --- a/src/main/proto/envoy/extensions/filters/udp/dynamic_modules/v3/dynamic_modules.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.dynamic_modules.v3; - -import "envoy/extensions/dynamic_modules/v3/dynamic_modules.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.dynamic_modules.v3"; -option java_outer_classname = "DynamicModulesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/dynamic_modules/v3;dynamic_modulesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynamic Modules UDP Listener Filter] -// [#extension: envoy.filters.udp_listener.dynamic_modules] - -// Configuration for the Dynamic Modules UDP listener filter. This filter allows loading shared object -// files that can be loaded via ``dlopen`` to extend the UDP listener filter chain. -// -// A module can be loaded by multiple UDP listener filters; the module is loaded only once and shared -// across multiple filters. -message DynamicModuleUdpListenerFilter { - // Specifies the shared-object level configuration. - envoy.extensions.dynamic_modules.v3.DynamicModuleConfig dynamic_module_config = 1; - - // The name for this filter configuration. - // - // This can be used to distinguish between different filter implementations inside a dynamic - // module. For example, a module can have completely different filter implementations. When Envoy - // receives this configuration, it passes the ``filter_name`` to the dynamic module's UDP listener - // filter config init function together with the ``filter_config``. That way a module can decide - // which in-module filter implementation to use based on the name at load time. - string filter_name = 2; - - // The configuration for the filter chosen by ``filter_name``. - // - // This is passed to the module's UDP listener filter initialization function. Together with the - // ``filter_name``, the module can decide which in-module filter implementation to use and - // fine-tune the behavior of the filter. - // - // For example, if a module has two filter implementations, one for echo and one for rate - // limiting, ``filter_name`` is used to choose either echo or rate limiting. The - // ``filter_config`` can be used to configure the echo behavior or the rate limiting parameters. - // - // ``google.protobuf.Struct`` is serialized as JSON before passing it to the module. - // ``google.protobuf.BytesValue`` and ``google.protobuf.StringValue`` are passed directly - // without the wrapper. - // - // .. code-block:: yaml - // - // # Passing a string value - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.StringValue" - // value: hello - // - // # Passing raw bytes - // filter_config: - // "@type": "type.googleapis.com/google.protobuf.BytesValue" - // value: aGVsbG8= # echo -n "hello" | base64 - // - google.protobuf.Any filter_config = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/session/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto b/src/main/proto/envoy/extensions/filters/udp/udp_proxy/session/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto deleted file mode 100644 index a264f4e..0000000 --- a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/session/dynamic_forward_proxy/v3/dynamic_forward_proxy.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.udp_proxy.session.dynamic_forward_proxy.v3; - -import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.session.dynamic_forward_proxy.v3"; -option java_outer_classname = "DynamicForwardProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/udp_proxy/session/dynamic_forward_proxy/v3;dynamic_forward_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Filter state dynamic forward proxy] - -// Configuration for the filter state based dynamic forward proxy filter. See the -// :ref:`architecture overview ` for -// more information. Note this filter must be used in conjunction to another filter that -// sets the 'envoy.upstream.dynamic_host' and the 'envoy.upstream.dynamic_port' filter -// state keys for the required upstream UDP session. -// [#extension: envoy.filters.udp.session.dynamic_forward_proxy] -message FilterConfig { - // Configuration for UDP datagrams buffering. - message BufferOptions { - // If set, the filter will only buffer datagrams up to the requested limit, and will drop - // new UDP datagrams if the buffer contains the max_buffered_datagrams value at the time - // of a new datagram arrival. If not set, the default value is 1024 datagrams. - google.protobuf.UInt32Value max_buffered_datagrams = 1; - - // If set, the filter will only buffer datagrams up to the requested total buffered bytes limit, - // and will drop new UDP datagrams if the buffer contains the max_buffered_datagrams value - // at the time of a new datagram arrival. If not set, the default value is 16,384 (16KB). - google.protobuf.UInt64Value max_buffered_bytes = 2; - } - - // The prefix to use when emitting :ref:`statistics `. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - oneof implementation_specifier { - // The DNS cache configuration that the filter will attach to. Note this - // configuration must match that of associated :ref:`dynamic forward proxy cluster configuration - // `. - common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 2 - [(validate.rules).message = {required: true}]; - } - - // If configured, the filter will buffer datagrams in case that it is waiting for a DNS response. - // If this field is not configured, there will be no buffering and downstream datagrams that arrive - // while the DNS resolution is in progress will be dropped. In case this field is set but the options - // are not configured, the default values will be applied as described in the ``BufferOptions``. - BufferOptions buffer_options = 3; -} diff --git a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/session/http_capsule/v3/http_capsule.proto b/src/main/proto/envoy/extensions/filters/udp/udp_proxy/session/http_capsule/v3/http_capsule.proto deleted file mode 100644 index e345546..0000000 --- a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/session/http_capsule/v3/http_capsule.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.udp_proxy.session.http_capsule.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.session.http_capsule.v3"; -option java_outer_classname = "HttpCapsuleProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/udp_proxy/session/http_capsule/v3;http_capsulev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP HTTP Capsule filter] -// UDP to HTTP capsules :ref:`overview `. -// [#extension: envoy.filters.udp.session.http_capsule] - -message FilterConfig { -} diff --git a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/v3/route.proto b/src/main/proto/envoy/extensions/filters/udp/udp_proxy/v3/route.proto deleted file mode 100644 index 8d8fcf5..0000000 --- a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/v3/route.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.udp_proxy.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.v3"; -option java_outer_classname = "RouteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/udp_proxy/v3;udp_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP proxy route configuration] -// UDP proxy :ref:`configuration overview `. - -message Route { - // Indicates the upstream cluster to which the request should be routed. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto b/src/main/proto/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto deleted file mode 100644 index 6de0c1e..0000000 --- a/src/main/proto/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto +++ /dev/null @@ -1,271 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.filters.udp.udp_proxy.v3; - -import "envoy/config/accesslog/v3/accesslog.proto"; -import "envoy/config/core/v3/backoff.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/udp_socket_config.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.v3"; -option java_outer_classname = "UdpProxyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/udp/udp_proxy/v3;udp_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP proxy] -// UDP proxy :ref:`configuration overview `. -// [#extension: envoy.filters.udp_listener.udp_proxy] - -// Configuration for the UDP proxy filter. -// [#next-free-field: 14] -message UdpProxyConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.filter.udp.udp_proxy.v2alpha.UdpProxyConfig"; - - // Specifies the UDP hash policy. - // The packets can be routed by hash policy. - message HashPolicy { - oneof policy_specifier { - option (validate.required) = true; - - // The source IP will be used to compute the hash used by hash-based load balancing algorithms. - bool source_ip = 1 [(validate.rules).bool = {const: true}]; - - // A given key will be used to compute the hash used by hash-based load balancing algorithms. - // In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints. - // A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session, - // although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level - // (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session. - string key = 2 [(validate.rules).string = {min_len: 1}]; - } - } - - // Configuration for UDP session filters. - message SessionFilter { - // The name of the filter configuration. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - oneof config_type { - // Filter specific configuration which depends on the filter being - // instantiated. See the supported filters for further documentation. - google.protobuf.Any typed_config = 2; - - // Configuration source specifier for an extension configuration discovery - // service. In case of a failure and without the default configuration, the - // UDP session will be removed. - config.core.v3.ExtensionConfigSource config_discovery = 3; - } - } - - // Configuration for tunneling UDP over other transports or application layers. - // Tunneling is currently supported over HTTP/2. - // [#next-free-field: 12] - message UdpTunnelingConfig { - // Configuration for UDP datagrams buffering. - message BufferOptions { - // If set, the filter will only buffer datagrams up to the requested limit, and will drop - // new UDP datagrams if the buffer contains the max_buffered_datagrams value at the time - // of a new datagram arrival. If not set, the default value is 1024 datagrams. - google.protobuf.UInt32Value max_buffered_datagrams = 1; - - // If set, the filter will only buffer datagrams up to the requested total buffered bytes limit, - // and will drop new UDP datagrams if the buffer contains the max_buffered_datagrams value - // at the time of a new datagram arrival. If not set, the default value is 16,384 (16KB). - google.protobuf.UInt64Value max_buffered_bytes = 2; - } - - message RetryOptions { - // The maximum number of unsuccessful connection attempts that will be made before giving up. - // If the parameter is not specified, 1 connection attempt will be made. - google.protobuf.UInt32Value max_connect_attempts = 1; - - // Sets the backoff strategy. If not set, the retries are performed without backoff. - config.core.v3.BackoffStrategy backoff_options = 2; - } - - // The hostname to send in the synthesized CONNECT headers to the upstream proxy. - // This field evaluates command operators if set, otherwise returns hostname as is. - // - // Example: dynamically set hostname using filter state - // - // .. code-block:: yaml - // - // tunneling_config: - // proxy_host: "%FILTER_STATE(proxy.host.key:PLAIN)%" - // - string proxy_host = 1 [(validate.rules).string = {min_len: 1}]; - - // Optional port value to add to the HTTP request URI. - // This value can be overridden per-session by setting the required port value for - // the filter state key ``udp.connect.proxy_port``. - google.protobuf.UInt32Value proxy_port = 2; - - // The target host to send in the synthesized CONNECT headers to the upstream proxy. - // This field evaluates command operators if set, otherwise returns hostname as is. - // - // Example: dynamically set target host using filter state - // - // .. code-block:: yaml - // - // tunneling_config: - // target_host: "%FILTER_STATE(target.host.key:PLAIN)%" - // - string target_host = 3 [(validate.rules).string = {min_len: 1}]; - - // The default target port to send in the CONNECT headers to the upstream proxy. - // This value can be overridden per-session by setting the required port value for - // the filter state key ``udp.connect.target_port``. - uint32 default_target_port = 4 [(validate.rules).uint32 = {lte: 65535 gt: 0}]; - - // Use POST method instead of CONNECT method to tunnel the UDP stream. - // - // .. note:: - // If use_post is set, the upstream stream does not comply with the connect-udp RFC, and - // instead it will be a POST request. the path used in the headers will be set from the - // post_path field, and the headers will not contain the target host and target port, as - // required by the connect-udp protocol. This flag should be used carefully. - // - bool use_post = 5; - - // The path used with POST method. Default path is ``/``. If post path is specified and - // use_post field isn't true, it will be rejected. - string post_path = 6; - - // Optional retry options, in case connecting to the upstream failed. - RetryOptions retry_options = 7; - - // Additional request headers to upstream proxy. Neither ``:-prefixed`` pseudo-headers - // nor the Host: header can be overridden. Values of the added headers evaluates command - // operators if they are set in the value template. - // - // Example: dynamically set a header with the local port - // - // .. code-block:: yaml - // - // headers_to_add: - // - header: - // key: original_dst_port - // value: "%DOWNSTREAM_LOCAL_PORT%" - // - repeated config.core.v3.HeaderValueOption headers_to_add = 8 - [(validate.rules).repeated = {max_items: 1000}]; - - // If configured, the filter will buffer datagrams in case that it is waiting for the upstream to be - // ready, whether if it is during the connection process or due to upstream buffer watermarks. - // If this field is not configured, there will be no buffering and downstream datagrams that arrive - // while the upstream is not ready will be dropped. In case this field is set but the options - // are not configured, the default values will be applied as described in the ``BufferOptions``. - BufferOptions buffer_options = 9; - - // Save the response headers to the downstream info filter state for consumption - // by the session filters. The filter state key is ``envoy.udp_proxy.propagate_response_headers``. - bool propagate_response_headers = 10; - - // Save the response trailers to the downstream info filter state for consumption - // by the session filters. The filter state key is ``envoy.udp_proxy.propagate_response_trailers``. - bool propagate_response_trailers = 11; - } - - message UdpAccessLogOptions { - // The interval to flush access log. The UDP proxy will flush only one access log when the session - // is ended by default. If this field is set, the UDP proxy will flush access log periodically with - // the specified interval. - // This field does not require on-tunnel-connected access logging enabled, and the other way around. - // The interval must be at least 1ms. - google.protobuf.Duration access_log_flush_interval = 1 - [(validate.rules).duration = {gte {nanos: 1000000}}]; - - // If set to true and UDP tunneling is configured, access log will be flushed when the UDP proxy has successfully - // established a connection tunnel with the upstream. If the connection failed, the access log will not be flushed. - bool flush_access_log_on_tunnel_connected = 2; - } - - // The stat prefix used when emitting UDP proxy filter stats. - string stat_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - oneof route_specifier { - option (validate.required) = true; - - // The upstream cluster to connect to. - // This field is deprecated in favor of - // :ref:`matcher `. - string cluster = 2 [ - deprecated = true, - (validate.rules).string = {min_len: 1}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // The match tree to use when resolving route actions for incoming requests. - // See :ref:`Routing ` for more information. - xds.type.matcher.v3.Matcher matcher = 9 - [(xds.annotations.v3.field_status).work_in_progress = true]; - } - - // The idle timeout for sessions. Idle is defined as no datagrams between received or sent by - // the session. The default if not specified is 1 minute. - google.protobuf.Duration idle_timeout = 3; - - // Use the remote downstream IP address as the sender IP address when sending packets to upstream hosts. - // This option requires Envoy to be run with the ``CAP_NET_ADMIN`` capability on Linux. - // And the IPv6 stack must be enabled on Linux kernel. - // This option does not preserve the remote downstream port. - // If this option is enabled, the IP address of sent datagrams will be changed to the remote downstream IP address. - // This means that Envoy will not receive packets that are sent by upstream hosts because the upstream hosts - // will send the packets with the remote downstream IP address as the destination. All packets will be routed - // to the remote downstream directly if there are route rules on the upstream host side. - // There are two options to return the packets back to the remote downstream. - // The first one is to use DSR (Direct Server Return). - // The other one is to configure routing rules on the upstream hosts to forward - // all packets back to Envoy and configure iptables rules on the host running Envoy to - // forward all packets from upstream hosts to the Envoy process so that Envoy can forward the packets to the downstream. - // If the platform does not support this option, Envoy will raise a configuration error. - bool use_original_src_ip = 4; - - // Optional configuration for UDP proxy hash policies. If hash_policies is not set, the hash-based - // load balancing algorithms will select a host randomly. Currently the number of hash policies is - // limited to 1. - repeated HashPolicy hash_policies = 5 [(validate.rules).repeated = {max_items: 1}]; - - // UDP socket configuration for upstream sockets. The default for - // :ref:`prefer_gro ` is true for upstream - // sockets as the assumption is datagrams will be received from a single source. - config.core.v3.UdpSocketConfig upstream_socket_config = 6; - - // Perform per packet load balancing (upstream host selection) on each received data chunk. - // The default if not specified is false, that means each data chunk is forwarded - // to upstream host selected on first chunk receival for that "session" (identified by source IP/port and local IP/port). - // Only one of use_per_packet_load_balancing or session_filters can be used. - bool use_per_packet_load_balancing = 7; - - // Configuration for session access logs emitted by the UDP proxy. Note that certain UDP specific data is emitted as :ref:`Dynamic Metadata `. - repeated config.accesslog.v3.AccessLog access_log = 8; - - // Configuration for proxy access logs emitted by the UDP proxy. Note that certain UDP specific data is emitted as :ref:`Dynamic Metadata `. - repeated config.accesslog.v3.AccessLog proxy_access_log = 10; - - // Optional session filters that will run for each UDP session. - // Only one of use_per_packet_load_balancing or session_filters can be used. - // [#extension-category: envoy.filters.udp.session] - repeated SessionFilter session_filters = 11; - - // If set, this configures UDP tunneling. See `Proxying UDP in HTTP `_. - // More information can be found in the UDP Proxy and HTTP upgrade documentation. - UdpTunnelingConfig tunneling_config = 12; - - // Additional access log options for UDP Proxy. - UdpAccessLogOptions access_log_options = 13; -} diff --git a/src/main/proto/envoy/extensions/formatter/cel/v3/cel.proto b/src/main/proto/envoy/extensions/formatter/cel/v3/cel.proto deleted file mode 100644 index ced34e7..0000000 --- a/src/main/proto/envoy/extensions/formatter/cel/v3/cel.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.formatter.cel.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.formatter.cel.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/cel/v3;celv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Formatter extension for printing CEL expressions] -// [#extension: envoy.formatter.cel] - -// CEL formatter extension implements CEL command operator that evaluates configured -// symbolic Common Expression Language expressions to generate an access log. -// -// See :ref:`here ` for more information on access log configuration. - -// %CEL(EXPRESSION):Z% -// Expressions are based on the set of Envoy :ref:`attributes `. -// Expression errors are considered `-`. Z is an optional parameter denoting string -// truncation up to Z characters long. -// -// Examples: -// -// * ``%CEL(response.code)%`` -// * ``%CEL(connection.mtls)%`` -// * ``%CEL(request.headers['x-envoy-original-path']):10%`` -// * ``%CEL(request.headers['x-log-mtls'] || request.url_path.contains('v1beta3'))%`` - -// Alternatively: %TYPED_CEL(EXPRESSION):Z% -// When using a non-text access log format like JSON, this format command is -// able to emit values of non-string types, like number, boolean, and null, -// based on the output of the CEL expression. It otherwise functions the same as -// %CEL%. CEL types not native to JSON are coerced as follows: -// -// * Bytes are base64 encoded to produce a string. -// * Durations are stringified as a count of seconds, e.g. `duration("1h30m")` -// becomes "5400s". -// * Timestamps are formatted to UTC, e.g. -// `timestamp("2023-08-26T12:39:00-07:00")` becomes -// "2023-08-26T19:39:00+00:00" -// * Maps become objects, provided all keys can be coerced to strings and that -// all values can coerce to types representable in JSON. -// * Lists become lists, provided all values can coerce to types representable -// in JSON. - -// Configuration for the CEL formatter. -// -// .. warning:: -// This extension is treated as built-in extension and will be enabled by default now. -// It is unnecessary to configure this extension. -message Cel { -} diff --git a/src/main/proto/envoy/extensions/formatter/metadata/v3/metadata.proto b/src/main/proto/envoy/extensions/formatter/metadata/v3/metadata.proto deleted file mode 100644 index ccde766..0000000 --- a/src/main/proto/envoy/extensions/formatter/metadata/v3/metadata.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.formatter.metadata.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.formatter.metadata.v3"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/metadata/v3;metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Formatter extension for printing various types of metadata] -// [#extension: envoy.formatter.metadata] - -// Metadata formatter extension implements METADATA command operator that -// prints all types of metadata. The first parameter taken by METADATA operator defines -// type of metadata. The following types of metadata are supported (case sensitive): -// -// * DYNAMIC -// * CLUSTER -// * ROUTE -// * UPSTREAM_HOST -// * LISTENER -// * LISTENER_FILTER_CHAIN -// * VIRTUAL_HOST -// -// See :ref:`here ` for more information on access log configuration. - -// %METADATA(TYPE:NAMESPACE:KEY):Z% -// :ref:`Metadata ` info, -// where TYPE is type of metadata (see above for supported types), -// NAMESPACE is the filter namespace used when setting the metadata, KEY is an optional -// lookup key in the namespace with the option of specifying nested keys separated by ':', -// and Z is an optional parameter denoting string truncation up to Z characters long. -// The data will be logged as a JSON string. For example, for the following ROUTE metadata: -// -// ``com.test.my_filter: {"test_key": "foo", "test_object": {"inner_key": "bar"}}`` -// -// * %METADATA(ROUTE:com.test.my_filter)% will log: ``{"test_key": "foo", "test_object": {"inner_key": "bar"}}`` -// * %METADATA(ROUTE:com.test.my_filter:test_key)% will log: ``foo`` -// * %METADATA(ROUTE:com.test.my_filter:test_object)% will log: ``{"inner_key": "bar"}`` -// * %METADATA(ROUTE:com.test.my_filter:test_object:inner_key)% will log: ``bar`` -// * %METADATA(ROUTE:com.unknown_filter)% will log: ``-`` -// * %METADATA(ROUTE:com.test.my_filter:unknown_key)% will log: ``-`` -// * %METADATA(ROUTE:com.test.my_filter):25% will log (truncation at 25 characters): ``{"test_key": "foo", "test`` -// -// .. note:: -// -// For typed JSON logs, this operator renders a single value with string, numeric, or boolean type -// when the referenced key is a simple value. If the referenced key is a struct or list value, a -// JSON struct or list is rendered. Structs and lists may be nested. In any event, the maximum -// length is ignored. -// -// .. note:: -// -// METADATA(DYNAMIC:NAMESPACE:KEY):Z is equivalent to :ref:`DYNAMIC_METADATA(NAMESPACE:KEY):Z` -// METADATA(CLUSTER:NAMESPACE:KEY):Z is equivalent to :ref:`CLUSTER_METADATA(NAMESPACE:KEY):Z` -// METADATA(UPSTREAM_HOST:NAMESPACE:KEY):Z is equivalent to :ref:`UPSTREAM_METADATA(NAMESPACE:KEY):Z` -// -// .. warning:: -// This extension is treated as built-in extension and will be enabled by default now. -// It is unnecessary to configure this extension. -message Metadata { -} diff --git a/src/main/proto/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto b/src/main/proto/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto deleted file mode 100644 index db82293..0000000 --- a/src/main/proto/envoy/extensions/formatter/req_without_query/v3/req_without_query.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.formatter.req_without_query.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.formatter.req_without_query.v3"; -option java_outer_classname = "ReqWithoutQueryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/req_without_query/v3;req_without_queryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Formatter extension for printing request without query string] -// [#extension: envoy.formatter.req_without_query] - -// ReqWithoutQuery formatter extension implements REQ_WITHOUT_QUERY command operator that -// works the same way as :ref:`REQ ` except that it will -// remove the query string. It is used to avoid logging any sensitive information into -// the access log. -// See :ref:`here ` for more information on access log configuration. - -// %REQ_WITHOUT_QUERY(X?Y):Z% -// An HTTP request header where X is the main HTTP header, Y is the alternative one, and Z is an -// optional parameter denoting string truncation up to Z characters long. The value is taken from -// the HTTP request header named X first and if it's not set, then request header Y is used. If -// none of the headers are present '-' symbol will be in the log. - -// .. warning:: -// Please use %PATH% to replace this extension. -// See :ref:`access log formats ` for more details. - -// Configuration for the request without query formatter. -message ReqWithoutQuery { -} diff --git a/src/main/proto/envoy/extensions/geoip_providers/common/v3/common.proto b/src/main/proto/envoy/extensions/geoip_providers/common/v3/common.proto deleted file mode 100644 index 778b2ca..0000000 --- a/src/main/proto/envoy/extensions/geoip_providers/common/v3/common.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.geoip_providers.common.v3; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.geoip_providers.common.v3"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/geoip_providers/common/v3;commonv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common Geolocation Provider Configuration] -// Common geolocation provider :ref:`configuration overview `. -// Common configuration shared across geolocation providers. - -message CommonGeoipProviderConfig { - // The set of geolocation headers to add to request. If any of the configured headers is present - // in the incoming request, it will be overridden by the :ref:`HTTP GeoIP filter `. - // [#next-free-field: 13] - // - // .. attention:: - // This field is deprecated in favor of :ref:`geo_field_keys - // `. - message GeolocationHeadersToAdd { - // If set, the header will be used to populate the country ISO code associated with the IP address. - string country = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the header will be used to populate the city associated with the IP address. - string city = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the header will be used to populate the region ISO code associated with the IP address. - // The least specific subdivision will be selected as the region value. - string region = 3 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the header will be used to populate the ASN associated with the IP address. - string asn = 4 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // This field is deprecated; use ``anon`` instead. - string is_anon = 5 [ - deprecated = true, - (validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // If set, the IP address will be checked if it belongs to any type of anonymization network (e.g., VPN, public proxy). - // The header will be populated with the check result. Header value will be set to either ``true`` or ``false`` depending on the check result. - string anon = 12 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the IP address will be checked if it belongs to a VPN and the header will be populated with the check result. - // Header value will be set to either ``true`` or ``false`` depending on the check result. - string anon_vpn = 6 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the IP address will be checked if it belongs to a hosting provider and the header will be populated with the check result. - // Header value will be set to either ``true`` or ``false`` depending on the check result. - string anon_hosting = 7 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the IP address will be checked if it belongs to a TOR exit node and the header will be populated with the check result. - // Header value will be set to either ``true`` or ``false`` depending on the check result. - string anon_tor = 8 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the IP address will be checked if it belongs to a public proxy and the header will be populated with the check result. - // Header value will be set to either ``true`` or ``false`` depending on the check result. - string anon_proxy = 9 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the header will be used to populate the ISP associated with the IP address. - string isp = 10 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // If set, the IP address will be checked if it belongs to the ISP named iCloud Private Relay and the header will be populated with the check result. - // Header value will be set to either ``true`` or ``false`` depending on the check result. - string apple_private_relay = 11 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - } - - // The set of geolocation field keys to use for storing lookup results. - // These keys define how the geolocation lookup results will be stored. The actual storage - // mechanism depends on the filter using the provider: - // - // - The :ref:`HTTP GeoIP filter ` stores results as HTTP request headers. - // - The :ref:`Network GeoIP filter ` stores results in the - // connection's filter state under the well-known key ``envoy.geoip``. - // - // [#next-free-field: 12] - message GeolocationFieldKeys { - // If set, the key will be used to populate the country ISO code associated with the IP address. - string country = 1; - - // If set, the key will be used to populate the city associated with the IP address. - string city = 2; - - // If set, the key will be used to populate the region ISO code associated with the IP address. - // The least specific subdivision will be selected as the region value. - string region = 3; - - // If set, the key will be used to populate the ASN associated with the IP address. - string asn = 4; - - // If set, the IP address will be checked if it belongs to any type of anonymization network - // (e.g., VPN, public proxy). The result will be stored with this key. Value will be set to - // either ``true`` or ``false`` depending on the check result. - string anon = 5; - - // If set, the IP address will be checked if it belongs to a VPN and the result will be stored - // with this key. Value will be set to either ``true`` or ``false`` depending on the check result. - string anon_vpn = 6; - - // If set, the IP address will be checked if it belongs to a hosting provider and the result - // will be stored with this key. Value will be set to either ``true`` or ``false`` depending on - // the check result. - string anon_hosting = 7; - - // If set, the IP address will be checked if it belongs to a TOR exit node and the result will - // be stored with this key. Value will be set to either ``true`` or ``false`` depending on the - // check result. - string anon_tor = 8; - - // If set, the IP address will be checked if it belongs to a public proxy and the result will - // be stored with this key. Value will be set to either ``true`` or ``false`` depending on the - // check result. - string anon_proxy = 9; - - // If set, the key will be used to populate the ISP associated with the IP address. - string isp = 10; - - // If set, the IP address will be checked if it belongs to the ISP named iCloud Private Relay - // and the result will be stored with this key. Value will be set to either ``true`` or ``false`` - // depending on the check result. - string apple_private_relay = 11; - } - - // Configuration for geolocation headers to add to HTTP requests. - // This field is deprecated in favor of ``geo_field_keys``. If both are set, ``geo_field_keys`` - // takes precedence. - GeolocationHeadersToAdd geo_headers_to_add = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Configuration for geolocation field keys. - // At least one of ``geo_headers_to_add`` or ``geo_field_keys`` must be set. - GeolocationFieldKeys geo_field_keys = 3; -} diff --git a/src/main/proto/envoy/extensions/geoip_providers/maxmind/v3/maxmind.proto b/src/main/proto/envoy/extensions/geoip_providers/maxmind/v3/maxmind.proto deleted file mode 100644 index 91e00c1..0000000 --- a/src/main/proto/envoy/extensions/geoip_providers/maxmind/v3/maxmind.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.geoip_providers.maxmind.v3; - -import "envoy/extensions/geoip_providers/common/v3/common.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.geoip_providers.maxmind.v3"; -option java_outer_classname = "MaxmindProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/geoip_providers/maxmind/v3;maxmindv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: MaxMind Geolocation Provider] -// MaxMind geolocation provider :ref:`configuration overview `. -// -// At least one geolocation database path must be configured: -// -// * :ref:`city_db_path ` -// * :ref:`isp_db_path ` -// * :ref:`asn_db_path ` -// * :ref:`anon_db_path ` -// * :ref:`country_db_path ` -// [#extension: envoy.geoip_providers.maxmind] - -// [#next-free-field: 7] -message MaxMindConfig { - // Full file path to the MaxMind city database, e.g., ``/etc/GeoLite2-City.mmdb``. - // Database file is expected to have ``.mmdb`` extension. - string city_db_path = 1 [(validate.rules).string = {pattern: "^$|^.*\\.mmdb$"}]; - - // Full file path to the MaxMind ASN database, e.g., ``/etc/GeoLite2-ASN.mmdb``. - // Database file is expected to have ``.mmdb`` extension. - // When this is defined, the ASN information will always be fetched from the ``asn_db``. - string asn_db_path = 2 [(validate.rules).string = {pattern: "^$|^.*\\.mmdb$"}]; - - // Full file path to the MaxMind Anonymous IP database, e.g., ``/etc/GeoIP2-Anonymous-IP.mmdb``. - // Database file is expected to have ``.mmdb`` extension. - string anon_db_path = 3 [(validate.rules).string = {pattern: "^$|^.*\\.mmdb$"}]; - - // Full file path to the MaxMind ISP database, e.g., ``/etc/GeoLite2-ISP.mmdb``. - // Database file is expected to have ``.mmdb`` extension. - // If ``asn_db_path`` is not defined, ASN information will be fetched from - // ``isp_db`` instead. - string isp_db_path = 5 [(validate.rules).string = {pattern: "^$|^.*\\.mmdb$"}]; - - // Full file path to the MaxMind Country database, e.g., ``/etc/GeoLite2-Country.mmdb``. - // Database file is expected to have ``.mmdb`` extension. - // - // If ``country_db_path`` is not specified, country information will be fetched from - // ``city_db`` if ``city_db`` is configured. - string country_db_path = 6 [(validate.rules).string = {pattern: "^$|^.*\\.mmdb$"}]; - - // Common provider configuration that specifies which geolocation headers will be populated with geolocation data. - common.v3.CommonGeoipProviderConfig common_provider_config = 4 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.proto deleted file mode 100644 index 45ee383..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.access_token.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.access_token.v3"; -option java_outer_classname = "AccessTokenCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/access_token/v3;access_tokenv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Access Token Credentials] - -// [#not-implemented-hide:] -message AccessTokenCredentials { - // The access token. - string token = 1; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/file_based_metadata/v3/file_based_metadata_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/file_based_metadata/v3/file_based_metadata_credentials.proto deleted file mode 100644 index cacb098..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/file_based_metadata/v3/file_based_metadata_credentials.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.file_based_metadata.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.file_based_metadata.v3"; -option java_outer_classname = "FileBasedMetadataCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/file_based_metadata/v3;file_based_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: File-Based Metadata Call Credentials] - -// [#not-implemented-hide:] -message FileBasedMetadataCallCredentials { - // Location or inline data of secret to use for authentication of the Google gRPC connection - // this secret will be attached to a header of the gRPC connection - config.core.v3.DataSource secret_data = 1 [(udpa.annotations.sensitive) = true]; - - // Metadata header key to use for sending the secret data - // if no header key is set, "authorization" header will be used - string header_key = 2; - - // Prefix to prepend to the secret in the metadata header - // if no prefix is set, the default is to use no prefix - string header_prefix = 3; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_compute_engine/v3/google_compute_engine_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_compute_engine/v3/google_compute_engine_credentials.proto deleted file mode 100644 index d73086b..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_compute_engine/v3/google_compute_engine_credentials.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.google_compute_engine.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.google_compute_engine.v3"; -option java_outer_classname = "GoogleComputeEngineCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/google_compute_engine/v3;google_compute_enginev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Google Compute Engine Credentials] - -// [#not-implemented-hide:] -message GoogleComputeEngineCredentials { -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_iam/v3/google_iam_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_iam/v3/google_iam_credentials.proto deleted file mode 100644 index 0ed5a2d..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_iam/v3/google_iam_credentials.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.google_iam.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.google_iam.v3"; -option java_outer_classname = "GoogleIamCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/google_iam/v3;google_iamv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Google IAM Credentials] - -// [#not-implemented-hide:] -message GoogleIamCredentials { - // Authorization token. - string authorization_token = 1; - - // Authority selector. - string authority_selector = 2; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_refresh_token/v3/google_refresh_token_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_refresh_token/v3/google_refresh_token_credentials.proto deleted file mode 100644 index ce32c95..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/google_refresh_token/v3/google_refresh_token_credentials.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.google_refresh_token.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.google_refresh_token.v3"; -option java_outer_classname = "GoogleRefreshTokenCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/google_refresh_token/v3;google_refresh_tokenv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Google Refresh Token Credentials] - -// [#not-implemented-hide:] -message GoogleRefreshTokenCredentials { - // JSON refresh token. - string token = 1; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/service_account_jwt_access/v3/service_account_jwt_access_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/service_account_jwt_access/v3/service_account_jwt_access_credentials.proto deleted file mode 100644 index 09c686f..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/service_account_jwt_access/v3/service_account_jwt_access_credentials.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.service_account_jwt_access.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.service_account_jwt_access.v3"; -option java_outer_classname = "ServiceAccountJwtAccessCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/service_account_jwt_access/v3;service_account_jwt_accessv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Service Account JWT Access Credentials] - -// [#not-implemented-hide:] -message ServiceAccountJwtAccessCredentials { - // JSON key. - string json_key = 1; - - // Token lifetime. - google.protobuf.Duration token_lifetime = 2; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/call_credentials/sts_service/v3/sts_service_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/call_credentials/sts_service/v3/sts_service_credentials.proto deleted file mode 100644 index 12f285d..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/call_credentials/sts_service/v3/sts_service_credentials.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.call_credentials.sts_service.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.call_credentials.sts_service.v3"; -option java_outer_classname = "StsServiceCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/call_credentials/sts_service/v3;sts_servicev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC STS Credentials] - -// Security token service configuration that allows Google gRPC to -// fetch security token from an OAuth 2.0 authorization server. -// See https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16 and -// https://github.com/grpc/grpc/pull/19587. -// [#not-implemented-hide:] -// [#next-free-field: 10] -message StsServiceCredentials { - // URI of the token exchange service that handles token exchange requests. - // [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - // https://github.com/bufbuild/protoc-gen-validate/issues/303] - string token_exchange_service_uri = 1; - - // Location of the target service or resource where the client - // intends to use the requested security token. - string resource = 2; - - // Logical name of the target service where the client intends to - // use the requested security token. - string audience = 3; - - // The desired scope of the requested security token in the - // context of the service or resource where the token will be used. - string scope = 4; - - // Type of the requested security token. - string requested_token_type = 5; - - // The path of subject token, a security token that represents the - // identity of the party on behalf of whom the request is being made. - string subject_token_path = 6 [(validate.rules).string = {min_len: 1}]; - - // Type of the subject token. - string subject_token_type = 7 [(validate.rules).string = {min_len: 1}]; - - // The path of actor token, a security token that represents the identity - // of the acting party. The acting party is authorized to use the - // requested security token and act on behalf of the subject. - string actor_token_path = 8; - - // Type of the actor token. - string actor_token_type = 9; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/google_default/v3/google_default_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/channel_credentials/google_default/v3/google_default_credentials.proto deleted file mode 100644 index 77c3af4..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/google_default/v3/google_default_credentials.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.channel_credentials.google_default.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.channel_credentials.google_default.v3"; -option java_outer_classname = "GoogleDefaultCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/channel_credentials/google_default/v3;google_defaultv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Google Default Credentials] - -// [#not-implemented-hide:] -message GoogleDefaultCredentials { -} diff --git a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/insecure/v3/insecure_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/channel_credentials/insecure/v3/insecure_credentials.proto deleted file mode 100644 index 70d5845..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/insecure/v3/insecure_credentials.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.channel_credentials.insecure.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.channel_credentials.insecure.v3"; -option java_outer_classname = "InsecureCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/channel_credentials/insecure/v3;insecurev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Insecure Credentials] - -// [#not-implemented-hide:] -message InsecureCredentials { -} diff --git a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/local/v3/local_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/channel_credentials/local/v3/local_credentials.proto deleted file mode 100644 index 00514a0..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/local/v3/local_credentials.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.channel_credentials.local.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.channel_credentials.local.v3"; -option java_outer_classname = "LocalCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/channel_credentials/local/v3;localv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Local Credentials] - -// [#not-implemented-hide:] -message LocalCredentials { -} diff --git a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.proto deleted file mode 100644 index f64c16b..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.channel_credentials.tls.v3; - -import "envoy/extensions/transport_sockets/tls/v3/tls.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.channel_credentials.tls.v3"; -option java_outer_classname = "TlsCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/channel_credentials/tls/v3;tlsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC TLS Credentials] - -// [#not-implemented-hide:] -message TlsCredentials { - // The certificate provider instance for the root cert. Must be set. - transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance root_certificate_provider = - 1; - - // The certificate provider instance for the identity cert. Optional; - // if unset, no identity certificate will be sent to the server. - transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance - identity_certificate_provider = 2; -} diff --git a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.proto b/src/main/proto/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.proto deleted file mode 100644 index ba8d471..0000000 --- a/src/main/proto/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.grpc_service.channel_credentials.xds.v3; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.grpc_service.channel_credentials.xds.v3"; -option java_outer_classname = "XdsCredentialsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/grpc_service/channel_credentials/xds/v3;xdsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC xDS Credentials] - -// [#not-implemented-hide:] -message XdsCredentials { - // Fallback credentials. Required. - google.protobuf.Any fallback_credentials = 1; -} diff --git a/src/main/proto/envoy/extensions/health_check/event_sinks/file/v3/file.proto b/src/main/proto/envoy/extensions/health_check/event_sinks/file/v3/file.proto deleted file mode 100644 index d436474..0000000 --- a/src/main/proto/envoy/extensions/health_check/event_sinks/file/v3/file.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.health_check.event_sinks.file.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.health_check.event_sinks.file.v3"; -option java_outer_classname = "FileProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/health_check/event_sinks/file/v3;filev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Health Check Log File Sink] -// [#extension: envoy.health_check.event_sinks.file] - -// Health check event file sink. -// The health check event will be converted to JSON. -message HealthCheckEventFileSink { - // Specifies the path to the health check event log. - string event_log_path = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/health_checkers/redis/v3/redis.proto b/src/main/proto/envoy/extensions/health_checkers/redis/v3/redis.proto deleted file mode 100644 index 1277c05..0000000 --- a/src/main/proto/envoy/extensions/health_checkers/redis/v3/redis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.health_checkers.redis.v3; - -import "envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.health_checkers.redis.v3"; -option java_outer_classname = "RedisProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/health_checkers/redis/v3;redisv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Redis] -// Redis health checker :ref:`configuration overview `. -// [#extension: envoy.health_checkers.redis] - -message Redis { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.health_checker.redis.v2.Redis"; - - // If set, optionally perform ``EXISTS `` instead of ``PING``. A return value - // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other - // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance - // by setting the specified key to any value and waiting for traffic to drain. - string key = 1; - - // Use AWS IAM for health checker authentication - filters.network.redis_proxy.v3.AwsIam aws_iam = 2; -} diff --git a/src/main/proto/envoy/extensions/health_checkers/thrift/v3/thrift.proto b/src/main/proto/envoy/extensions/health_checkers/thrift/v3/thrift.proto deleted file mode 100644 index c0297b1..0000000 --- a/src/main/proto/envoy/extensions/health_checkers/thrift/v3/thrift.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.health_checkers.thrift.v3; - -import "envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.health_checkers.thrift.v3"; -option java_outer_classname = "ThriftProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/health_checkers/thrift/v3;thriftv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Thrift] -// Thrift health checker :ref:`configuration overview `. -// [#extension: envoy.health_checkers.thrift] - -message Thrift { - // Specifies the method name that will be set on each health check request dispatched to an upstream host. - // Note that method name is case sensitive. - string method_name = 1 [(validate.rules).string = {min_len: 1}]; - - // Configures the transport type to be used with the health checks. Note that - // :ref:`AUTO_TRANSPORT` - // is not supported, and we don't honor :ref:`ThriftProtocolOptions` - // since it's possible to set to :ref:`AUTO_TRANSPORT`. - // [#extension-category: envoy.filters.network] - filters.network.thrift_proxy.v3.TransportType transport = 2 - [(validate.rules).enum = {defined_only: true}]; - - // Configures the protocol type to be used with the health checks. Note that - // :ref:`AUTO_PROTOCOL` - // and :ref:`TWITTER` - // are not supported, and we don't honor :ref:`ThriftProtocolOptions` - // since it's possible to set to :ref:`AUTO_PROTOCOL` - // or :ref:`TWITTER`. - filters.network.thrift_proxy.v3.ProtocolType protocol = 3 - [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/http/cache/file_system_http_cache/v3/file_system_http_cache.proto b/src/main/proto/envoy/extensions/http/cache/file_system_http_cache/v3/file_system_http_cache.proto deleted file mode 100644 index ebedf30..0000000 --- a/src/main/proto/envoy/extensions/http/cache/file_system_http_cache/v3/file_system_http_cache.proto +++ /dev/null @@ -1,131 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.cache.file_system_http_cache.v3; - -import "envoy/extensions/common/async_files/v3/async_file_manager.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.cache.file_system_http_cache.v3"; -option java_outer_classname = "FileSystemHttpCacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/cache/file_system_http_cache/v3;file_system_http_cachev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: FileSystemHttpCacheConfig] -// [#extension: envoy.extensions.http.cache.file_system_http_cache] - -// Configuration for a cache implementation that caches in the local file system. -// -// By default this cache uses a least-recently-used eviction strategy. -// -// For implementation details, see `DESIGN.md `_. -// [#next-free-field: 11] -message FileSystemHttpCacheConfig { - // Configuration of a manager for how the file system is used asynchronously. - common.async_files.v3.AsyncFileManagerConfig manager_config = 1 - [(validate.rules).message = {required: true}]; - - // Path at which the cache files will be stored. - // - // This also doubles as the unique identifier for a cache, so a cache can be shared - // between different routes, or separate paths can be used to specify separate caches. - // - // If the same ``cache_path`` is used in more than one ``CacheConfig``, the rest of the - // ``FileSystemHttpCacheConfig`` must also match, and will refer to the same cache - // instance. - string cache_path = 2 [(validate.rules).string = {min_len: 1}]; - - // The maximum size of the cache in bytes - when reached, cache eviction is triggered. - // - // This is measured as the sum of file sizes, such that it includes headers, trailers, - // and metadata, but does not include e.g. file system overhead and block size padding. - // - // If unset there is no limit except file system failure. - google.protobuf.UInt64Value max_cache_size_bytes = 3; - - // The maximum size of a cache entry in bytes - larger responses will not be cached. - // - // This is measured as the file size for the cache entry, such that it includes - // headers, trailers, and metadata. - // - // If unset there is no limit. - // - // [#not-implemented-hide:] - google.protobuf.UInt64Value max_individual_cache_entry_size_bytes = 4; - - // The maximum number of cache entries - when reached, cache eviction is triggered. - // - // If unset there is no limit. - google.protobuf.UInt64Value max_cache_entry_count = 5; - - // A number of folders into which to subdivide the cache. - // - // Setting this can help with performance in file systems where a large number of inodes - // in a single branch degrades performance. The optimal value in that case would be - // ``sqrt(expected_cache_entry_count)``. - // - // On file systems that perform well with many inodes, the default value of 1 should be used. - // - // [#not-implemented-hide:] - uint32 cache_subdivisions = 6; - - // The amount of the maximum cache size or count to evict when cache eviction is - // triggered. For example, if ``max_cache_size_bytes`` is 10000000 and ``evict_fraction`` - // is 0.2, then when the cache exceeds 10MB, entries will be evicted until the cache size is - // less than or equal to 8MB. - // - // The default value of 0 means when the cache exceeds 10MB, entries will be evicted only - // until the cache is less than or equal to 10MB. - // - // Evicting a larger fraction will mean the eviction thread will run less often (sparing - // CPU load) at the cost of more cache misses due to the extra evicted entries. - // - // [#not-implemented-hide:] - float evict_fraction = 7; - - // The longest amount of time to wait before running a cache eviction pass. An eviction - // pass may not necessarily remove any files, but it will update the cache state to match - // the on-disk state. This can be important if multiple instances are accessing the same - // cache in parallel. (e.g. if two instances each independently added non-overlapping 10MB - // of content to a cache with a 15MB limit, neither instance would be aware that the limit - // was exceeded without this synchronizing pass.) - // - // If an eviction pass has not happened within this duration, the eviction thread will - // be awoken and perform an eviction pass. - // - // If unset, there will be no eviction passes except those triggered by cache limits. - // - // [#not-implemented-hide:] - google.protobuf.Duration max_eviction_period = 8; - - // The shortest amount of time between cache eviction passes. This can be used to reduce - // eviction churn, if your cache max size can be flexible. If a cache eviction pass already - // occurred more recently than this period when another would be triggered, that new - // pass is cancelled. - // - // This means the cache can potentially grow beyond ``max_cache_size_bytes`` by as much as - // can be written within the duration specified. - // - // Generally you would use *either* ``min_eviction_period`` *or* ``evict_fraction`` to - // reduce churn. Both together will work but since they're both aiming for the same goal, - // it's simpler not to. - // - // [#not-implemented-hide:] - google.protobuf.Duration min_eviction_period = 9; - - // If true, and the cache path does not exist, attempt to create the cache path, including - // any missing directories leading up to it. On failure, the config is rejected. - // - // If false, and the cache path does not exist, the config is rejected. - // - // [#not-implemented-hide:] - bool create_cache_path = 10; -} diff --git a/src/main/proto/envoy/extensions/http/cache/simple_http_cache/v3/config.proto b/src/main/proto/envoy/extensions/http/cache/simple_http_cache/v3/config.proto deleted file mode 100644 index b659ca8..0000000 --- a/src/main/proto/envoy/extensions/http/cache/simple_http_cache/v3/config.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.cache.simple_http_cache.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.cache.simple_http_cache.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/cache/simple_http_cache/v3;simple_http_cachev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SimpleHttpCache CacheFilter storage plugin] - -// [#extension: envoy.extensions.http.cache.simple] -message SimpleHttpCacheConfig { -} diff --git a/src/main/proto/envoy/extensions/http/cache_v2/file_system_http_cache/v3/file_system_http_cache.proto b/src/main/proto/envoy/extensions/http/cache_v2/file_system_http_cache/v3/file_system_http_cache.proto deleted file mode 100644 index f47546b..0000000 --- a/src/main/proto/envoy/extensions/http/cache_v2/file_system_http_cache/v3/file_system_http_cache.proto +++ /dev/null @@ -1,131 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.cache_v2.file_system_http_cache.v3; - -import "envoy/extensions/common/async_files/v3/async_file_manager.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.cache_v2.file_system_http_cache.v3"; -option java_outer_classname = "FileSystemHttpCacheProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/cache_v2/file_system_http_cache/v3;file_system_http_cachev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: FileSystemHttpCacheV2Config] -// [#extension: envoy.extensions.http.cache_v2.file_system_http_cache] - -// Configuration for a cache implementation that caches in the local file system. -// -// By default this cache uses a least-recently-used eviction strategy. -// -// For implementation details, see `DESIGN.md `_. -// [#next-free-field: 11] -message FileSystemHttpCacheV2Config { - // Configuration of a manager for how the file system is used asynchronously. - common.async_files.v3.AsyncFileManagerConfig manager_config = 1 - [(validate.rules).message = {required: true}]; - - // Path at which the cache files will be stored. - // - // This also doubles as the unique identifier for a cache, so a cache can be shared - // between different routes, or separate paths can be used to specify separate caches. - // - // If the same ``cache_path`` is used in more than one ``CacheV2Config``, the rest of the - // ``FileSystemHttpCacheV2Config`` must also match, and will refer to the same cache - // instance. - string cache_path = 2 [(validate.rules).string = {min_len: 1}]; - - // The maximum size of the cache in bytes - when reached, cache eviction is triggered. - // - // This is measured as the sum of file sizes, such that it includes headers, trailers, - // and metadata, but does not include e.g. file system overhead and block size padding. - // - // If unset there is no limit except file system failure. - google.protobuf.UInt64Value max_cache_size_bytes = 3; - - // The maximum size of a cache entry in bytes - larger responses will not be cached. - // - // This is measured as the file size for the cache entry, such that it includes - // headers, trailers, and metadata. - // - // If unset there is no limit. - // - // [#not-implemented-hide:] - google.protobuf.UInt64Value max_individual_cache_entry_size_bytes = 4; - - // The maximum number of cache entries - when reached, cache eviction is triggered. - // - // If unset there is no limit. - google.protobuf.UInt64Value max_cache_entry_count = 5; - - // A number of folders into which to subdivide the cache. - // - // Setting this can help with performance in file systems where a large number of inodes - // in a single branch degrades performance. The optimal value in that case would be - // ``sqrt(expected_cache_entry_count)``. - // - // On file systems that perform well with many inodes, the default value of 1 should be used. - // - // [#not-implemented-hide:] - uint32 cache_subdivisions = 6; - - // The amount of the maximum cache size or count to evict when cache eviction is - // triggered. For example, if ``max_cache_size_bytes`` is 10000000 and ``evict_fraction`` - // is 0.2, then when the cache exceeds 10MB, entries will be evicted until the cache size is - // less than or equal to 8MB. - // - // The default value of 0 means when the cache exceeds 10MB, entries will be evicted only - // until the cache is less than or equal to 10MB. - // - // Evicting a larger fraction will mean the eviction thread will run less often (sparing - // CPU load) at the cost of more cache misses due to the extra evicted entries. - // - // [#not-implemented-hide:] - float evict_fraction = 7; - - // The longest amount of time to wait before running a cache eviction pass. An eviction - // pass may not necessarily remove any files, but it will update the cache state to match - // the on-disk state. This can be important if multiple instances are accessing the same - // cache in parallel. (e.g. if two instances each independently added non-overlapping 10MB - // of content to a cache with a 15MB limit, neither instance would be aware that the limit - // was exceeded without this synchronizing pass.) - // - // If an eviction pass has not happened within this duration, the eviction thread will - // be awoken and perform an eviction pass. - // - // If unset, there will be no eviction passes except those triggered by cache limits. - // - // [#not-implemented-hide:] - google.protobuf.Duration max_eviction_period = 8; - - // The shortest amount of time between cache eviction passes. This can be used to reduce - // eviction churn, if your cache max size can be flexible. If a cache eviction pass already - // occurred more recently than this period when another would be triggered, that new - // pass is cancelled. - // - // This means the cache can potentially grow beyond ``max_cache_size_bytes`` by as much as - // can be written within the duration specified. - // - // Generally you would use *either* ``min_eviction_period`` *or* ``evict_fraction`` to - // reduce churn. Both together will work but since they're both aiming for the same goal, - // it's simpler not to. - // - // [#not-implemented-hide:] - google.protobuf.Duration min_eviction_period = 9; - - // If true, and the cache path does not exist, attempt to create the cache path, including - // any missing directories leading up to it. On failure, the config is rejected. - // - // If false, and the cache path does not exist, the config is rejected. - // - // [#not-implemented-hide:] - bool create_cache_path = 10; -} diff --git a/src/main/proto/envoy/extensions/http/cache_v2/simple_http_cache/v3/config.proto b/src/main/proto/envoy/extensions/http/cache_v2/simple_http_cache/v3/config.proto deleted file mode 100644 index 9db3757..0000000 --- a/src/main/proto/envoy/extensions/http/cache_v2/simple_http_cache/v3/config.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.cache_v2.simple_http_cache.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.cache_v2.simple_http_cache.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/cache_v2/simple_http_cache/v3;simple_http_cachev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: SimpleHttpCache CacheFilter storage plugin] - -// [#extension: envoy.extensions.http.cache_v2.simple] -message SimpleHttpCacheV2Config { -} diff --git a/src/main/proto/envoy/extensions/http/custom_response/local_response_policy/v3/local_response_policy.proto b/src/main/proto/envoy/extensions/http/custom_response/local_response_policy/v3/local_response_policy.proto deleted file mode 100644 index b40800c..0000000 --- a/src/main/proto/envoy/extensions/http/custom_response/local_response_policy/v3/local_response_policy.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.custom_response.local_response_policy.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/substitution_format_string.proto"; - -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.custom_response.local_response_policy.v3"; -option java_outer_classname = "LocalResponsePolicyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/custom_response/local_response_policy/v3;local_response_policyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Local Response Policy for Custom Response] -// [#extension: envoy.http.custom_response.local_response_policy] - -// Custom response policy to serve a locally stored response to the -// downstream. -message LocalResponsePolicy { - // Optional new local reply body text. It will be used - // in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``. - config.core.v3.DataSource body = 1; - - // Optional body format to be used for this response. If ``body_format`` is not - // provided, and ``body`` is, the contents of ``body`` will be used to populate - // the body of the local reply without formatting. - config.core.v3.SubstitutionFormatString body_format = 2; - - // The new response status code if specified. - google.protobuf.UInt32Value status_code = 3 [(validate.rules).uint32 = {lt: 600 gte: 200}]; - - // HTTP headers to add to the response. This allows the - // response policy to append, to add or to override headers of - // the original response for local body, or the custom response from the - // remote body, before it is sent to a downstream client. - repeated config.core.v3.HeaderValueOption response_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; -} diff --git a/src/main/proto/envoy/extensions/http/custom_response/redirect_policy/v3/redirect_policy.proto b/src/main/proto/envoy/extensions/http/custom_response/redirect_policy/v3/redirect_policy.proto deleted file mode 100644 index eff21d7..0000000 --- a/src/main/proto/envoy/extensions/http/custom_response/redirect_policy/v3/redirect_policy.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.custom_response.redirect_policy.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/route/v3/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.custom_response.redirect_policy.v3"; -option java_outer_classname = "RedirectPolicyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/custom_response/redirect_policy/v3;redirect_policyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Redirect Policy for Custom Response] -// [#extension: envoy.http.custom_response.redirect_policy] - -// Custom response policy to internally redirect the original response to a different -// upstream. -// [#next-free-field: 7] -message RedirectPolicy { - oneof redirect_action_specifier { - option (validate.required) = true; - - // The Http URI to redirect the original request to, to get the custom - // response. - // It should be a full FQDN with protocol, host and path. - // - // Example: - // - // .. code-block:: yaml - // - // uri: https://www.mydomain.com/path/to/404.txt - // - string uri = 1 [(validate.rules).string = {min_len: 1}]; - - // Specify elements of the redirect url individually. - // Note: Do not specify the ``response_code`` field in ``redirect_action``, use - // ``status_code`` instead. - // The following fields in ``redirect_action`` are currently not supported, - // and specifying them will cause the config to be rejected: - // - ``prefix_rewrite`` - // - ``regex_rewrite`` - config.route.v3.RedirectAction redirect_action = 2; - } - - // The new response status code if specified. This is used to override the - // status code of the response from the new upstream if it is not an error status. - google.protobuf.UInt32Value status_code = 3 [(validate.rules).uint32 = {lte: 999 gte: 200}]; - - // HTTP headers to add to the response. This allows the - // response policy to append, to add or to override headers of - // the original response for local body, or the custom response from the - // remote body, before it is sent to a downstream client. - // Note that these are not applied if the redirected response is an error - // response. - repeated config.core.v3.HeaderValueOption response_headers_to_add = 4 - [(validate.rules).repeated = {max_items: 1000}]; - - // HTTP headers to add to the request before it is internally redirected. - repeated config.core.v3.HeaderValueOption request_headers_to_add = 5 - [(validate.rules).repeated = {max_items: 1000}]; - - // Custom action to modify request headers before selection of the - // redirected route. - // [#comment: TODO(pradeepcrao) add an extension category.] - config.core.v3.TypedExtensionConfig modify_request_headers_action = 6; -} diff --git a/src/main/proto/envoy/extensions/http/early_header_mutation/header_mutation/v3/header_mutation.proto b/src/main/proto/envoy/extensions/http/early_header_mutation/header_mutation/v3/header_mutation.proto deleted file mode 100644 index 8cad541..0000000 --- a/src/main/proto/envoy/extensions/http/early_header_mutation/header_mutation/v3/header_mutation.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.early_header_mutation.header_mutation.v3; - -import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.early_header_mutation.header_mutation.v3"; -option java_outer_classname = "HeaderMutationProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/early_header_mutation/header_mutation/v3;header_mutationv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Default early header mutation extension] -// [#extension: envoy.http.early_header_mutation.header_mutation] - -// This extension allows for early header mutation by the substitution formatter. -message HeaderMutation { - repeated config.common.mutation_rules.v3.HeaderMutation mutations = 1 - [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/extensions/http/ext_proc/processing_request_modifiers/mapped_attribute_builder/v3/mapped_attribute_builder.proto b/src/main/proto/envoy/extensions/http/ext_proc/processing_request_modifiers/mapped_attribute_builder/v3/mapped_attribute_builder.proto deleted file mode 100644 index 2093797..0000000 --- a/src/main/proto/envoy/extensions/http/ext_proc/processing_request_modifiers/mapped_attribute_builder/v3/mapped_attribute_builder.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.ext_proc.processing_request_modifiers.mapped_attribute_builder.v3"; -option java_outer_classname = "MappedAttributeBuilderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/ext_proc/processing_request_modifiers/mapped_attribute_builder/v3;mapped_attribute_builderv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Mapped Attribute Builder for the external processor] -// [#extension: envoy.http.ext_proc.processing_request_modifiers.mapped_attribute_builder] - -// Extension to build custom attributes in the :ref:`request -// ` based on a configurable mapping. The -// native implementation uses the CEL expression as the key, which is not always desirable. Using this -// extension, one can re-map a CEL expression that references internal filter state into a more -// user-friendly key that decouples the value from the underlying filter implementation. -// -// If a given CEL expression fails to eval, it will not be present in the attributes struct. -// -// If this extension is configured, then the original :ref:`ProcessingRequest -// `'s ``request_attributes`` are ignored, -// and all attributes should be explicitly set via this extension. -// -// An example configuration may look like so: -// -// .. code-block:: yaml -// -// mapped_request_attributes: -// "request.path": "request.path" -// "source.country": "metadata.filter_metadata['com.example.location_filter']['country_code']" -// -// In the above example, the complex filter_metadata expression is evaluated via CEL, and the value -// is stored under the friendlier ``source.country`` key. ``The ProcessingRequest`` would look like: -// -// .. code-block:: text -// -// attributes { -// key: "envoy.filters.http.ext_proc" -// value { -// fields { -// key: "request.path" -// value { -// string_value: "/profile" -// } -// } -// fields { -// key: "source.country" -// value { -// string_value: "US" -// } -// } -// } -// } -// -// .. note:: -// Processing request modifiers are currently in alpha. -// -message MappedAttributeBuilder { - // A map of request attributes to set in the attributes struct. - // The key is the attribute name, the value is the attribute value, - // interpretable by CEL. This allows for the re-mapping of attributes, which is not supported - // by the native attribute building logic. - map mapped_request_attributes = 1; - - // Similar to ``mapped_request_attributes``, but for response attributes. The - // response nomenclature here just indicates that the attributes, whatever they may be, are sent - // with a response headers, body, or trailers ext_proc call. - // If a value contains a request key, e.g., ``request.host``, then the attribute would - // just be sent along in the response. This is useful if a given ext_proc extension is only - // enabled for response handling, e.g., ``RESPONSE_HEADERS`` but the backend wants to access request - // metadata. - map mapped_response_attributes = 2; -} diff --git a/src/main/proto/envoy/extensions/http/ext_proc/response_processors/save_processing_response/v3/save_processing_response.proto b/src/main/proto/envoy/extensions/http/ext_proc/response_processors/save_processing_response/v3/save_processing_response.proto deleted file mode 100644 index 87f7b10..0000000 --- a/src/main/proto/envoy/extensions/http/ext_proc/response_processors/save_processing_response/v3/save_processing_response.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.ext_proc.response_processors.save_processing_response.v3; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.ext_proc.response_processors.save_processing_response.v3"; -option java_outer_classname = "SaveProcessingResponseProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/ext_proc/response_processors/save_processing_response/v3;save_processing_responsev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Save Processing Response from external processor.] -// [#extension: envoy.http.ext_proc.response_processors.save_processing_response] - -// Extension to save the :ref:`response -// ` from the external processor as -// filter state with name -// "envoy.http.ext_proc.response_processors.save_processing_response[.:ref:`filter_state_name_suffix -// `]. -// This extension supports saving of request and response headers and trailers, -// and immediate response. -// -// .. note:: -// Response processors are currently in alpha. -// -// [#next-free-field: 7] -message SaveProcessingResponse { - message SaveOptions { - // Whether or not to save the response for the response type. - bool save_response = 1; - - // When true, saves the response if there was an error when processing - // the response from the external processor. - bool save_on_error = 2; - } - - // The default filter state name is - // "envoy.http.ext_proc.response_processors.save_processing_response". - // If defined, ``filter_state_name_suffix`` is appended to this. - // For example, setting ``filter_state_name_suffix`` to "xyz" will set the - // filter state name to "envoy.http.ext_proc.response_processors.save_processing_response.xyz" - string filter_state_name_suffix = 1; - - // Save the response to filter state when :ref:`request_headers - // ` is set. - SaveOptions save_request_headers = 2; - - // Save the response to filter state when :ref:`response_headers - // ` is set. - SaveOptions save_response_headers = 3; - - // Save the response to filter state when :ref:`request_trailers - // ` is set. - SaveOptions save_request_trailers = 4; - - // Save the response to filter state when :ref:`response_trailers - // ` is set. - SaveOptions save_response_trailers = 5; - - // Save the response to filter state when :ref:`immediate_response - // ` is set. - SaveOptions save_immediate_response = 6; -} diff --git a/src/main/proto/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto b/src/main/proto/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto deleted file mode 100644 index 29daa86..0000000 --- a/src/main/proto/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.header_formatters.preserve_case.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.header_formatters.preserve_case.v3"; -option java_outer_classname = "PreserveCaseProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/header_formatters/preserve_case/v3;preserve_casev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Preserve case header formatter] -// [#extension: envoy.http.stateful_header_formatters.preserve_case] - -// Configuration for the preserve case header formatter. -// See the :ref:`header casing ` configuration guide for more -// information. -message PreserveCaseFormatterConfig { - enum FormatterTypeOnEnvoyHeaders { - // Use LowerCase on Envoy added headers. - DEFAULT = 0; - - // Use ProperCaseHeaderKeyFormatter on Envoy added headers that upper cases the first character - // in each word. The first character as well as any alpha character following a special - // character is upper cased. - PROPER_CASE = 1; - } - - // Allows forwarding reason phrase text. - // This is off by default, and a standard reason phrase is used for a corresponding HTTP response code. - bool forward_reason_phrase = 1; - - // Type of formatter to use on headers which are added by Envoy (which are lower case by default). - // The default type is DEFAULT, use LowerCase on Envoy headers. - FormatterTypeOnEnvoyHeaders formatter_type_on_envoy_headers = 2 - [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.proto b/src/main/proto/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.proto deleted file mode 100644 index 0a1e88f..0000000 --- a/src/main/proto/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.proto +++ /dev/null @@ -1,228 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.header_validators.envoy_default.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.header_validators.envoy_default.v3"; -option java_outer_classname = "HeaderValidatorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/header_validators/envoy_default/v3;envoy_defaultv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Envoy's default Header Validator config] - -// This extension validates that HTTP request and response headers are well formed according to respective RFCs. -// -// The validator performs comprehensive HTTP header validation including: -// -// #. HTTP/1 header map validity according to `RFC 7230 section 3.2 `_. -// #. Syntax of HTTP/1 request target URI and response status. -// #. HTTP/2 header map validity according to `RFC 7540 section 8.1.2 `_. -// #. Syntax of HTTP/2 pseudo headers. -// #. HTTP/3 header map validity according to `RFC 9114 section 4.3 `_. -// #. Syntax of HTTP/3 pseudo headers. -// #. Syntax of Content-Length and Transfer-Encoding. -// #. Validation of HTTP/1 requests with both ``Content-Length`` and ``Transfer-Encoding`` headers. -// #. Normalization of the URI path according to `Normalization and Comparison `_ -// without `case normalization `_. -// -// This validator ensures that HTTP traffic processed by Envoy conforms to established -// standards and helps prevent issues caused by malformed headers or invalid HTTP syntax. -// -// [#comment:TODO(yanavlasov): Put #extension: envoy.http.header_validators.envoy_default after it is not hidden any more] -// [#next-free-field: 6] -message HeaderValidatorConfig { - // Action to take when Envoy receives client request with header names containing underscore - // characters. - // - // Underscore character is allowed in header names by RFC-7230, and this behavior is implemented - // as a security measure due to systems that treat ``_`` and ``-`` as interchangeable. Envoy by - // default allows client request headers with underscore characters. - // - // This setting provides control over how to handle such headers for security and compatibility reasons. - enum HeadersWithUnderscoresAction { - // Allow headers with underscores. This is the default behavior. - ALLOW = 0; - - // Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests - // end with the stream reset. The - // :ref:`httpN.requests_rejected_with_underscores_in_headers ` counter - // is incremented for each rejected request. - REJECT_REQUEST = 1; - - // Drop the client header with name containing underscores. The header is dropped before the filter chain is - // invoked and as such filters will not see dropped headers. The - // :ref:`httpN.dropped_headers_with_underscores ` is incremented for - // each dropped header. - DROP_HEADER = 2; - } - - // Configuration options for URI path normalization and transformation. - // - // These options control how Envoy processes and normalizes incoming request URI paths - // to ensure consistent behavior and security. Path normalization helps prevent - // path traversal attacks and ensures that equivalent paths are handled consistently. - message UriPathNormalizationOptions { - // Determines the action for requests that contain ``%2F``, ``%2f``, ``%5C`` or ``%5c`` sequences in the URI path. - // This operation occurs before URL normalization and the merge slashes transformations if they were enabled. - // - // Escaped slash sequences in URLs can be used for path confusion attacks, so proper handling - // is important for security. - enum PathWithEscapedSlashesAction { - // Default behavior specific to implementation (i.e. Envoy) of this configuration option. - // Envoy, by default, takes the ``KEEP_UNCHANGED`` action. - // - // .. note:: - // - // The implementation may change the default behavior at-will. - // - IMPLEMENTATION_SPECIFIC_DEFAULT = 0; - - // Keep escaped slashes unchanged in the URI path. - // This preserves the original request path without any modifications to escaped sequences. - KEEP_UNCHANGED = 1; - - // Reject client request with the 400 status. gRPC requests will be rejected with the ``INTERNAL`` (13) error code. - // The :ref:`httpN.downstream_rq_failed_path_normalization ` counter is incremented for each rejected request. - // - // This is the safest option when security is a primary concern, as it prevents any potential - // path confusion attacks by rejecting requests with escaped slashes entirely. - REJECT_REQUEST = 2; - - // Unescape ``%2F`` and ``%5C`` sequences and redirect the request to the new path if these sequences were present. - // The redirect occurs after path normalization and merge slashes transformations if they were configured. - // - // .. note:: - // - // gRPC requests will be rejected with the ``INTERNAL`` (13) error code. - // This option minimizes possibility of path confusion exploits by forcing request with unescaped slashes to - // traverse all parties: downstream client, intermediate proxies, Envoy and upstream server. - // - // The :ref:`httpN.downstream_rq_redirected_with_normalized_path ` counter is incremented for each - // redirected request. - UNESCAPE_AND_REDIRECT = 3; - - // Unescape ``%2F`` and ``%5C`` sequences. - // - // .. attention:: - // - // This option should not be enabled if intermediaries perform path based access control as - // it may lead to path confusion vulnerabilities. - // - UNESCAPE_AND_FORWARD = 4; - } - - // Should paths be normalized according to RFC 3986? - // - // This operation overwrites the original request URI path and the new path is used for processing of - // the request by HTTP filters and proxied to the upstream service. - // Envoy will respond with 400 to requests with malformed paths that fail path normalization. - // The default behavior is to normalize the path. - // - // This value may be overridden by the runtime variable - // :ref:`http_connection_manager.normalize_path`. - // See `Normalization and Comparison `_ - // for details of normalization. - // - // .. note:: - // - // Envoy does not perform - // `case normalization `_. - // URI path normalization can be applied to a portion of requests by setting the - // ``envoy_default_header_validator.path_normalization`` runtime value. - // - bool skip_path_normalization = 1; - - // Determines if adjacent slashes in the path are merged into one. - // - // This operation overwrites the original request URI path and the new path is used for processing of - // the request by HTTP filters and proxied to the upstream service. - // Setting this option to ``true`` will cause incoming requests with path ``//dir///file`` to not match against - // route with ``prefix`` match set to ``/dir``. Defaults to ``false``. - // - // .. note:: - // - // Slash merging is not part of the - // `HTTP spec `_ and is provided for convenience. - // Merging of slashes in URI path can be applied to a portion of requests by setting the - // ``envoy_default_header_validator.merge_slashes`` runtime value. - // - bool skip_merging_slashes = 2; - - // The action to take when request URL path contains escaped slash sequences (``%2F``, ``%2f``, ``%5C`` and ``%5c``). - // - // This operation may overwrite the original request URI path and the new path is used for processing of - // the request by HTTP filters and proxied to the upstream service. - // - // The handling of escaped slashes is important for security as these sequences can be used - // in path confusion attacks to bypass access controls. - PathWithEscapedSlashesAction path_with_escaped_slashes_action = 3 - [(validate.rules).enum = {defined_only: true}]; - } - - // HTTP/1 protocol specific options for header validation. - // - // These options control how Envoy handles HTTP/1 specific behaviors and edge cases - // that may not apply to HTTP/2 or HTTP/3 protocols. - message Http1ProtocolOptions { - // Allows Envoy to process HTTP/1 requests/responses with both ``Content-Length`` and ``Transfer-Encoding`` - // headers set. By default such messages are rejected, but if option is enabled - Envoy will - // remove the ``Content-Length`` header and process the message. - // - // See `RFC7230, sec. 3.3.3 `_ for details. - // - // .. attention:: - // - // Enabling this option might lead to request smuggling vulnerabilities, especially if traffic - // is proxied via multiple layers of proxies. - // - bool allow_chunked_length = 1; - } - - // HTTP/1 protocol specific options. - // These settings control HTTP/1 specific validation behaviors. - Http1ProtocolOptions http1_protocol_options = 1; - - // The URI path normalization options. - // - // By default Envoy normalizes URI path using the default values of the :ref:`UriPathNormalizationOptions - // `. - // URI path transformations specified by the ``uri_path_normalization_options`` configuration can be applied to a portion - // of requests by setting the ``envoy_default_header_validator.uri_path_transformations`` runtime value. - // - // .. attention:: - // - // Disabling path normalization may lead to path confusion vulnerabilities in access control or incorrect service - // selection. - // - UriPathNormalizationOptions uri_path_normalization_options = 2; - - // Restrict HTTP methods to these defined in the `RFC 7231 section 4.1 `_. - // - // Envoy will respond with 400 to requests with disallowed methods. - // By default methods with arbitrary names are accepted. - // - // This setting helps enforce HTTP compliance and can prevent attacks that rely on - // non-standard HTTP methods. - bool restrict_http_methods = 3; - - // Action to take when a client request with a header name containing underscore characters is received. - // - // If this setting is not specified, the value defaults to ``ALLOW``. - // - // This setting provides security control over headers with underscores, which can be a source - // of security issues when different systems interpret underscores and hyphens differently. - HeadersWithUnderscoresAction headers_with_underscores_action = 4; - - // Allow requests with fragment in URL path and strip the fragment before request processing. - // - // By default Envoy rejects requests with fragment in URL path. When this option is enabled, - // the fragment portion (everything after ``#``) will be removed from the path before - // further processing. - // - // Fragments are typically used by client-side applications and should not normally - // be sent to the server, so stripping them can help normalize requests. - bool strip_fragment_from_path = 5; -} diff --git a/src/main/proto/envoy/extensions/http/injected_credentials/generic/v3/generic.proto b/src/main/proto/envoy/extensions/http/injected_credentials/generic/v3/generic.proto deleted file mode 100644 index e6c3bfa..0000000 --- a/src/main/proto/envoy/extensions/http/injected_credentials/generic/v3/generic.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.injected_credentials.generic.v3; - -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.injected_credentials.generic.v3"; -option java_outer_classname = "GenericProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/injected_credentials/generic/v3;genericv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Generic Credential] -// [#extension: envoy.http.injected_credentials.generic] - -// Generic extension can be used to inject HTTP Basic Auth, Bearer Token, or any arbitrary credential -// into the proxied requests. -// The credential will be injected into the specified HTTP request header. -// Refer to [RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://www.rfc-editor.org/rfc/rfc6750) for details. -// -message Generic { - // The SDS configuration for the credential that will be injected to the specified HTTP request header. - // It must be a generic secret. - transport_sockets.tls.v3.SdsSecretConfig credential = 1 - [(validate.rules).message = {required: true}]; - - // The header that will be injected to the HTTP request with the provided credential. - // If not set, filter will default to: ``Authorization`` - string header = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME ignore_empty: true}]; - - // The prefix to prepend to the credential value before injecting it into the header. - // This is useful for adding a scheme such as ``Bearer `` or ``Basic `` to the credential. - // For example, if the credential is ``xyz123`` and the prefix is ``Bearer ``, the - // final header value will be ``Bearer xyz123``. - // If not set, the raw credential value will be injected without any prefix. - string header_value_prefix = 3; -} diff --git a/src/main/proto/envoy/extensions/http/injected_credentials/oauth2/v3/oauth2.proto b/src/main/proto/envoy/extensions/http/injected_credentials/oauth2/v3/oauth2.proto deleted file mode 100644 index 9b013cd..0000000 --- a/src/main/proto/envoy/extensions/http/injected_credentials/oauth2/v3/oauth2.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.injected_credentials.oauth2.v3; - -import "envoy/config/core/v3/http_uri.proto"; -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; - -import "google/protobuf/duration.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.injected_credentials.oauth2.v3"; -option java_outer_classname = "Oauth2Proto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/injected_credentials/oauth2/v3;oauth2v3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: OAuth2 Credential] -// [#extension: envoy.http.injected_credentials.oauth2] - -// OAuth2 extension can be used to retrieve an OAuth2 access token from an authorization server and inject it into the -// proxied requests. -// Currently, only the Client Credentials Grant flow is supported. -// The access token will be injected into the request headers using the ``Authorization`` header as a bearer token. -// [#next-free-field: 6] -message OAuth2 { - enum AuthType { - // The ``client_id`` and ``client_secret`` will be sent using HTTP Basic authentication scheme. - BASIC_AUTH = 0; - - // The ``client_id`` and ``client_secret`` will be sent in the URL encoded request body. - // This type should only be used when Auth server does not support Basic authentication. - URL_ENCODED_BODY = 1; - } - - // Credentials to authenticate client to the authorization server. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3) for details. - message ClientCredentials { - // Client ID. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. - string client_id = 1 [(validate.rules).string = {min_len: 1}]; - - // Client secret. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. - transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 - [(validate.rules).message = {required: true}]; - - // The method to use when sending credentials to the authorization server. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details. - AuthType auth_type = 3; - } - - // Optional additional parameters to include in the token endpoint request body. - // These parameters will be URL-encoded and added to the request body along with the standard OAuth2 parameters. - // Refer to your authorization server's documentation for supported parameters. - message EndpointParameter { - // Parameter name. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Parameter value. - string value = 2; - } - - // Endpoint on the authorization server to retrieve the access token from. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details. - config.core.v3.HttpUri token_endpoint = 1 [(validate.rules).message = {required: true}]; - - // Optional list of OAuth scopes to be claimed in the authorization request. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details. - repeated string scopes = 2; - - oneof flow_type { - option (validate.required) = true; - - // Client Credentials Grant. - // Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details. - ClientCredentials client_credentials = 3; - } - - // The interval between two successive retries to fetch token from Identity Provider. Default is 2 secs. - // The interval must be at least 1 second. - google.protobuf.Duration token_fetch_retry_interval = 4 - [(validate.rules).duration = {gte {seconds: 1}}]; - - // Optional list of additional parameters to send to the token endpoint. - // These parameters will be URL-encoded and included in the token request body. - repeated EndpointParameter endpoint_params = 5; -} diff --git a/src/main/proto/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto b/src/main/proto/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto deleted file mode 100644 index b2d3d7d..0000000 --- a/src/main/proto/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.original_ip_detection.custom_header.v3; - -import "envoy/type/v3/http_status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.original_ip_detection.custom_header.v3"; -option java_outer_classname = "CustomHeaderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/original_ip_detection/custom_header/v3;custom_headerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Custom header original IP detection extension] - -// This extension allows for the original downstream remote IP to be detected -// by reading the value from a configured header name. If the value is successfully parsed -// as an IP, it'll be treated as the effective downstream remote address and seen as such -// by all filters. See :ref:`original_ip_detection_extensions -// ` -// for an overview of how extensions operate and what happens when an extension fails -// to detect the remote IP. -// -// [#extension: envoy.http.original_ip_detection.custom_header] -message CustomHeaderConfig { - // The header name containing the original downstream remote address, if present. - // - // Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored. - string header_name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: true}]; - - // If set to true, the extension could decide that the detected address should be treated as - // trusted by the HCM. If the address is considered :ref:`trusted`, - // it might be used as input to determine if the request is internal (among other things). - bool allow_extension_to_set_address_as_trusted = 2; - - // If this is set, the request will be rejected when detection fails using it as the HTTP response status. - // - // .. note:: - // If this is set to < 400 or > 511, the default status 403 will be used instead. - type.v3.HttpStatus reject_with_status = 3; -} diff --git a/src/main/proto/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto b/src/main/proto/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto deleted file mode 100644 index dcc594f..0000000 --- a/src/main/proto/envoy/extensions/http/original_ip_detection/xff/v3/xff.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.original_ip_detection.xff.v3; - -import "envoy/config/core/v3/address.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.original_ip_detection.xff.v3"; -option java_outer_classname = "XffProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/original_ip_detection/xff/v3;xffv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: XFF original IP detection extension] - -// This extension allows for the original downstream remote IP to be detected -// by reading the :ref:`config_http_conn_man_headers_x-forwarded-for` header. -// -// [#extension: envoy.http.original_ip_detection.xff] -message XffConfig { - // The number of additional ingress proxy hops from the right side of the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when - // determining the origin client's IP address. The default is zero if this option - // is not specified. See the documentation for - // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. - // - // Only one of ``xff_num_trusted_hops`` and ``xff_trusted_cidrs`` can be set. - uint32 xff_num_trusted_hops = 1; - - // The `CIDR `_ ranges to trust when - // evaluating the remote IP address to determine the original client's IP address. - // This is used instead of - // :ref:`use_remote_address `. - // When the remote IP address matches a trusted CIDR and the - // :ref:`config_http_conn_man_headers_x-forwarded-for` header was sent, each entry - // in the ``x-forwarded-for`` header is evaluated from right to left and the first - // non-trusted address is used as the original client address. If all - // addresses in ``x-forwarded-for`` are within the trusted list, the first (leftmost) - // entry is used. - // - // .. warning:: - // - // Starting with Envoy v1.33.0, private IP address ranges are **not** automatically skipped - // when determining the original client address. We'll return the first address that is not - // in the ``xff_trusted_cidrs`` list, even if it is a private IP address. - // - // If you want to skip private IP addresses, explicitly add them to the ``xff_trusted_cidrs`` - // list. For example: - // - // .. code-block:: yaml - // - // xff_trusted_cidrs: - // cidrs: - // - address_prefix: "10.0.0.0" - // prefix_len: 8 - // - address_prefix: "172.16.0.0" - // prefix_len: 12 - // - address_prefix: "192.168.0.0" - // prefix_len: 16 - // - address_prefix: "127.0.0.0" - // prefix_len: 8 - // - address_prefix: "fc00::" - // prefix_len: 7 - // - address_prefix: "::1" - // prefix_len: 128 - // - // See :ref:`internal_address_config - // ` - // for more information about the v1.33.0 behavior change. - // - // This is typically used when requests are proxied by a - // `CDN `_. - // - // Only one of ``xff_num_trusted_hops`` and ``xff_trusted_cidrs`` can be set. - XffTrustedCidrs xff_trusted_cidrs = 2; - - // If set, Envoy will not append the remote address to the - // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header. - // - // .. attention:: - // - // For proper proxy behaviour it is not recommended to set this option. - // For backwards compatibility, if this option is unset it defaults to true. - // - // This only applies when :ref:`use_remote_address - // ` - // is false, otherwise :ref:`skip_xff_append - // ` - // applies. - google.protobuf.BoolValue skip_xff_append = 3; -} - -message XffTrustedCidrs { - // The list of `CIDRs `_ from which remote - // connections are considered trusted. - repeated config.core.v3.CidrRange cidrs = 1; -} diff --git a/src/main/proto/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto b/src/main/proto/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto deleted file mode 100644 index e76dcde..0000000 --- a/src/main/proto/envoy/extensions/http/stateful_session/cookie/v3/cookie.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.stateful_session.cookie.v3; - -import "envoy/type/http/v3/cookie.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.stateful_session.cookie.v3"; -option java_outer_classname = "CookieProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/stateful_session/cookie/v3;cookiev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Cookie based stateful session extension] - -// This extension allows the session state to be tracked via cookies. -// -// This extension first encodes the address of the upstream host selected by the load balancer -// into a ``set-cookie`` response header with the :ref:`cookie configuration -// `. -// when new requests are incoming, this extension will try to parse the specific upstream host -// address by the cookie name. If the address parsed from the cookie corresponds to a valid -// upstream host, this upstream host will be selected first. See :ref:`stateful session filter -// `. -// -// For example, if the cookie name is set to ``sticky-host``, envoy will prefer ``1.2.3.4:80`` -// as the upstream host when the request contains the following header: -// -// .. code-block:: none -// -// cookie: sticky-host="MS4yLjMuNDo4MA==" -// -// When processing the upstream response, if ``1.2.3.4:80`` is indeed the final choice the extension -// does nothing. If ``1.2.3.4:80`` is not the final choice, the new selected host will be used to -// update the cookie (via the ``set-cookie`` response header). -// -// [#extension: envoy.http.stateful_session.cookie] -message CookieBasedSessionState { - // The cookie configuration used to track session state. - type.http.v3.Cookie cookie = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/http/stateful_session/envelope/v3/envelope.proto b/src/main/proto/envoy/extensions/http/stateful_session/envelope/v3/envelope.proto deleted file mode 100644 index 79d089e..0000000 --- a/src/main/proto/envoy/extensions/http/stateful_session/envelope/v3/envelope.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.stateful_session.envelope.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.stateful_session.envelope.v3"; -option java_outer_classname = "EnvelopeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/stateful_session/envelope/v3;envelopev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Envelope stateful session extension] - -// The extension allows the session state is tracked via existing session context that initialized -// by the upstream server. It assumes that the upstream server will generate the session context -// (like session id header or cookie) in the initial response of the session and the client will use -// the same session context in the subsequent requests without any modification. -// -// When processing the response from the upstream, Envoy will check if the response contains the -// session context. If the response contains the session context, no matter if it's a new session -// context or an existing one, Envoy will join it and the upstream host as new session context. -// -// When processing the request from the downstream, Envoy will check if the request contains the -// session context. If the request contains the session context, Envoy will strip the -// upstream host from the session context. -// -// [#extension: envoy.http.stateful_session.envelope] -message EnvelopeSessionState { - message Header { - // Iff the header specified by the ``name`` field is present in the response (assume the ``name`` - // is set to ``session-header`` and original header value is ``xxxxxx``), then the upstream host - // address and value of ``name`` field specified header will be encoded in following format and - // the output will be used to update the ``name`` field specified header in the response: - // - // .. code-block:: none - // - // session-header: "MS4yLjMuNDo4MAo=;UV:eHh4eHh4Cg==" # base64(1.2.3.4:80);UV:base64(xxxxxx) - // - // The ``UV`` (upstream value) part is used to store the original upstream header value of - // ``name`` field specified header. - // - // If this mode is used then Envoy will assume that the header in the request will also be in the - // same format and will contain the ``UV`` part. This extension will parse the upstream host - // address and update the ``name`` field specified header in the request to the ``UV`` part. - string name = 1 [(validate.rules).string = {min_len: 1}]; - } - - // Set the header config to track the session state. - Header header = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/http/stateful_session/header/v3/header.proto b/src/main/proto/envoy/extensions/http/stateful_session/header/v3/header.proto deleted file mode 100644 index c5e7de1..0000000 --- a/src/main/proto/envoy/extensions/http/stateful_session/header/v3/header.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.http.stateful_session.header.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.http.stateful_session.header.v3"; -option java_outer_classname = "HeaderProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/http/stateful_session/header/v3;headerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Header based stateful session extension] - -// This extension allows the session state to be tracked via request headers. -// -// This extension encodes the address of the upstream host selected by the load balancer -// into a response header with the :ref:`header configuration -// `. -// When new requests are incoming, this extension will try to parse the specific upstream host -// address by header name. If the address parsed from the header corresponds to a valid -// upstream host, this upstream host will be selected first. See :ref:`stateful session filter -// `. -// -// For example, if the header name is set to ``session-header``, Envoy will prefer ``1.2.3.4:80`` -// as the upstream host when the request contains the following header: -// -// .. code-block:: none -// -// session-header: "MS4yLjMuNDo4MA==" -// -// When processing the upstream response, if ``1.2.3.4:80`` is indeed the final choice the extension -// does nothing. If ``1.2.3.4:80`` is not the final choice, the new selected host will be set to -// response headers (via the ``session-header`` response header). -// -// [#extension: envoy.http.stateful_session.header] -message HeaderBasedSessionState { - // The name that will be used to obtain header value from downstream HTTP request or generate - // new header for downstream. - string name = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto b/src/main/proto/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto deleted file mode 100644 index e556072..0000000 --- a/src/main/proto/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.internal_redirect.allow_listed_routes.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.internal_redirect.allow_listed_routes.v3"; -option java_outer_classname = "AllowListedRoutesConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/internal_redirect/allow_listed_routes/v3;allow_listed_routesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Allow listed routes internal redirect predicate] - -// An internal redirect predicate that accepts only explicitly allowed target routes. -// [#extension: envoy.internal_redirect_predicates.allow_listed_routes] -message AllowListedRoutesConfig { - // The list of routes that's allowed as redirect target by this predicate, - // identified by the route's :ref:`name `. - // Empty route names are not allowed. - repeated string allowed_route_names = 1 - [(validate.rules).repeated = {items {string {min_len: 1}}}]; -} diff --git a/src/main/proto/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto b/src/main/proto/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto deleted file mode 100644 index e5ed68c..0000000 --- a/src/main/proto/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.internal_redirect.previous_routes.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.internal_redirect.previous_routes.v3"; -option java_outer_classname = "PreviousRoutesConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/internal_redirect/previous_routes/v3;previous_routesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Previous routes internal redirect predicate] - -// An internal redirect predicate that rejects redirect targets that are pointing -// to a route that has been followed by a previous redirect from the current route. -// [#extension: envoy.internal_redirect_predicates.previous_routes] -message PreviousRoutesConfig { -} diff --git a/src/main/proto/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto b/src/main/proto/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto deleted file mode 100644 index d405576..0000000 --- a/src/main/proto/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.internal_redirect.safe_cross_scheme.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.internal_redirect.safe_cross_scheme.v3"; -option java_outer_classname = "SafeCrossSchemeConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/internal_redirect/safe_cross_scheme/v3;safe_cross_schemev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SafeCrossScheme internal redirect predicate] - -// An internal redirect predicate that checks the scheme between the -// downstream url and the redirect target url and allows a) same scheme -// redirect and b) safe cross scheme redirect, which means if the downstream -// scheme is HTTPS, both HTTPS and HTTP redirect targets are allowed, but if the -// downstream scheme is HTTP, only HTTP redirect targets are allowed. -// [#extension: envoy.internal_redirect_predicates.safe_cross_scheme] -message SafeCrossSchemeConfig { -} diff --git a/src/main/proto/envoy/extensions/key_value/file_based/v3/config.proto b/src/main/proto/envoy/extensions/key_value/file_based/v3/config.proto deleted file mode 100644 index 3044709..0000000 --- a/src/main/proto/envoy/extensions/key_value/file_based/v3/config.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.key_value.file_based.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.key_value.file_based.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/key_value/file_based/v3;file_basedv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Key/value file-based store storage plugin] - -// [#extension: envoy.key_value.file_based] -// This is configuration to flush a key value store out to disk. -message FileBasedKeyValueStoreConfig { - option (xds.annotations.v3.message_status).work_in_progress = true; - - // The filename to read the keys and values from, and write the keys and - // values to. - string filename = 1 [(validate.rules).string = {min_len: 1}]; - - // The interval at which the key value store should be flushed to the file. - google.protobuf.Duration flush_interval = 2; - - // The maximum number of entries to cache, or 0 to allow for unlimited entries. - // Defaults to 1000 if not present. - google.protobuf.UInt32Value max_entries = 3; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto b/src/main/proto/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto deleted file mode 100644 index c55d30b..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3; - -import "envoy/extensions/load_balancing_policies/common/v3/common.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3"; -option java_outer_classname = "ClientSideWeightedRoundRobinProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3;client_side_weighted_round_robinv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Client-Side Weighted Round Robin Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.client_side_weighted_round_robin] - -// Configuration for the client_side_weighted_round_robin LB policy. -// -// This policy differs from the built-in ROUND_ROBIN policy in terms of -// how the endpoint weights are determined. In the ROUND_ROBIN policy, -// the endpoint weights are sent by the control plane via EDS. However, -// in this policy, the endpoint weights are instead determined via qps (queries -// per second), eps (errors per second), and utilization metrics sent by the -// endpoint using the Open Request Cost Aggregation (ORCA) protocol. Utilization -// is determined by using the ORCA application_utilization field, if set, or -// else falling back to the cpu_utilization field. All queries count toward qps, -// regardless of result. Only failed queries count toward eps. A config -// parameter error_utilization_penalty controls the penalty to adjust endpoint -// weights using eps and qps. The weight of a given endpoint is computed as: -// ``qps / (utilization + eps/qps * error_utilization_penalty)``. -// -// Note that Envoy will forward the ORCA response headers/trailers from the upstream -// cluster to the downstream client. This means that if the downstream client is also -// configured to use ``client_side_weighted_round_robin`` it will load balance against -// Envoy based on upstream weights. This can happen when Envoy is used as a reverse proxy. -// To avoid this issue you can configure the :ref:`header_mutation filter ` to remove -// the ORCA payload from the response headers/trailers. -// -// See the :ref:`load balancing architecture -// overview` for more information. -// -// [#next-free-field: 9] -message ClientSideWeightedRoundRobin { - // Whether to enable out-of-band utilization reporting collection from - // the endpoints. By default, per-request utilization reporting is used. - google.protobuf.BoolValue enable_oob_load_report = 1; - - // Load reporting interval to request from the server. Note that the - // server may not provide reports as frequently as the client requests. - // Used only when enable_oob_load_report is true. Default is 10 seconds. - google.protobuf.Duration oob_reporting_period = 2; - - // A given endpoint must report load metrics continuously for at least - // this long before the endpoint weight will be used. This avoids - // churn when the set of endpoint addresses changes. Takes effect - // both immediately after we establish a connection to an endpoint and - // after weight_expiration_period has caused us to stop using the most - // recent load metrics. Default is 10 seconds. - google.protobuf.Duration blackout_period = 3; - - // If a given endpoint has not reported load metrics in this long, - // then we stop using the reported weight. This ensures that we do - // not continue to use very stale weights. Once we stop using a stale - // value, if we later start seeing fresh reports again, the - // blackout_period applies. Defaults to 3 minutes. - google.protobuf.Duration weight_expiration_period = 4; - - // How often endpoint weights are recalculated. Values less than 100ms are - // capped at 100ms. Default is 1 second. - google.protobuf.Duration weight_update_period = 5; - - // The multiplier used to adjust endpoint weights with the error rate - // calculated as eps/qps. Configuration is rejected if this value is negative. - // Default is 1.0. - google.protobuf.FloatValue error_utilization_penalty = 6 [(validate.rules).float = {gte: 0.0}]; - - // By default, endpoint weight is computed based on the :ref:`application_utilization ` field reported by the endpoint. - // If that field is not set, then utilization will instead be computed by taking the max of the values of the metrics specified here. - // For map fields in the ORCA proto, the string will be of the form ``.``. For example, the string ``named_metrics.foo`` will mean to look for the key ``foo`` in the ORCA :ref:`named_metrics ` field. - // If none of the specified metrics are present in the load report, then :ref:`cpu_utilization ` is used instead. - repeated string metric_names_for_computing_utilization = 7; - - // Configuration for slow start mode. - // If this configuration is not set, slow start will not be not enabled. - common.v3.SlowStartConfig slow_start_config = 8; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto b/src/main/proto/envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto deleted file mode 100644 index 12c1913..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/cluster_provided/v3/cluster_provided.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.cluster_provided.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.cluster_provided.v3"; -option java_outer_classname = "ClusterProvidedProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/cluster_provided/v3;cluster_providedv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Cluster Provided Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.cluster_provided] - -// The cluster provided load balancing policy allows cluster to specify its own load balancing. -// If this extension is configured, the target cluster must provide load balancer when the cluster -// is created. -// -// .. note:: -// Cluster provided load balancing policy could not be used as sub-policy of other hierarchical -// load balancing policies, such as subset load balancing policy. -message ClusterProvided { -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/common/v3/common.proto b/src/main/proto/envoy/extensions/load_balancing_policies/common/v3/common.proto deleted file mode 100644 index 22faf11..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/common/v3/common.proto +++ /dev/null @@ -1,161 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.common.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.common.v3"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3;commonv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common configuration for two or more load balancing policy extensions] - -message LocalityLbConfig { - // Configuration for :ref:`zone aware routing - // `. - // [#next-free-field: 7] - message ZoneAwareLbConfig { - // Basis for computing per-locality percentages in zone-aware routing. - enum LocalityBasis { - // Use the number of healthy hosts in each locality. - HEALTHY_HOSTS_NUM = 0; - - // Use the weights of healthy hosts in each locality. - HEALTHY_HOSTS_WEIGHT = 1; - } - - // Configures Envoy to always route requests to the local zone regardless of the - // upstream zone structure. In Envoy's default configuration, traffic is distributed proportionally - // across all upstream hosts while trying to maximize local routing when possible. The approach - // with force_local_zone aims to be more predictable and if there are upstream hosts in the local - // zone, they will receive all traffic. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - message ForceLocalZone { - // Configures the minimum number of upstream hosts in the local zone required when force_local_zone - // is enabled. If the number of upstream hosts in the local zone is less than the specified value, - // Envoy will fall back to the default proportional-based distribution across localities. - // If not specified, the default is 1. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - google.protobuf.UInt32Value min_size = 1; - } - - // Configures percentage of requests that will be considered for zone aware routing - // if zone aware routing is configured. If not specified, the default is 100%. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - type.v3.Percent routing_enabled = 1; - - // Configures minimum upstream cluster size required for zone aware routing - // If upstream cluster size is less than specified, zone aware routing is not performed - // even if zone aware routing is configured. If not specified, the default is 6. - // * :ref:`runtime values `. - // * :ref:`Zone aware routing support `. - google.protobuf.UInt64Value min_cluster_size = 2; - - // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic - // mode`. Instead, the cluster will fail all - // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a - // failing service. - bool fail_traffic_on_panic = 3; - - // If set to true, Envoy will force LocalityDirect routing if a local locality exists. - bool force_locality_direct_routing = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - ForceLocalZone force_local_zone = 5; - - // Determines how locality percentages are computed: - // - HEALTHY_HOSTS_NUM: proportional to the count of healthy hosts. - // - HEALTHY_HOSTS_WEIGHT: proportional to the weights of healthy hosts. - // Default value is HEALTHY_HOSTS_NUM if unset. - LocalityBasis locality_basis = 6; - } - - // Configuration for :ref:`locality weighted load balancing - // ` - message LocalityWeightedLbConfig { - } - - oneof locality_config_specifier { - option (validate.required) = true; - - // Configuration for local zone aware load balancing. - ZoneAwareLbConfig zone_aware_lb_config = 1; - - // Enable locality weighted load balancing. - LocalityWeightedLbConfig locality_weighted_lb_config = 2; - } -} - -// Configuration for :ref:`slow start mode `. -message SlowStartConfig { - // Represents the size of slow start window. - // If set, the newly created host remains in slow start mode starting from its creation time - // for the duration of slow start window. - google.protobuf.Duration slow_start_window = 1; - - // This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0, - // so that endpoint would get linearly increasing amount of traffic. - // When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly. - // The value of aggression parameter should be greater than 0.0. - // By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. - // - // During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: - // ``new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))``, - // where ``time_factor=(time_since_start_seconds / slow_start_time_seconds)``. - // - // As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. - // Once host exits slow start, time_factor and aggression no longer affect its weight. - config.core.v3.RuntimeDouble aggression = 2; - - // Configures the minimum percentage of origin weight that avoids too small new weight, - // which may cause endpoints in slow start mode receive no traffic in slow start window. - // If not specified, the default is 10%. - type.v3.Percent min_weight_percent = 3; -} - -// Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) -message ConsistentHashingLbConfig { - // If set to ``true``, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - bool use_hostname_for_hashing = 1; - - // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 - // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. - // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. - // Minimum is 100. - // - // Applies to both Ring Hash and Maglev load balancers. - // - // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - // ``hash_balance_factor``, requests to any upstream host are capped at ``hash_balance_factor/100`` times the average number of requests - // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing - // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify - // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the - // cascading overflow effect when choosing the next host in the ring/table). - // - // If weights are specified on the hosts, they are respected. - // - // This is an O(N) algorithm, unlike other load balancers. Using a lower ``hash_balance_factor`` results in more hosts - // being probed, so use a higher value if you require better performance. - google.protobuf.UInt32Value hash_balance_factor = 2 [(validate.rules).uint32 = {gte: 100}]; - - // Specifies a list of hash policies to use for ring hash load balancing. If ``hash_policy`` is - // set, then - // :ref:`route level hash policy ` - // will be ignored. - repeated config.route.v3.RouteAction.HashPolicy hash_policy = 3; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto b/src/main/proto/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto deleted file mode 100644 index 095f607..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.least_request.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/extensions/load_balancing_policies/common/v3/common.proto"; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.least_request.v3"; -option java_outer_classname = "LeastRequestProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3;least_requestv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Least Request Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.least_request] - -// This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy -// extension point. See the :ref:`load balancing architecture overview -// ` for more information. -// [#next-free-field: 7] -message LeastRequest { - // Available methods for selecting the host set from which to return the host with the - // fewest active requests. - enum SelectionMethod { - // Return host with fewest requests from a set of ``choice_count`` randomly selected hosts. - // Best selection method for most scenarios. - N_CHOICES = 0; - - // Return host with fewest requests from all hosts. - // Useful in some niche use cases involving low request rates and one of: - // (example 1) low request limits on workloads, or (example 2) few hosts. - // - // Example 1: Consider a workload type that can only accept one connection at a time. - // If such workloads are deployed across many hosts, only a small percentage of those - // workloads have zero connections at any given time, and the rate of new connections is low, - // the ``FULL_SCAN`` method is more likely to select a suitable host than ``N_CHOICES``. - // - // Example 2: Consider a workload type that is only deployed on 2 hosts. With default settings, - // the ``N_CHOICES`` method will return the host with more active requests 25% of the time. - // If the request rate is sufficiently low, the behavior of always selecting the host with least - // requests as of the last metrics refresh may be preferable. - FULL_SCAN = 1; - } - - // The number of random healthy hosts from which the host with the fewest active requests will - // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. - // Only applies to the ``N_CHOICES`` selection method. - google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}]; - - // The following formula is used to calculate the dynamic weights when hosts have different load - // balancing weights: - // - // ``weight = load_balancing_weight / (active_requests + 1)^active_request_bias`` - // - // The larger the active request bias is, the more aggressively active requests will lower the - // effective weight when all host weights are not equal. - // - // ``active_request_bias`` must be greater than or equal to 0.0. - // - // When ``active_request_bias == 0.0`` the Least Request Load Balancer doesn't consider the number - // of active requests at the time it picks a host and behaves like the Round Robin Load - // Balancer. - // - // When ``active_request_bias > 0.0`` the Least Request Load Balancer scales the load balancing - // weight by the number of active requests at the time it does a pick. - // - // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's - // host sets changes, e.g., whenever there is a host membership update or a host load balancing - // weight change. - // - // .. note:: - // This setting only takes effect if all host weights are not equal. - config.core.v3.RuntimeDouble active_request_bias = 2; - - // Configuration for slow start mode. - // If this configuration is not set, slow start will not be not enabled. - common.v3.SlowStartConfig slow_start_config = 3; - - // Configuration for local zone aware load balancing or locality weighted load balancing. - common.v3.LocalityLbConfig locality_lb_config = 4; - - // [#not-implemented-hide:] - // Unused. Replaced by the `selection_method` enum for better extensibility. - google.protobuf.BoolValue enable_full_scan = 5 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Method for selecting the host set from which to return the host with the fewest active requests. - // - // Defaults to ``N_CHOICES``. - SelectionMethod selection_method = 6 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/maglev/v3/maglev.proto b/src/main/proto/envoy/extensions/load_balancing_policies/maglev/v3/maglev.proto deleted file mode 100644 index 91457f5..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/maglev/v3/maglev.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.maglev.v3; - -import "envoy/extensions/load_balancing_policies/common/v3/common.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.maglev.v3"; -option java_outer_classname = "MaglevProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/maglev/v3;maglevv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Maglev Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.maglev] - -// This configuration allows the built-in Maglev LB policy to be configured via the LB policy -// extension point. See the :ref:`load balancing architecture overview -// ` and :ref:`Maglev` for more information. -message Maglev { - // The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee. - // Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same - // upstream as it was before. Increasing the table size reduces the amount of disruption. - // The table size must be prime number limited to 5000011. If it is not specified, the default is 65537. - google.protobuf.UInt64Value table_size = 1 [(validate.rules).uint64 = {lte: 5000011}]; - - // Common configuration for hashing-based load balancing policies. - common.v3.ConsistentHashingLbConfig consistent_hashing_lb_config = 2; - - // Enable locality weighted load balancing for maglev lb explicitly. - common.v3.LocalityLbConfig.LocalityWeightedLbConfig locality_weighted_lb_config = 3; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/override_host/v3/override_host.proto b/src/main/proto/envoy/extensions/load_balancing_policies/override_host/v3/override_host.proto deleted file mode 100644 index 14f541e..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/override_host/v3/override_host.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.override_host.v3; - -import "envoy/config/cluster/v3/cluster.proto"; -import "envoy/type/metadata/v3/metadata.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.override_host.v3"; -option java_outer_classname = "OverrideHostProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/override_host/v3;override_hostv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Override Host Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.override_host] - -// Configuration for the Override Host Load Balancing policy. -// -// This policy allows endpoint picking to be implemented in downstream HTTP filters. For example an ext_proc RPC to a service -// that implements k8s proposal for AI gateway inferences extensions -// https://github.com/kubernetes-sigs/gateway-api-inference-extension/tree/main/docs/proposals/004-endpoint-picker-protocol -// can provide hosts for serving a request using Override Host load balancing policy. -// -// This policy extracts selected override hosts from a list of ``OverrideHostSource`` (request headers, metadata, etc.). -// -// The override host source must specify at least one host in ``IP:Port`` format or multiple hosts in ``IP:Port,IP:Port,...`` -// format. For example ``10.0.0.5:8080`` or ``[2600:4040:5204::1574:24ae]:80``. The IPv6 address is enclosed in square brackets. -// -// For specific example, to support k8s gateway inference extensions, which uses the ``x-gateway-destination-endpoint`` -// header or metadata value under the "envoy.lb" key for selected hosts, the Override Host load balancing policy should be -// configured in the following way: -// -// .. code-block:: yaml -// -// override_host_sources: -// - header: "x-gateway-destination-endpoint" -// - metadata: -// key: "envoy.lb" -// path: -// - key: "x-gateway-destination-endpoint" -// -// If no valid host in the override host list, then the specified fallback load balancing policy is used. This allows load -// balancing to degrade to a a built in policy (i.e. Round Robin) in case external endpoint picker fails. -// -// See the :ref:`load balancing architecture -// overview` for more information. -// -message OverrideHost { - message OverrideHostSource { - // The header to get the override host addresses. - // - // Only one of the header or metadata field could be set. - string header = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; - - // The metadata key to get the override host addresses from the request dynamic metadata. If - // set this field then it will take precedence over the header field. - // - // Only one of the header or metadata field could be set. - type.metadata.v3.MetadataKey metadata = 2; - } - - // A list of sources to get host addresses from. The host sources are searched in the order - // specified. The request is forwarded to the first address and subsequent addresses are used - // for request retries or hedging. - // Note that if an overridden host address is not present in the current endpoint set, it is - // skipped and the next found address is used. If there are not enough overridden addresses to - // satisfy all retry attempts the fallback load balancing policy is used to pick a host. - repeated OverrideHostSource override_host_sources = 1 - [(validate.rules).repeated = {min_items: 1}]; - - // The child LB policy to use in case neither header nor metadata with selected - // hosts is present. - config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto b/src/main/proto/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto deleted file mode 100644 index 2a7db05..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.pick_first.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.pick_first.v3"; -option java_outer_classname = "PickFirstProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3;pick_firstv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Pick First Load Balancing Policy] -// [#not-implemented-hide:] - -// This configuration allows the built-in PICK_FIRST LB policy to be configured -// via the LB policy extension point. -message PickFirst { - // If set to true, instructs the LB policy to shuffle the list of addresses - // received from the name resolver before attempting to connect to them. - bool shuffle_address_list = 1; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/random/v3/random.proto b/src/main/proto/envoy/extensions/load_balancing_policies/random/v3/random.proto deleted file mode 100644 index 1fc0a49..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/random/v3/random.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.random.v3; - -import "envoy/extensions/load_balancing_policies/common/v3/common.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.random.v3"; -option java_outer_classname = "RandomProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/random/v3;randomv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Random Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.random] - -// This configuration allows the built-in Random LB policy to be configured via the LB policy -// extension point. See the :ref:`load balancing architecture overview -// ` for more information. -message Random { - // Configuration for local zone aware load balancing or locality weighted load balancing. - common.v3.LocalityLbConfig locality_lb_config = 1; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/random_subsetting/v3/random_subsetting.proto b/src/main/proto/envoy/extensions/load_balancing_policies/random_subsetting/v3/random_subsetting.proto deleted file mode 100644 index ce616be..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/random_subsetting/v3/random_subsetting.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.random_subsetting.v3; - -import "envoy/config/cluster/v3/cluster.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.random_subsetting.v3"; -option java_outer_classname = "RandomSubsettingProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/random_subsetting/v3;random_subsettingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Random Subsetting Load Balancing Policy] -// [#not-implemented-hide:] -// [#extension: envoy.load_balancing_policies.random_subsetting] -// [#next-free-field: 3] - -// Configuration for the Random Subsetting Load Balancing Policy -// -// This policy selects a subset of endpoints and passes them to the child LB policy. -// It maintains 2 important properties: -// 1. The policy tries to distribute connections among servers as equally as possible. The higher -// ``(N_clients*subset_size)/N_servers`` ratio is, the closer the resulting server connection -// distribution is to uniform. -// 2. The policy minimizes the amount of connection churn generated during server scale-ups by -// using rendezvous hashing -// -// See the :ref:`load balancing architecture -// overview` for more information. -// -// [#not-implemented-hide:] -message RandomSubsetting { - // subset_size indicates how many backends every client will be connected to. - // The value must be greater than 0. - google.protobuf.UInt32Value subset_size = 1 [(validate.rules).uint32 = {gt: 0}]; - - // The config for the child policy. - // The value is required. - config.cluster.v3.LoadBalancingPolicy child_policy = 2 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto b/src/main/proto/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto deleted file mode 100644 index f154be5..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.ring_hash.v3; - -import "envoy/extensions/load_balancing_policies/common/v3/common.proto"; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.ring_hash.v3"; -option java_outer_classname = "RingHashProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3;ring_hashv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Ring Hash Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.ring_hash] - -// This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy -// extension point. See the :ref:`load balancing architecture overview -// ` for more information. -// [#next-free-field: 8] -message RingHash { - // The hash function used to hash hosts onto the ketama ring. - enum HashFunction { - // Currently defaults to XX_HASH. - DEFAULT_HASH = 0; - - // Use `xxHash `_. - XX_HASH = 1; - - // Use `MurmurHash2 `_, this is compatible with - // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled - // on Linux and not macOS. - MURMUR_HASH_2 = 2; - } - - // The hash function used to hash hosts onto the ketama ring. The value defaults to - // :ref:`XX_HASH`. - HashFunction hash_function = 1 [(validate.rules).enum = {defined_only: true}]; - - // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each - // provided host) the better the request distribution will reflect the desired weights. Defaults - // to 1024 entries, and limited to 8M entries. See also - // :ref:`maximum_ring_size`. - google.protobuf.UInt64Value minimum_ring_size = 2 - [(validate.rules).uint64 = {lte: 8388608 gte: 1}]; - - // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered - // to further constrain resource use. See also - // :ref:`minimum_ring_size`. - google.protobuf.UInt64Value maximum_ring_size = 3 [(validate.rules).uint64 = {lte: 8388608}]; - - // If set to ``true``, the cluster will use hostname instead of the resolved - // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. - // - // .. note:: - // This is deprecated and please use :ref:`consistent_hashing_lb_config - // ` instead. - bool use_hostname_for_hashing = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 - // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. - // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. - // Minimum is 100. - // - // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - // ``hash_balance_factor``, requests to any upstream host are capped at ``hash_balance_factor/100`` times the average number of requests - // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing - // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify - // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the - // cascading overflow effect when choosing the next host in the ring/table). - // - // If weights are specified on the hosts, they are respected. - // - // This is an O(N) algorithm, unlike other load balancers. Using a lower ``hash_balance_factor`` results in more hosts - // being probed, so use a higher value if you require better performance. - // - // .. note:: - // This is deprecated and please use :ref:`consistent_hashing_lb_config - // ` instead. - google.protobuf.UInt32Value hash_balance_factor = 5 [ - deprecated = true, - (validate.rules).uint32 = {gte: 100}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" - ]; - - // Common configuration for hashing-based load balancing policies. - common.v3.ConsistentHashingLbConfig consistent_hashing_lb_config = 6; - - // Enable locality weighted load balancing for ring hash lb explicitly. - common.v3.LocalityLbConfig.LocalityWeightedLbConfig locality_weighted_lb_config = 7; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto b/src/main/proto/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto deleted file mode 100644 index 63fe49e..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.round_robin.v3; - -import "envoy/extensions/load_balancing_policies/common/v3/common.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.round_robin.v3"; -option java_outer_classname = "RoundRobinProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/round_robin/v3;round_robinv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Round Robin Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.round_robin] - -// This configuration allows the built-in ROUND_ROBIN LB policy to be configured via the LB policy -// extension point. See the :ref:`load balancing architecture overview -// ` for more information. -message RoundRobin { - // Configuration for slow start mode. - // If this configuration is not set, slow start will not be not enabled. - common.v3.SlowStartConfig slow_start_config = 1; - - // Configuration for local zone aware load balancing or locality weighted load balancing. - common.v3.LocalityLbConfig locality_lb_config = 2; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/subset/v3/subset.proto b/src/main/proto/envoy/extensions/load_balancing_policies/subset/v3/subset.proto deleted file mode 100644 index 5698986..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/subset/v3/subset.proto +++ /dev/null @@ -1,260 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.subset.v3; - -import "envoy/config/cluster/v3/cluster.proto"; - -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.subset.v3"; -option java_outer_classname = "SubsetProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/subset/v3;subsetv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Subset Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.subset] - -// Optionally divide the endpoints in this cluster into subsets defined by -// endpoint metadata and selected by route and weighted cluster metadata. -// [#next-free-field: 11] -message Subset { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.cluster.v3.LbSubsetConfig"; - - // If NO_FALLBACK is selected, a result - // equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected, - // any cluster endpoint may be returned (subject to policy, health checks, - // etc). If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - enum LbSubsetFallbackPolicy { - NO_FALLBACK = 0; - ANY_ENDPOINT = 1; - DEFAULT_SUBSET = 2; - } - - enum LbSubsetMetadataFallbackPolicy { - // No fallback. Route metadata will be used as-is. - METADATA_NO_FALLBACK = 0; - - // A special metadata key ``fallback_list`` will be used to provide variants of metadata to try. - // Value of ``fallback_list`` key has to be a list. Every list element has to be a struct - it will - // be merged with route metadata, overriding keys that appear in both places. - // ``fallback_list`` entries will be used in order until a host is found. - // - // ``fallback_list`` key itself is removed from metadata before subset load balancing is performed. - // - // Example: - // - // for metadata: - // - // .. code-block:: yaml - // - // version: 1.0 - // fallback_list: - // - version: 2.0 - // hardware: c64 - // - hardware: c32 - // - version: 3.0 - // - // at first, metadata: - // - // .. code-block:: json - // - // {"version": "2.0", "hardware": "c64"} - // - // will be used for load balancing. If no host is found, metadata: - // - // .. code-block:: json - // - // {"version": "1.0", "hardware": "c32"} - // - // is next to try. If it still results in no host, finally metadata: - // - // .. code-block:: json - // - // {"version": "3.0"} - // - // is used. - FALLBACK_LIST = 1; - } - - // Specifications for subsets. - message LbSubsetSelector { - // Allows to override top level fallback policy per selector. - enum LbSubsetSelectorFallbackPolicy { - // If NOT_DEFINED top level config fallback policy is used instead. - NOT_DEFINED = 0; - - // If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported. - NO_FALLBACK = 1; - - // If ANY_ENDPOINT is selected, any cluster endpoint may be returned - // (subject to policy, health checks, etc). - ANY_ENDPOINT = 2; - - // If DEFAULT_SUBSET is selected, load balancing is performed over the - // endpoints matching the values from the default_subset field. - DEFAULT_SUBSET = 3; - - // If KEYS_SUBSET is selected, subset selector matching is performed again with metadata - // keys reduced to - // :ref:`fallback_keys_subset`. - // It allows for a fallback to a different, less specific selector if some of the keys of - // the selector are considered optional. - KEYS_SUBSET = 4; - } - - // List of keys to match with the weighted cluster metadata. - repeated string keys = 1; - - // Selects a mode of operation in which each subset has only one host. This mode uses the same rules for - // choosing a host, but updating hosts is faster, especially for large numbers of hosts. - // - // If a match is found to a host, that host will be used regardless of priority levels. - // - // When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys`` - // will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge - // :ref:`lb_subsets_single_host_per_subset_duplicate` indicates how many duplicates are - // present in the current configuration. - bool single_host_per_subset = 4; - - // The behavior used when no endpoint subset matches the selected route's - // metadata. - LbSubsetSelectorFallbackPolicy fallback_policy = 2 - [(validate.rules).enum = {defined_only: true}]; - - // Subset of - // :ref:`keys` used by - // :ref:`KEYS_SUBSET` - // fallback policy. - // It has to be a non empty list if KEYS_SUBSET fallback policy is selected. - // For any other fallback policy the parameter is not used and should not be set. - // Only values also present in - // :ref:`keys` are allowed, but - // ``fallback_keys_subset`` cannot be equal to ``keys``. - repeated string fallback_keys_subset = 3; - } - - // The behavior used when no endpoint subset matches the selected route's - // metadata. The value defaults to - // :ref:`NO_FALLBACK`. - LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}]; - - // Specifies the default subset of endpoints used during fallback if - // fallback_policy is - // :ref:`DEFAULT_SUBSET`. - // Each field in default_subset is - // compared to the matching LbEndpoint.Metadata under the ``envoy.lb`` - // namespace. It is valid for no hosts to match, in which case the behavior - // is the same as a fallback_policy of - // :ref:`NO_FALLBACK`. - google.protobuf.Struct default_subset = 2; - - // For each entry, LbEndpoint.Metadata's - // ``envoy.lb`` namespace is traversed and a subset is created for each unique - // combination of key and value. For example: - // - // .. code-block:: json - // - // { "subset_selectors": [ - // { "keys": [ "version" ] }, - // { "keys": [ "stage", "hardware_type" ] } - // ]} - // - // A subset is matched when the metadata from the selected route and - // weighted cluster contains the same keys and values as the subset's - // metadata. The same host may appear in multiple subsets. - repeated LbSubsetSelector subset_selectors = 3; - - // By default, only when the request metadata has exactly the **same** keys as one of subset selectors and - // the values of the related keys are matched, the load balancer will have a valid subset for the request. - // For example, given the following subset selectors: - // - // .. code-block:: json - // - // { "subset_selectors": [ - // { "keys": [ "version" ] }, - // { "keys": [ "stage", "version" ] } - // ]} - // - // A request with metadata ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}`` or - // ``{"redundant-key": "redundant-value", "version": "v1"}`` will not have a valid subset even if the values - // of keys ``stage`` and ``version`` are matched because of the redundant key/value pair in the request - // metadata. - // - // By setting this field to true, the most appropriate keys will be filtered out from the request metadata - // according to the subset selectors. And then the filtered keys and related values will be matched to find - // the valid host subset. By this way, redundant key/value pairs are allowed in the request metadata. The keys - // of a request metadata could be superset of the keys of the subset selectors and need not to be exactly the - // same as the keys of the subset selectors. - // - // More specifically, if the keys of a request metadata is a superset of one of the subset selectors, then only - // the values of the keys that in the selector keys will be matched. Take the above example, if the request - // metadata is ``{"redundant-key": "redundant-value", "stage": "prod", "version": "v1"}``, the load balancer - // will only match the values of ``stage`` and ``version`` to find an appropriate subset because ``stage`` - // ``version`` are contained by the second subset selector and the redundant ``redundant-key`` will be - // ignored. - // - // .. note:: - // If the keys of request metadata is superset of multiple different subset selectors keys, the subset - // selector with most keys to win. For example, given subset selectors - // ``{"subset_selectors": ["keys": ["A", "B", "C"], ["A", "B"]]}`` and request metadata ``{"A": "-", - // "B": "-", "C": "-", "D": "-"}``, keys ``A``, ``B``, ``C`` will be evaluated. - // If the keys of request metadata is superset of multiple different subset selectors keys and the number - // of selector keys are same, then the one placed in front to win. For example, given subset selectors - // ``{"subset_selectors": ["keys": ["A", "B"], ["C", "D"]]}`` and request metadata ``{"A": "-", "B": "-", - // "C": "-", "D": "-"}``, keys ``A``, ``B`` will be evaluated. - // - bool allow_redundant_keys = 10; - - // If true, routing to subsets will take into account the localities and locality weights of the - // endpoints when making the routing decision. - // - // There are some potential pitfalls associated with enabling this feature, as the resulting - // traffic split after applying both a subset match and locality weights might be undesirable. - // - // Consider for example a situation in which you have 50/50 split across two localities X/Y - // which have 100 hosts each without subsetting. If the subset LB results in X having only 1 - // host selected but Y having 100, then a lot more load is being dumped on the single host in X - // than originally anticipated in the load balancing assignment delivered via EDS. - bool locality_weight_aware = 4; - - // When used with locality_weight_aware, scales the weight of each locality by the ratio - // of hosts in the subset vs hosts in the original subset. This aims to even out the load - // going to an individual locality if said locality is disproportionately affected by the - // subset predicate. - bool scale_locality_weight = 5; - - // If true, when a fallback policy is configured and its corresponding subset fails to find - // a host this will cause any host to be selected instead. - // - // This is useful when using the default subset as the fallback policy, given the default - // subset might become empty. With this option enabled, if that happens the LB will attempt - // to select a host from the entire cluster. - bool panic_mode_any = 6; - - // If true, metadata specified for a metadata key will be matched against the corresponding - // endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value - // and any of the elements in the list matches the criteria. - bool list_as_any = 7; - - // Fallback mechanism that allows to try different route metadata until a host is found. - // If load balancing process, including all its mechanisms (like - // :ref:`fallback_policy`) - // fails to select a host, this policy decides if and how the process is repeated using another metadata. - // - // The value defaults to - // :ref:`METADATA_NO_FALLBACK - // `. - LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 - [(validate.rules).enum = {defined_only: true}]; - - // The child LB policy to create for endpoint-picking within the chosen subset. - config.cluster.v3.LoadBalancingPolicy subset_lb_policy = 9 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto b/src/main/proto/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto deleted file mode 100644 index e2e4ade..0000000 --- a/src/main/proto/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.load_balancing_policies.wrr_locality.v3; - -import "envoy/config/cluster/v3/cluster.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.wrr_locality.v3"; -option java_outer_classname = "WrrLocalityProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3;wrr_localityv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Weighted Round Robin Locality-Picking Load Balancing Policy] -// [#extension: envoy.load_balancing_policies.wrr_locality] - -// Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview -// ` for more information. -message WrrLocality { - // The child LB policy to create for endpoint-picking within the chosen locality. - config.cluster.v3.LoadBalancingPolicy endpoint_picking_policy = 1 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/local_address_selectors/filter_state_override/v3/config.proto b/src/main/proto/envoy/extensions/local_address_selectors/filter_state_override/v3/config.proto deleted file mode 100644 index 86dc67b..0000000 --- a/src/main/proto/envoy/extensions/local_address_selectors/filter_state_override/v3/config.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.local_address_selectors.filter_state_override.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.local_address_selectors.filter_state_override.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/local_address_selectors/filter_state_override/v3;filter_state_overridev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Linux Network Namespace Local Address Selector] -// [#extension: envoy.upstream.local_address_selector.filter_state_override] - -// Overrides the upstream bind address Linux network namespace using a filter -// state object with the key ``envoy.network.upstream_bind_override.network_namespace`` -// passed from the downstream. The override applies over the :ref:`default -// address selector -// ` -message Config { -} diff --git a/src/main/proto/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto b/src/main/proto/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto deleted file mode 100644 index 6712286..0000000 --- a/src/main/proto/envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.common_inputs.environment_variable.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.environment_variable.v3"; -option java_outer_classname = "InputProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/environment_variable/v3;environment_variablev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Environment variable input] -// [#extension: envoy.matching.common_inputs.environment_variable] - -// Reads an environment variable to provide an input for matching. -message Config { - // Name of the environment variable to read from. - string name = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto b/src/main/proto/envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto deleted file mode 100644 index b62690b..0000000 --- a/src/main/proto/envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto +++ /dev/null @@ -1,164 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.common_inputs.network.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.network.v3"; -option java_outer_classname = "NetworkInputsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/network/v3;networkv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common network matching inputs] - -// Specifies that matching should be performed by the destination IP address. -// [#extension: envoy.matching.inputs.destination_ip] -message DestinationIPInput { -} - -// Specifies that matching should be performed by the destination port. -// [#extension: envoy.matching.inputs.destination_port] -message DestinationPortInput { -} - -// Specifies that matching should be performed by the source IP address. -// [#extension: envoy.matching.inputs.source_ip] -message SourceIPInput { -} - -// Specifies that matching should be performed by the source port. -// [#extension: envoy.matching.inputs.source_port] -message SourcePortInput { -} - -// Input that matches by the directly connected source IP address (this -// will only be different from the source IP address when using a listener -// filter that overrides the source address, such as the :ref:`Proxy Protocol -// listener filter `). -// [#extension: envoy.matching.inputs.direct_source_ip] -message DirectSourceIPInput { -} - -// Input that matches by the source IP type. -// Specifies the source IP match type. The values include: -// -// * ``local`` - matches a connection originating from the same host, -// [#extension: envoy.matching.inputs.source_type] -message SourceTypeInput { -} - -// Input that matches by the requested server name (e.g. SNI in TLS). -// -// :ref:`TLS Inspector ` provides the requested server name based on SNI, -// when TLS protocol is detected. -// [#extension: envoy.matching.inputs.server_name] -message ServerNameInput { -} - -// Input that matches by the transport protocol. -// -// Suggested values include: -// -// * ``raw_buffer`` - default, used when no transport protocol is detected, -// * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` -// when TLS protocol is detected. -// [#extension: envoy.matching.inputs.transport_protocol] -message TransportProtocolInput { -} - -// List of quoted and comma-separated requested application protocols. The list consists of a -// single negotiated application protocol once the network stream is established. -// -// Examples: -// -// * ``'h2','http/1.1'`` -// * ``'h2c'`` -// -// Suggested values in the list include: -// -// * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector -// ` and :ref:`envoy.filters.listener.http_inspector -// `, -// * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` -// * ``h2c`` - set by :ref:`envoy.filters.listener.http_inspector ` -// -// .. attention:: -// -// Currently, :ref:`TLS Inspector ` provides -// application protocol detection based on the requested -// `ALPN `_ values. -// -// However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, -// and matching on values other than ``h2`` is going to lead to a lot of false negatives, -// unless all connecting clients are known to use ALPN. -// [#extension: envoy.matching.inputs.application_protocol] -message ApplicationProtocolInput { -} - -// Input that matches by a specific filter state key. -// The value of the provided filter state key will be the raw string representation of the filter state object -// [#extension: envoy.matching.inputs.filter_state] -message FilterStateInput { - string key = 1 [(validate.rules).string = {min_len: 1}]; -} - -// Input that matches dynamic metadata by key. -// DynamicMetadataInput provides a general interface using ``filter`` and ``path`` to retrieve value from -// :ref:`Metadata `. -// -// For example, for the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.xxx: -// prop: -// foo: bar -// xyz: -// hello: envoy -// -// The following DynamicMetadataInput will retrieve a string value "bar" from the Metadata. -// -// .. code-block:: yaml -// -// filter: envoy.xxx -// path: -// - key: prop -// - key: foo -// -// [#extension: envoy.matching.inputs.dynamic_metadata] -message DynamicMetadataInput { - // Specifies the segment in a path to retrieve value from Metadata. - // Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that - // if the segment key refers to a list, it has to be the last segment in a path. - message PathSegment { - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The filter name to retrieve the Struct from the Metadata. - string filter = 1 [(validate.rules).string = {min_len: 1}]; - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Input that matches by the network namespace of the listener address. -// This input returns the network namespace filepath that was used to create the listening socket. -// On Linux systems, this corresponds to the ``network_namespace_filepath`` field in the -// :ref:`SocketAddress ` configuration. -// -// .. note:: -// -// This input is only meaningful on Linux systems where network namespaces are supported. -// On other platforms, this input will always return an empty value. -// -// [#extension: envoy.matching.inputs.network_namespace] -message NetworkNamespaceInput { -} diff --git a/src/main/proto/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.proto b/src/main/proto/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.proto deleted file mode 100644 index aee0318..0000000 --- a/src/main/proto/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.common_inputs.ssl.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.ssl.v3"; -option java_outer_classname = "SslInputsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/ssl/v3;sslv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common SSL matching inputs] - -// List of comma-delimited URIs in the SAN field of the peer certificate for a downstream. -// [#extension: envoy.matching.inputs.uri_san] -message UriSanInput { -} - -// List of comma-delimited DNS entries in the SAN field of the peer certificate for a downstream. -// [#extension: envoy.matching.inputs.dns_san] -message DnsSanInput { -} - -// Input that matches the subject field of the peer certificate in RFC 2253 format for a -// downstream. -// [#extension: envoy.matching.inputs.subject] -message SubjectInput { -} diff --git a/src/main/proto/envoy/extensions/matching/common_inputs/stats/v3/stats.proto b/src/main/proto/envoy/extensions/matching/common_inputs/stats/v3/stats.proto deleted file mode 100644 index 2db3a62..0000000 --- a/src/main/proto/envoy/extensions/matching/common_inputs/stats/v3/stats.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.common_inputs.stats.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.stats.v3"; -option java_outer_classname = "StatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/stats/v3;statsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Stats matcher] - -// Specifies the way to match stats with full name. -message StatFullNameMatchInput { -} diff --git a/src/main/proto/envoy/extensions/matching/common_inputs/transport_socket/v3/transport_socket_inputs.proto b/src/main/proto/envoy/extensions/matching/common_inputs/transport_socket/v3/transport_socket_inputs.proto deleted file mode 100644 index 9ddc1ab..0000000 --- a/src/main/proto/envoy/extensions/matching/common_inputs/transport_socket/v3/transport_socket_inputs.proto +++ /dev/null @@ -1,124 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.common_inputs.transport_socket.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.common_inputs.transport_socket.v3"; -option java_outer_classname = "TransportSocketInputsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/transport_socket/v3;transport_socketv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Transport Socket Matching Inputs] - -// Specifies that matching should be performed by the endpoint metadata. -// This input extracts metadata from the selected endpoint for transport socket selection. -// The metadata is extracted using a filter and path specification similar to -// :ref:`DynamicMetadataInput `. -// -// Example: Extract a metadata value for transport socket matching. -// -// .. code-block:: yaml -// -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.matching.common_inputs.transport_socket.v3.EndpointMetadataInput -// filter: "envoy.transport_socket_match" -// path: -// - key: "socket_type" -// -// This configuration extracts the value at path ``["envoy.transport_socket_match"]["socket_type"]`` -// from the endpoint metadata for use in transport socket selection. -// -// [#extension: envoy.matching.inputs.endpoint_metadata] -message EndpointMetadataInput { - // Specifies the segment in a path to retrieve value from Metadata. - // Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that - // if the segment key refers to a list, it has to be the last segment in a path. - message PathSegment { - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The filter name to retrieve the Struct from the endpoint metadata. - // If not specified, defaults to ``envoy.lb`` which is commonly used for load balancing metadata. - string filter = 1; - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Specifies that matching should be performed by the locality metadata. -// This input extracts metadata from the endpoint's locality for transport socket selection. -// The metadata is extracted using a filter and path specification similar to -// :ref:`DynamicMetadataInput `. -// -// Example: Extract a metadata value from locality for transport socket matching. -// -// .. code-block:: yaml -// -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.matching.common_inputs.transport_socket.v3.LocalityMetadataInput -// filter: "envoy.transport_socket_match" -// path: -// - key: "region" -// -// This configuration extracts the value at path ``["envoy.transport_socket_match"]["region"]`` -// from the locality metadata for use in transport socket selection. -// -// [#extension: envoy.matching.inputs.locality_metadata] -message LocalityMetadataInput { - // Specifies the segment in a path to retrieve value from Metadata. - // Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that - // if the segment key refers to a list, it has to be the last segment in a path. - message PathSegment { - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The filter name to retrieve the Struct from the locality metadata. - // If not specified, defaults to ``envoy.lb`` which is commonly used for load balancing metadata. - string filter = 1; - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Specifies that matching should be performed by filter state. -// This input extracts a value from filter state that was explicitly shared from the -// downstream connection to the upstream connection via ``TransportSocketOptions``. -// This enables flexible downstream-connection-based transport socket selection, -// such as matching on network namespace or any custom filter state data. -// -// Example: Match on network namespace stored in filter state. -// -// .. code-block:: yaml -// -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.matching.common_inputs.transport_socket.v3.FilterStateInput -// key: "envoy.network.namespace" -// -// [#extension: envoy.matching.inputs.transport_socket_filter_state] -message FilterStateInput { - // The key of the filter state object to retrieve. - // The object must implement serializeAsString() to be used for matching. - string key = 1 [(validate.rules).string = {min_len: 1}]; -} - -// Configuration for the transport socket name action. -// This action sets the name of the transport socket to use when the matcher matches. -// [#extension: envoy.matching.action.transport_socket.name] -message TransportSocketNameAction { - // The name of the transport socket to use. - // This name must reference a named transport socket in the cluster's transport_socket_matches. - string name = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto b/src/main/proto/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto deleted file mode 100644 index de68934..0000000 --- a/src/main/proto/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.input_matchers.consistent_hashing.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.consistent_hashing.v3"; -option java_outer_classname = "ConsistentHashingProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/input_matchers/consistent_hashing/v3;consistent_hashingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Consistent hashing matcher] -// [#extension: envoy.matching.matchers.consistent_hashing] - -// The consistent hashing matchers computes a consistent hash from the input and matches if the resulting hash -// is within the configured threshold. -// More specifically, this matcher evaluates to true if hash(input, seed) % modulo >= threshold. -// Note that the consistency of the match result relies on the internal hash function (xxhash) remaining -// unchanged. While this is unlikely to happen intentionally, this could cause inconsistent match results -// between deployments. -message ConsistentHashing { - // The threshold the resulting hash must be over in order for this matcher to evaluate to true. - // This value must be below the configured modulo value. - // Setting this to 0 is equivalent to this matcher always matching. - uint32 threshold = 1; - - // The value to use for the modulus in the calculation. This effectively bounds the hash output, - // specifying the range of possible values. - // This value must be above the configured threshold. - uint32 modulo = 2 [(validate.rules).uint32 = {gt: 0}]; - - // Optional seed passed through the hash function. This allows using additional information when computing - // the hash value: by changing the seed value, a different partition of matching and non-matching inputs will - // be created that remains consistent for that seed value. - uint64 seed = 3; -} diff --git a/src/main/proto/envoy/extensions/matching/input_matchers/ip/v3/ip.proto b/src/main/proto/envoy/extensions/matching/input_matchers/ip/v3/ip.proto deleted file mode 100644 index 1c072f2..0000000 --- a/src/main/proto/envoy/extensions/matching/input_matchers/ip/v3/ip.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.input_matchers.ip.v3; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.ip.v3"; -option java_outer_classname = "IpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/input_matchers/ip/v3;ipv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: IP matcher] -// [#extension: envoy.matching.matchers.ip] - -// This input matcher matches IPv4 or IPv6 addresses against a list of CIDR -// ranges. It returns true if and only if the input IP belongs to at least one -// of these CIDR ranges. Internally, it uses a Level-Compressed trie, as -// described in the paper `IP-address lookup using LC-tries -// `_ -// by S. Nilsson and G. Karlsson. For "big" lists of IPs, this matcher is more -// efficient than multiple single IP matcher, that would have a linear cost. -message Ip { - // Match if the IP belongs to any of these CIDR ranges. - repeated config.core.v3.CidrRange cidr_ranges = 1 [(validate.rules).repeated = {min_items: 1}]; - - // The human readable prefix to use when emitting statistics for the IP input - // matcher. Names in the table below are concatenated to this prefix. - // - // .. csv-table:: - // :header: Name, Type, Description - // :widths: 1, 1, 2 - // - // ip_parsing_failed, Counter, Total number of IP addresses the matcher was unable to parse - string stat_prefix = 2 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/matching/input_matchers/metadata/v3/metadata.proto b/src/main/proto/envoy/extensions/matching/input_matchers/metadata/v3/metadata.proto deleted file mode 100644 index 19d74fb..0000000 --- a/src/main/proto/envoy/extensions/matching/input_matchers/metadata/v3/metadata.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.input_matchers.metadata.v3; - -import "envoy/type/matcher/v3/value.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.metadata.v3"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/input_matchers/metadata/v3;metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: metadata matcher] -// [#extension: envoy.matching.matchers.metadata_matcher] - -// Metadata matcher for metadata from http matching input data. -message Metadata { - // The Metadata is matched if the value retrieved by metadata matching input is matched to this value. - type.matcher.v3.ValueMatcher value = 1 [(validate.rules).message = {required: true}]; - - // If true, the match result will be inverted. - bool invert = 4; -} diff --git a/src/main/proto/envoy/extensions/matching/input_matchers/runtime_fraction/v3/runtime_fraction.proto b/src/main/proto/envoy/extensions/matching/input_matchers/runtime_fraction/v3/runtime_fraction.proto deleted file mode 100644 index 33a559e..0000000 --- a/src/main/proto/envoy/extensions/matching/input_matchers/runtime_fraction/v3/runtime_fraction.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.matching.input_matchers.runtime_fraction.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.matching.input_matchers.runtime_fraction.v3"; -option java_outer_classname = "RuntimeFractionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/input_matchers/runtime_fraction/v3;runtime_fractionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Runtime matcher] -// [#extension: envoy.matching.matchers.runtime_fraction] - -// The runtime fraction matchers computes a hash from the input and matches if runtime feature is enabled -// for the the resulting hash. Every time the input is considered for a match, its hash must fall within -// the percentage of matches indicated by this field. For a fraction N/D, a number is computed as a hash -// of the input on a field in the range [0,D). If the number is less than or equal to the value of the -// numerator N, the matcher evaluates to true. A runtime_fraction input matcher can be used to gradually -// roll out matcher changes without requiring full code or configuration deployments. -// Note that distribution of matching results is only as good as one of the input. -message RuntimeFraction { - // Match the input against the given runtime key. The specified default value is used if key is not - // present in the runtime configuration. - config.core.v3.RuntimeFractionalPercent runtime_fraction = 1 - [(validate.rules).message = {required: true}]; - - // Optional seed passed through the hash function. This allows using additional information when computing - // the hash value: by changing the seed value, a potentially different outcome can be achieved for the same input. - uint64 seed = 2; -} diff --git a/src/main/proto/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto b/src/main/proto/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto deleted file mode 100644 index 60588ca..0000000 --- a/src/main/proto/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.network.dns_resolver.apple.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.apple.v3"; -option java_outer_classname = "AppleDnsResolverProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/dns_resolver/apple/v3;applev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: apple DNS resolver] -// [#extension: envoy.network.dns_resolver.apple] - -// Configuration for apple DNS resolver. -message AppleDnsResolverConfig { - // The resolver will avoid the system's heuristics to only return - // IPv4 or IPv6 addresses that it considers to be "routable", instead - // returning all possible IPv4 or IPv6 addresses. This setting is - // ignored if the DNS lookup family is set to v4-only or v6-only. - // This should remain false in the vast majority of cases, but may be - // useful when performing custom filtering of addresses, such as with - // Happy Eyeballs. - bool include_unroutable_families = 1; -} diff --git a/src/main/proto/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto b/src/main/proto/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto deleted file mode 100644 index d05d073..0000000 --- a/src/main/proto/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto +++ /dev/null @@ -1,116 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.network.dns_resolver.cares.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/resolver.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.cares.v3"; -option java_outer_classname = "CaresDnsResolverProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/dns_resolver/cares/v3;caresv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: c-ares DNS resolver] -// [#extension: envoy.network.dns_resolver.cares] - -// Configuration for c-ares DNS resolver. -// [#next-free-field: 12] -message CaresDnsResolverConfig { - // A list of DNS resolver addresses. - // :ref:`use_resolvers_as_fallback ` - // below dictates if the DNS client should override system defaults or only use the provided - // resolvers if the system defaults are not available, i.e., as a fallback. - repeated config.core.v3.Address resolvers = 1; - - // If true use the resolvers listed in the - // :ref:`resolvers ` - // field only if c-ares is unable to obtain a - // nameserver from the system (e.g., ``/etc/resolv.conf``). - // Otherwise, the resolvers listed in the resolvers list will override the default system - // resolvers. Defaults to false. - bool use_resolvers_as_fallback = 3; - - // The resolver will query available network interfaces and determine if there are no available - // interfaces for a given IP family. It will then filter these addresses from the results it - // presents. e.g., if there are no available IPv4 network interfaces, the resolver will not - // provide IPv4 addresses. - bool filter_unroutable_families = 4; - - // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. - config.core.v3.DnsResolverOptions dns_resolver_options = 2; - - // This option allows the number of UDP based DNS queries to be capped. - // - // .. note:: - // This is only applicable to c-ares DNS resolver currently. - // - google.protobuf.UInt32Value udp_max_queries = 5; - - // The number of seconds each name server is given to respond to a query on the first try of any given server. - // - // .. note:: - // While the c-ares library defaults to 2 seconds, Envoy's default (if this field is unset) is 5 seconds. - // This adjustment was made to maintain the previous behavior after users reported an increase in DNS resolution times. - // - google.protobuf.UInt64Value query_timeout_seconds = 6 [(validate.rules).uint64 = {gte: 1}]; - - // The maximum number of query attempts the resolver will make before giving up. - // Each attempt may use a different name server. - // - // .. note:: - // While the c-ares library defaults to 3 attempts, Envoy's default (if this field is unset) is 4 attempts. - // This adjustment was made to maintain the previous behavior after users reported an increase in DNS resolution times. - // - google.protobuf.UInt32Value query_tries = 7 [(validate.rules).uint32 = {gte: 1}]; - - // Enable round-robin selection of name servers for DNS resolution. When enabled, the resolver will cycle through the - // list of name servers for each resolution request. This can help distribute the query load across multiple name - // servers. If disabled (default), the resolver will try name servers in the order they are configured. - // - // .. note:: - // This setting overrides any system configuration for name server rotation. - // - bool rotate_nameservers = 8; - - // Maximum EDNS0 UDP payload size in bytes. - // If set, c-ares will include EDNS0 in DNS queries and use this value as the maximum UDP response size. - // - // Recommended values: - // - // * **1232**: Safe default (avoids fragmentation). - // * **4096**: Maximum allowed. - // - // If unset, c-ares uses its internal default (usually 1232). - google.protobuf.UInt32Value edns0_max_payload_size = 9 - [(validate.rules).uint32 = {lte: 4096 gte: 512}]; - - // The maximum duration for which a UDP channel will be kept alive before being refreshed. - // - // If set, the DNS resolver will periodically reinitialize its c-ares channel after the - // specified duration. This can help with avoiding stale socket states, and providing - // better load distribution across UDP ports. - // - // If not specified, no periodic refresh will be performed. - google.protobuf.Duration max_udp_channel_duration = 10 [(validate.rules).duration = {gte {}}]; - - // If true, reinitialize the c-ares channel when a DNS query fails with ``ARES_ETIMEOUT``. - // - // This can help recover from rare cases where the UDP sockets held by the c-ares - // channel become unusable after timeouts, causing subsequent queries to fail or - // Envoy to keep serving stale DNS results. When enabled, a timeout-triggered - // reinitialization attempts to restore healthy state quickly. In environments - // where timeouts are caused by intermittent network issues, enabling this may - // increase channel churn; consider using - // :ref:`max_udp_channel_duration ` - // for periodic refresh instead. - // - // Default is false. - bool reinit_channel_on_timeout = 11; -} diff --git a/src/main/proto/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.proto b/src/main/proto/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.proto deleted file mode 100644 index 15d0c6d..0000000 --- a/src/main/proto/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.network.dns_resolver.getaddrinfo.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.getaddrinfo.v3"; -option java_outer_classname = "GetaddrinfoDnsResolverProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/dns_resolver/getaddrinfo/v3;getaddrinfov3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: getaddrinfo DNS resolver] -// [#extension: envoy.network.dns_resolver.getaddrinfo] - -// Configuration for getaddrinfo DNS resolver. This resolver will use the system's getaddrinfo() -// function to resolve hosts. -// -// .. attention:: -// -// Resolutions currently use a hard coded TTL of 60s because the getaddrinfo() API does not -// provide the actual TTL. Configuration for this can be added in the future if needed. -message GetAddrInfoDnsResolverConfig { - // Specifies the number of retries before the resolver gives up. If not specified, the resolver will - // retry indefinitely until it succeeds or the DNS query times out. - google.protobuf.UInt32Value num_retries = 1; - - // Specifies the number of threads used to resolve pending DNS queries. If not specified, one thread is used. - google.protobuf.UInt32Value num_resolver_threads = 2; -} diff --git a/src/main/proto/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto b/src/main/proto/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto deleted file mode 100644 index 69b413e..0000000 --- a/src/main/proto/envoy/extensions/network/socket_interface/v3/default_socket_interface.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.network.socket_interface.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.network.socket_interface.v3"; -option java_outer_classname = "DefaultSocketInterfaceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/socket_interface/v3;socket_interfacev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Default socket interface configuration] - -// Configuration for default socket interface that relies on OS dependent syscall to create -// sockets. -message DefaultSocketInterface { - // io_uring options. io_uring is only valid in Linux with at least kernel version 5.11. Otherwise, - // Envoy will fall back to use the default socket API. If not set then io_uring will not be - // enabled. - IoUringOptions io_uring_options = 1; -} - -message IoUringOptions { - // The size for io_uring submission queues (SQ). io_uring is built with a fixed size in each - // thread during configuration, and each io_uring operation creates a submission queue - // entry (SQE). The default is 1000. - google.protobuf.UInt32Value io_uring_size = 1; - - // Enable io_uring submission queue polling (SQPOLL). io_uring SQPOLL mode polls all SQEs in the - // SQ in the kernel thread. io_uring SQPOLL mode may reduce latency and increase CPU usage as a - // cost. The default is false. - bool enable_submission_queue_polling = 2; - - // The size of an io_uring socket's read buffer. Each io_uring read operation will allocate a - // buffer of the given size. If the given buffer is too small, the socket will have read multiple - // times for all the data. The default is 8192. - google.protobuf.UInt32Value read_buffer_size = 3; - - // The write timeout of an io_uring socket on closing in ms. io_uring writes and closes - // asynchronously. If the remote stops reading, the io_uring write operation may never complete. - // The operation is canceled and the socket is closed after the timeout. The default is 1000. - google.protobuf.UInt32Value write_timeout_ms = 4; -} diff --git a/src/main/proto/envoy/extensions/outlier_detection_monitors/common/v3/error_types.proto b/src/main/proto/envoy/extensions/outlier_detection_monitors/common/v3/error_types.proto deleted file mode 100644 index 7ea14dd..0000000 --- a/src/main/proto/envoy/extensions/outlier_detection_monitors/common/v3/error_types.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.outlier_detection_monitors.common.v3; - -import "envoy/type/v3/range.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.outlier_detection_monitors.common.v3"; -option java_outer_classname = "ErrorTypesProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/outlier_detection_monitors/common/v3;commonv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Outlier detection error buckets] -// Error bucket for HTTP codes. -// [#not-implemented-hide:] -message HttpErrors { - type.v3.Int32Range range = 1; -} - -// Error bucket for locally originated errors. -// [#not-implemented-hide:] -message LocalOriginErrors { -} - -// Error bucket for database errors. -// Sub-parameters may be added later, like malformed response, error on write, etc. -// [#not-implemented-hide:] -message DatabaseErrors { -} - -// Union of possible error buckets. -// [#not-implemented-hide:] -message ErrorBuckets { - // List of buckets "catching" HTTP codes. - repeated HttpErrors http_errors = 1; - - // List of buckets "catching" locally originated errors. - repeated LocalOriginErrors local_origin_errors = 2; - - // List of buckets "catching" database errors. - repeated DatabaseErrors database_errors = 3; -} diff --git a/src/main/proto/envoy/extensions/outlier_detection_monitors/consecutive_errors/v3/consecutive_errors.proto b/src/main/proto/envoy/extensions/outlier_detection_monitors/consecutive_errors/v3/consecutive_errors.proto deleted file mode 100644 index 8c74f6b..0000000 --- a/src/main/proto/envoy/extensions/outlier_detection_monitors/consecutive_errors/v3/consecutive_errors.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.outlier_detection_monitors.consecutive_errors.v3; - -import "envoy/extensions/outlier_detection_monitors/common/v3/error_types.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.outlier_detection_monitors.consecutive_errors.v3"; -option java_outer_classname = "ConsecutiveErrorsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/outlier_detection_monitors/consecutive_errors/v3;consecutive_errorsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// Monitor which counts consecutive errors. -// If number of consecutive errors exceeds the threshold, monitor will report that the host -// is unhealthy. -// [#not-implemented-hide:] -message ConsecutiveErrors { - // Monitor name. - string name = 1; - - // The number of consecutive errors before ejection occurs. - google.protobuf.UInt32Value threshold = 2 [(validate.rules).uint32 = {lte: 100}]; - - // The % chance that a host is actually ejected. Defaults to 100. - google.protobuf.UInt32Value enforcing = 3 [(validate.rules).uint32 = {lte: 100}]; - - // Error buckets. - common.v3.ErrorBuckets error_buckets = 4; -} diff --git a/src/main/proto/envoy/extensions/path/match/uri_template/v3/uri_template_match.proto b/src/main/proto/envoy/extensions/path/match/uri_template/v3/uri_template_match.proto deleted file mode 100644 index 27579f5..0000000 --- a/src/main/proto/envoy/extensions/path/match/uri_template/v3/uri_template_match.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.path.match.uri_template.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.path.match.uri_template.v3"; -option java_outer_classname = "UriTemplateMatchProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/path/match/uri_template/v3;uri_templatev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Uri Template Match Config] -// [#extension: envoy.path.match.uri_template.uri_template_matcher] - -// If specified, the route is a template match rule meaning that the -// ``:path`` header (without the query string) must match the given -// ``path_template`` pattern. -// -// Path template matching types: -// -// * ``*`` : Matches a single path component, up to the next path separator: / -// -// * ``**`` : Matches zero or more path segments. If present, must be the last operator. -// -// * ``{name} or {name=*}`` : A named variable matching one path segment up to the next path separator: /. -// -// * ``{name=videos/*}`` : A named variable matching more than one path segment. -// The path component matching videos/* is captured as the named variable. -// -// * ``{name=**}`` : A named variable matching zero or more path segments. -// -// -// For example: -// -// * ``/videos/*/*/*.m4s`` would match ``videos/123414/hls/1080p5000_00001.m4s`` -// -// * ``/videos/{file}`` would match ``/videos/1080p5000_00001.m4s`` -// -// * ``/**.mpd`` would match ``/content/123/india/dash/55/manifest.mpd`` -message UriTemplateMatchConfig { - string path_template = 1 [(validate.rules).string = {min_len: 1 max_len: 256}]; -} diff --git a/src/main/proto/envoy/extensions/path/rewrite/uri_template/v3/uri_template_rewrite.proto b/src/main/proto/envoy/extensions/path/rewrite/uri_template/v3/uri_template_rewrite.proto deleted file mode 100644 index 0d35ca5..0000000 --- a/src/main/proto/envoy/extensions/path/rewrite/uri_template/v3/uri_template_rewrite.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.path.rewrite.uri_template.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.path.rewrite.uri_template.v3"; -option java_outer_classname = "UriTemplateRewriteProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/path/rewrite/uri_template/v3;uri_templatev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Uri Template Rewrite Config] -// [#extension: envoy.path.rewrite.uri_template.uri_template_rewriter] - -// Indicates that during forwarding, portions of the path that match the -// pattern should be rewritten, even allowing the substitution of variables -// from the match pattern into the new path as specified by the rewrite template. -// This is useful to allow application paths to be -// rewritten in a way that is aware of segments with variable content like -// identifiers. The router filter will place the original path as it was -// before the rewrite into the :ref:`x-envoy-original-path -// ` header. -// -// Only one of :ref:`prefix_rewrite `, -// :ref:`regex_rewrite `, -// or *path_template_rewrite* may be specified. -// -// Template pattern matching types: -// -// * ``*`` : Matches a single path component, up to the next path separator: / -// -// * ``**`` : Matches zero or more path segments. If present, must be the last operator. -// -// * ``{name} or {name=*}`` : A named variable matching one path segment up to the next path separator: /. -// -// * ``{name=videos/*}`` : A named variable matching more than one path segment. -// The path component matching videos/* is captured as the named variable. -// -// * ``{name=**}`` : A named variable matching zero or more path segments. -// -// Only named matches can be used to perform rewrites. -// -// Examples using path_template_rewrite: -// -// * The pattern ``/{one}/{two}`` paired with a substitution string of ``/{two}/{one}`` would -// transform ``/cat/dog`` into ``/dog/cat``. -// -// * The pattern ``/videos/{language=lang/*}/*`` paired with a substitution string of -// ``/{language}`` would transform ``/videos/lang/en/video.m4s`` into ``lang/en``. -// -// * The path pattern ``/content/{format}/{lang}/{id}/{file}.vtt`` paired with a substitution -// string of ``/{lang}/{format}/{file}.vtt`` would transform ``/content/hls/en-us/12345/en_193913.vtt`` -// into ``/en-us/hls/en_193913.vtt``. -message UriTemplateRewriteConfig { - string path_template_rewrite = 1 [(validate.rules).string = {min_len: 1 max_len: 256}]; -} diff --git a/src/main/proto/envoy/extensions/quic/client_writer_factory/v3/default_client_writer.proto b/src/main/proto/envoy/extensions/quic/client_writer_factory/v3/default_client_writer.proto deleted file mode 100644 index c43160e..0000000 --- a/src/main/proto/envoy/extensions/quic/client_writer_factory/v3/default_client_writer.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.client_writer_factory.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.client_writer_factory.v3"; -option java_outer_classname = "DefaultClientWriterProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/client_writer_factory/v3;client_writer_factoryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Default QUIC Client Packet Writer] -// [#extension: envoy.quic.packet_writer.default] - -// The default QUIC packet writer used for QUIC upstream connections which is platform independent. -message DefaultClientWriter { -} diff --git a/src/main/proto/envoy/extensions/quic/connection_debug_visitor/quic_stats/v3/quic_stats.proto b/src/main/proto/envoy/extensions/quic/connection_debug_visitor/quic_stats/v3/quic_stats.proto deleted file mode 100644 index 541fa8c..0000000 --- a/src/main/proto/envoy/extensions/quic/connection_debug_visitor/quic_stats/v3/quic_stats.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.connection_debug_visitor.quic_stats.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.connection_debug_visitor.quic_stats.v3"; -option java_outer_classname = "QuicStatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/connection_debug_visitor/quic_stats/v3;quic_statsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC stats config] -// [#extension: envoy.quic.connection_debug_visitor.quic_stats] - -// Configuration for a QUIC debug visitor which emits stats from the underlying QUIC transport. -message Config { - // Period to update stats while the connection is open. If unset, updates only happen when the - // connection is closed. Stats are always updated one final time when the connection is closed. - google.protobuf.Duration update_period = 2 [(validate.rules).duration = {gte {nanos: 1000000}}]; -} diff --git a/src/main/proto/envoy/extensions/quic/connection_debug_visitor/v3/connection_debug_visitor_basic.proto b/src/main/proto/envoy/extensions/quic/connection_debug_visitor/v3/connection_debug_visitor_basic.proto deleted file mode 100644 index bf7eacc..0000000 --- a/src/main/proto/envoy/extensions/quic/connection_debug_visitor/v3/connection_debug_visitor_basic.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.connection_debug_visitor.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.connection_debug_visitor.v3"; -option java_outer_classname = "ConnectionDebugVisitorBasicProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/connection_debug_visitor/v3;connection_debug_visitorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC connection debug visitor basic config] -// [#extension: envoy.quic.connection_debug_visitor.basic] - -// Configuration for a basic QUIC connection debug visitor. -message BasicConfig { -} diff --git a/src/main/proto/envoy/extensions/quic/connection_id_generator/quic_lb/v3/quic_lb.proto b/src/main/proto/envoy/extensions/quic/connection_id_generator/quic_lb/v3/quic_lb.proto deleted file mode 100644 index fac2595..0000000 --- a/src/main/proto/envoy/extensions/quic/connection_id_generator/quic_lb/v3/quic_lb.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.connection_id_generator.quic_lb.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.connection_id_generator.quic_lb.v3"; -option java_outer_classname = "QuicLbProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/connection_id_generator/quic_lb/v3;quic_lbv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC-LB connection ID generator config] -// [#extension: envoy.quic.connection_id_generator.quic_lb] - -// Configuration for a connection ID generator implementation for the QUIC-LB draft RFC for -// routable connection IDs. -// -// Connection IDs always have the length self encoded, as described in -// https://datatracker.ietf.org/doc/html/draft-ietf-quic-load-balancers#name-length-self-description. -// -// See https://datatracker.ietf.org/doc/html/draft-ietf-quic-load-balancers for details. -// -// .. warning:: -// -// This is still a work in progress. Interoperability testing has not yet been performed. -// [#next-free-field: 7] -message Config { - option (xds.annotations.v3.message_status).work_in_progress = true; - - // Must be at least 1 octet. - // The length of server_id and nonce_length_bytes must be 18 or less. - // See https://datatracker.ietf.org/doc/html/draft-ietf-quic-load-balancers#name-server-id-allocation. - config.core.v3.DataSource server_id = 2 [(validate.rules).message = {required: true}]; - - // If true, indicates that the :ref:`server_id - // ` is base64 encoded. - // - // This can be useful if the ID may contain binary data and must be transmitted as a string, for example in - // an environment variable. - bool server_id_base64_encoded = 6; - - // Optional validation of the expected server ID length. If this is non-zero and the value in ``server_id`` - // does not have a matching length, a configuration error is generated. This can be useful for validating - // that the server ID is valid. - uint32 expected_server_id_length = 3 [(validate.rules).uint32 = {lte: 18}]; - - // The nonce length must be at least 4 bytes. - // The length of server_id and nonce_length_bytes must be 18 bytes or less. - uint32 nonce_length_bytes = 4 [(validate.rules).uint32 = {lte: 16 gte: 4}]; - - // Configuration to fetch the encryption key and configuration version. - // - // The SDS service is for a :ref:`GenericSecret `. - // The data should populate :ref:`secrets `: - // - // "encryption_key" must contain the 16 byte encryption key. - // - // "configuration_version" must contain a 1 byte unsigned integer of value less than 7. - // See https://datatracker.ietf.org/doc/html/draft-ietf-quic-load-balancers#name-config-rotation. - transport_sockets.tls.v3.SdsSecretConfig encryption_parameters = 5 - [(validate.rules).message = {required: true}]; - - // Use the unencrypted mode. This is useful for testing or a simplified implementation of the - // downstream load balancer, but allows for linking different CIDs for the same connection, and - // leaks information about the valid server IDs in use. This mode does not comply with the RFC. - // - // Note that in this mode, :ref:`encryption_parameters - // ` - // is still required because it contains ``configuration_version``, which is still - // needed. ``encryption_key`` can be set to ``inline_string: '0000000000000000'``. - bool unencrypted_mode = 1; -} diff --git a/src/main/proto/envoy/extensions/quic/connection_id_generator/v3/envoy_deterministic_connection_id_generator.proto b/src/main/proto/envoy/extensions/quic/connection_id_generator/v3/envoy_deterministic_connection_id_generator.proto deleted file mode 100644 index 5d1777a..0000000 --- a/src/main/proto/envoy/extensions/quic/connection_id_generator/v3/envoy_deterministic_connection_id_generator.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.connection_id_generator.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.connection_id_generator.v3"; -option java_outer_classname = "EnvoyDeterministicConnectionIdGeneratorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/connection_id_generator/v3;connection_id_generatorv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC connection ID generator config] -// [#extension: envoy.quic.deterministic_connection_id_generator] - -// Configuration for a connection ID generator implementation which issues predictable CIDs with stable first 4 bytes. -message DeterministicConnectionIdGeneratorConfig { -} diff --git a/src/main/proto/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto b/src/main/proto/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto deleted file mode 100644 index d1065f7..0000000 --- a/src/main/proto/envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.crypto_stream.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.crypto_stream.v3"; -option java_outer_classname = "CryptoStreamProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/crypto_stream/v3;crypto_streamv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC server crypto stream config] -// [#extension: envoy.quic.crypto_stream.server.quiche] - -// Configuration for the default QUIC server crypto stream provided by QUICHE. -message CryptoServerStreamConfig { -} diff --git a/src/main/proto/envoy/extensions/quic/proof_source/v3/proof_source.proto b/src/main/proto/envoy/extensions/quic/proof_source/v3/proof_source.proto deleted file mode 100644 index 30a9634..0000000 --- a/src/main/proto/envoy/extensions/quic/proof_source/v3/proof_source.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.proof_source.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.proof_source.v3"; -option java_outer_classname = "ProofSourceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/proof_source/v3;proof_sourcev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC proof source config] -// [#extension: envoy.quic.proof_source.filter_chain] - -// Configuration for the default QUIC proof source. -message ProofSourceConfig { -} diff --git a/src/main/proto/envoy/extensions/quic/server_preferred_address/v3/datasource.proto b/src/main/proto/envoy/extensions/quic/server_preferred_address/v3/datasource.proto deleted file mode 100644 index 5bea486..0000000 --- a/src/main/proto/envoy/extensions/quic/server_preferred_address/v3/datasource.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.server_preferred_address.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.server_preferred_address.v3"; -option java_outer_classname = "DatasourceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/server_preferred_address/v3;server_preferred_addressv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC DataSource server preferred address config] -// [#extension: envoy.quic.server_preferred_address.datasource] - -// Configuration for DataSourceServerPreferredAddressConfig. -message DataSourceServerPreferredAddressConfig { - // Addresses for server preferred address for a single address family (IPv4 or IPv6). - message AddressFamilyConfig { - // The server preferred address sent to clients. The data must contain an IP address string. - config.core.v3.DataSource address = 1 [(validate.rules).message = {required: true}]; - - // The server preferred address port sent to clients. The data must contain a integer port value. - // - // If this is not specified, the listener's port is used. - // - // Note: Envoy currently must receive all packets for a QUIC connection on the same port, so unless - // :ref:`dnat_address ` - // is configured, this must be left unset. - config.core.v3.DataSource port = 2; - - // If there is a DNAT between the client and Envoy, the address that Envoy will observe - // server preferred address packets being sent to. If this is not specified, it is assumed - // there is no DNAT and the server preferred address packets will be sent to the address advertised - // to clients for server preferred address. - config.core.v3.DataSource dnat_address = 3; - } - - // The IPv4 address to advertise to clients for Server Preferred Address. - AddressFamilyConfig ipv4_config = 1; - - // The IPv6 address to advertise to clients for Server Preferred Address. - AddressFamilyConfig ipv6_config = 2; -} diff --git a/src/main/proto/envoy/extensions/quic/server_preferred_address/v3/fixed_server_preferred_address_config.proto b/src/main/proto/envoy/extensions/quic/server_preferred_address/v3/fixed_server_preferred_address_config.proto deleted file mode 100644 index 35326c1..0000000 --- a/src/main/proto/envoy/extensions/quic/server_preferred_address/v3/fixed_server_preferred_address_config.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.quic.server_preferred_address.v3; - -import "envoy/config/core/v3/address.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.quic.server_preferred_address.v3"; -option java_outer_classname = "FixedServerPreferredAddressConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/quic/server_preferred_address/v3;server_preferred_addressv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: QUIC fixed server preferred address config] -// [#extension: envoy.quic.server_preferred_address.fixed] - -// Configuration for FixedServerPreferredAddressConfig. -message FixedServerPreferredAddressConfig { - // Addresses for server preferred address for a single address family (IPv4 or IPv6). - message AddressFamilyConfig { - // The server preferred address sent to clients. - // - // .. note:: - // - // Envoy currently requires all packets for a QUIC connection to arrive on the same port. Therefore, unless a - // :ref:`dnat_address ` - // is explicitly configured, the port specified here must be set to zero. In such cases, Envoy will automatically - // use the listener's port. - // - config.core.v3.SocketAddress address = 1; - - // If a DNAT exists between the client and Envoy, this is the address where Envoy will observe incoming server - // preferred address packets. If unspecified, Envoy assumes there is no DNAT, and packets will be sent directly - // to the address advertised to clients as the server preferred address. - // - // .. note:: - // - // Envoy currently requires all packets for a QUIC connection to arrive on the same port. Consequently, the - // port for this address must be set to zero, with Envoy defaulting to the listener's port instead. - // - config.core.v3.SocketAddress dnat_address = 2; - } - - // String representation of IPv4 address, i.e. "127.0.0.2". - // If not specified, none will be configured. - string ipv4_address = 1; - - // The IPv4 address to advertise to clients for Server Preferred Address. - // This field takes precedence over - // :ref:`ipv4_address `. - AddressFamilyConfig ipv4_config = 3; - - // String representation of IPv6 address, i.e. "::1". - // If not specified, none will be configured. - string ipv6_address = 2; - - // The IPv6 address to advertise to clients for Server Preferred Address. - // This field takes precedence over - // :ref:`ipv6_address `. - AddressFamilyConfig ipv6_config = 4; -} diff --git a/src/main/proto/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto b/src/main/proto/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto deleted file mode 100644 index 7c3dc89..0000000 --- a/src/main/proto/envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.rate_limit_descriptors.expr.v3; - -import "google/api/expr/v1alpha1/syntax.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.rate_limit_descriptors.expr.v3"; -option java_outer_classname = "ExprProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/rate_limit_descriptors/expr/v3;exprv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rate limit descriptor expression] -// [#extension: envoy.rate_limit_descriptors.expr] - -// The following descriptor entry is appended with a value computed -// from a symbolic Common Expression Language expression. -// See :ref:`attributes ` for the set of -// available attributes. -// -// .. code-block:: cpp -// -// ("", "") -message Descriptor { - // The key to use in the descriptor entry. - string descriptor_key = 1 [(validate.rules).string = {min_len: 1}]; - - // If set to true, Envoy skips the descriptor if the expression evaluates to an error. - // By default, the rate limit is not applied when an expression produces an error. - bool skip_if_error = 2; - - oneof expr_specifier { - // Expression in a text form, e.g. "connection.requested_server_name". - string text = 3 [(validate.rules).string = {min_len: 1}]; - - // Parsed expression in AST form. - google.api.expr.v1alpha1.Expr parsed = 4; - } -} diff --git a/src/main/proto/envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto b/src/main/proto/envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto deleted file mode 100644 index c224eaa..0000000 --- a/src/main/proto/envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.rbac.audit_loggers.stream.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.rbac.audit_loggers.stream.v3"; -option java_outer_classname = "StreamProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3;streamv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Standard Streams RBAC Audit Loggers] -// [#not-implemented-hide:] - -// Custom configuration for the RBAC audit logger that writes log entries -// directly to the operating system's standard output. -// The logger outputs in JSON format and is currently not configurable. -message StdoutAuditLog { -} diff --git a/src/main/proto/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto b/src/main/proto/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto deleted file mode 100644 index 6f6bb7f..0000000 --- a/src/main/proto/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.rbac.matchers.upstream_ip_port.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/type/v3/range.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.rbac.matchers.upstream_ip_port.v3"; -option java_outer_classname = "UpstreamIpPortMatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/matchers/upstream_ip_port/v3;upstream_ip_portv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RBAC upstream IP and port matcher plugin] -// [#extension: envoy.rbac.matchers.upstream_ip_port] - -// This is configuration for matching upstream ip and port. -// Note that although both fields are optional, at least one of IP or port must be supplied. If only -// one is supplied the other is a wildcard match. -// This matcher requires a filter in the chain to have saved the upstream address in the -// filter state before the matcher is executed by RBAC filter. The state should be saved with key -// ``envoy.stream.upstream_address`` (See -// :repo:`upstream_address.h`). -// Also, See :repo:`proxy_filter.cc` -// for an example of a filter which populates the FilterState. -message UpstreamIpPortMatcher { - // A CIDR block that will be used to match the upstream IP. - // Both Ipv4 and Ipv6 ranges can be matched. - config.core.v3.CidrRange upstream_ip = 1; - - // A port range that will be used to match the upstream port. - type.v3.Int64Range upstream_port_range = 2; -} diff --git a/src/main/proto/envoy/extensions/rbac/principals/mtls_authenticated/v3/mtls_authenticated.proto b/src/main/proto/envoy/extensions/rbac/principals/mtls_authenticated/v3/mtls_authenticated.proto deleted file mode 100644 index 76a145f..0000000 --- a/src/main/proto/envoy/extensions/rbac/principals/mtls_authenticated/v3/mtls_authenticated.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.rbac.principals.mtls_authenticated.v3; - -import "envoy/extensions/transport_sockets/tls/v3/common.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.rbac.principals.mtls_authenticated.v3"; -option java_outer_classname = "MtlsAuthenticatedProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/principals/mtls_authenticated/v3;mtls_authenticatedv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RBAC MTls Authenticated Principal] -// [#extension: envoy.rbac.principals.mtls_authenticated] - -// Authentication attributes for a downstream mTLS connection. All modes require that a peer certificate -// was presented and validated using the ValidationContext in the DownstreamTlsContext configuration. -// -// If neither field is set, a configuration loading error will be generated. This is so that -// not validating SANs requires an affirmative configuration to disable, to prevent accidentally -// not configuring SAN validation. -// -// If ``any_validated_client_certificate`` is set in addition to ``san_matcher`` or a future field -// which specifies additional validation, the other field always takes precedence over -// ``any_validated_client_certificate`` and all specified validation is performed. -message Config { - // Specifies a SAN that must be present in the validated peer certificate. - transport_sockets.tls.v3.SubjectAltNameMatcher san_matcher = 1; - - // Only require that the peer certificate is present and valid. - bool any_validated_client_certificate = 2; -} diff --git a/src/main/proto/envoy/extensions/regex_engines/v3/google_re2.proto b/src/main/proto/envoy/extensions/regex_engines/v3/google_re2.proto deleted file mode 100644 index 549e45e..0000000 --- a/src/main/proto/envoy/extensions/regex_engines/v3/google_re2.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.regex_engines.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.regex_engines.v3"; -option java_outer_classname = "GoogleRe2Proto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/regex_engines/v3;regex_enginesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Google RE2] -// [#extension: envoy.regex_engines.google_re2] - -// Google's `RE2 `_ regex engine. The regex string must adhere to -// the documented `syntax `_. The engine is designed -// to complete execution in linear time as well as limit the amount of memory used. -// -// Envoy emits two stats for tracking the program size of regexes: the histogram ``re2.program_size``, -// which records the program size, and the counter ``re2.exceeded_warn_level``, which is incremented -// each time the program size exceeds the warn level threshold. -message GoogleRE2 { -} diff --git a/src/main/proto/envoy/extensions/request_id/uuid/v3/uuid.proto b/src/main/proto/envoy/extensions/request_id/uuid/v3/uuid.proto deleted file mode 100644 index 1d216d9..0000000 --- a/src/main/proto/envoy/extensions/request_id/uuid/v3/uuid.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.request_id.uuid.v3; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.request_id.uuid.v3"; -option java_outer_classname = "UuidProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/request_id/uuid/v3;uuidv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UUID] -// [#extension: envoy.request_id.uuid] - -// Configuration for the default UUID request ID extension which has the following behavior: -// -// 1. Request ID is propagated using the :ref:`x-request-id -// ` header. -// -// 2. Request ID is a universally unique identifier `(UUID4) -// `_. -// -// 3. Tracing decision (sampled, forced, etc) is set in 14th nibble of the UUID. By default this will -// overwrite existing UUIDs received in the ``x-request-id`` header if the trace sampling decision -// is changed. The 14th nibble of the UUID4 has been chosen because it is fixed to '4' by the -// standard. Thus, '4' indicates a default UUID and no trace status. This nibble is swapped to: -// -// a. '9': Sampled. -// b. 'a': Force traced due to server-side override. -// c. 'b': Force traced due to client-side request ID joining. -// -// See the :ref:`x-request-id ` documentation for -// more information. -message UuidRequestIdConfig { - // Whether the implementation alters the UUID to contain the trace sampling decision as per the - // ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no - // modification to the UUID will be performed. It is important to note that if disabled, - // stable sampling of traces, access logs, etc. will no longer work and only random sampling will - // be possible. - google.protobuf.BoolValue pack_trace_reason = 1; - - // Set whether to use :ref:`x-request-id` for sampling or not. - // This defaults to true. See the :ref:`context propagation ` - // overview for more information. - google.protobuf.BoolValue use_request_id_for_trace_sampling = 2; -} diff --git a/src/main/proto/envoy/extensions/resource_monitors/cgroup_memory/v3/cgroup_memory.proto b/src/main/proto/envoy/extensions/resource_monitors/cgroup_memory/v3/cgroup_memory.proto deleted file mode 100644 index 45751be..0000000 --- a/src/main/proto/envoy/extensions/resource_monitors/cgroup_memory/v3/cgroup_memory.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.resource_monitors.cgroup_memory.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.cgroup_memory.v3"; -option java_outer_classname = "CgroupMemoryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/cgroup_memory/v3;cgroup_memoryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Cgroup Memory] -// [#extension: envoy.resource_monitors.cgroup_memory] - -message CgroupMemoryConfig { - // Optional max memory limit in bytes used for memory pressure calculations. - // If set, this value is used as an upper bound on the memory limit, taking the minimum - // between this value and the system's cgroup memory limit. If not set, the system's - // cgroup memory limit is always used. - uint64 max_memory_bytes = 1; -} diff --git a/src/main/proto/envoy/extensions/resource_monitors/cpu_utilization/v3/cpu_utilization.proto b/src/main/proto/envoy/extensions/resource_monitors/cpu_utilization/v3/cpu_utilization.proto deleted file mode 100644 index 2f91e09..0000000 --- a/src/main/proto/envoy/extensions/resource_monitors/cpu_utilization/v3/cpu_utilization.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.resource_monitors.cpu_utilization.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.cpu_utilization.v3"; -option java_outer_classname = "CpuUtilizationProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/cpu_utilization/v3;cpu_utilizationv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: CPU utilization] -// [#extension: envoy.resource_monitors.cpu_utilization] - -// The CPU utilization resource monitor reports the Envoy process the CPU Utilization across different platforms. -message CpuUtilizationConfig { - enum UtilizationComputeStrategy { - // Reports CPU Utilization of the entire Linux Host machine - HOST = 0; - - // Reports CPU Utilization of Envoy Container using CGROUP stats in Linux K8s environment - CONTAINER = 1; - } - - UtilizationComputeStrategy mode = 1 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto b/src/main/proto/envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto deleted file mode 100644 index b65b01a..0000000 --- a/src/main/proto/envoy/extensions/resource_monitors/downstream_connections/v3/downstream_connections.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.resource_monitors.downstream_connections.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.downstream_connections.v3"; -option java_outer_classname = "DownstreamConnectionsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/downstream_connections/v3;downstream_connectionsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Downstream connections] -// [#extension: envoy.resource_monitors.global_downstream_max_connections] - -// The downstream connections resource monitor tracks the global number of open downstream connections. -message DownstreamConnectionsConfig { - // Maximum threshold for global open downstream connections, defaults to 0. - // If monitor is enabled in Overload manager api, this field should be explicitly configured with value greater than 0. - int64 max_active_downstream_connections = 1 [(validate.rules).int64 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto b/src/main/proto/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto deleted file mode 100644 index 4a9f07d..0000000 --- a/src/main/proto/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.resource_monitors.fixed_heap.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.fixed_heap.v3"; -option java_outer_classname = "FixedHeapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/fixed_heap/v3;fixed_heapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Fixed heap] -// [#extension: envoy.resource_monitors.fixed_heap] - -// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a -// fraction of currently reserved heap memory divided by a statically configured maximum -// specified in the FixedHeapConfig. -message FixedHeapConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.resource_monitor.fixed_heap.v2alpha.FixedHeapConfig"; - - uint64 max_heap_size_bytes = 1 [(validate.rules).uint64 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto b/src/main/proto/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto deleted file mode 100644 index edbce84..0000000 --- a/src/main/proto/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.resource_monitors.injected_resource.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.resource_monitors.injected_resource.v3"; -option java_outer_classname = "InjectedResourceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/resource_monitors/injected_resource/v3;injected_resourcev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Injected resource] -// [#extension: envoy.resource_monitors.injected_resource] - -// The injected resource monitor allows injecting a synthetic resource pressure into Envoy -// via a text file, which must contain a floating-point number in the range [0..1] representing -// the resource pressure and be updated atomically by a symbolic link swap. -// This is intended primarily for integration tests to force Envoy into an overloaded state. -message InjectedResourceConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.resource_monitor.injected_resource.v2alpha.InjectedResourceConfig"; - - string filename = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto b/src/main/proto/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto deleted file mode 100644 index 07de418..0000000 --- a/src/main/proto/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.omit_canary_hosts.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_canary_hosts.v3"; -option java_outer_classname = "OmitCanaryHostsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/host/omit_canary_hosts/v3;omit_canary_hostsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Omit Canary Hosts Predicate] -// [#extension: envoy.retry_host_predicates.omit_canary_hosts] - -message OmitCanaryHostsPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.retry.omit_canary_hosts.v2.OmitCanaryHostsPredicate"; -} diff --git a/src/main/proto/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto b/src/main/proto/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto deleted file mode 100644 index 6be23c3..0000000 --- a/src/main/proto/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.omit_host_metadata.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v3"; -option java_outer_classname = "OmitHostMetadataConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/host/omit_host_metadata/v3;omit_host_metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Omit host metadata retry predicate] - -// A retry host predicate that can be used to reject a host based on -// predefined metadata match criteria. -// [#extension: envoy.retry_host_predicates.omit_host_metadata] -message OmitHostMetadataConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.retry.omit_host_metadata.v2.OmitHostMetadataConfig"; - - // Retry host predicate metadata match criteria. The hosts in - // the upstream cluster with matching metadata will be omitted while - // attempting a retry of a failed request. The metadata should be specified - // under the ``envoy.lb`` key. - config.core.v3.Metadata metadata_match = 1; -} diff --git a/src/main/proto/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto b/src/main/proto/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto deleted file mode 100644 index 20961f8..0000000 --- a/src/main/proto/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.previous_hosts.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.previous_hosts.v3"; -option java_outer_classname = "PreviousHostsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/host/previous_hosts/v3;previous_hostsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Previous Hosts Predicate] -// [#extension: envoy.retry_host_predicates.previous_hosts] - -message PreviousHostsPredicate { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.retry.previous_hosts.v2.PreviousHostsPredicate"; -} diff --git a/src/main/proto/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto b/src/main/proto/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto deleted file mode 100644 index eaed4a7..0000000 --- a/src/main/proto/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.priority.previous_priorities.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.priority.previous_priorities.v3"; -option java_outer_classname = "PreviousPrioritiesConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/retry/priority/previous_priorities/v3;previous_prioritiesv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Previous priorities retry selector] - -// A retry host selector that attempts to spread retries between priorities, even if certain -// priorities would not normally be attempted due to higher priorities being available. -// -// As priorities get excluded, load will be distributed amongst the remaining healthy priorities -// based on the relative health of the priorities, matching how load is distributed during regular -// host selection. For example, given priority healths of {100, 50, 50}, the original load will be -// {100, 0, 0} (since P0 has capacity to handle 100% of the traffic). If P0 is excluded, the load -// changes to {0, 50, 50}, because P1 is only able to handle 50% of the traffic, causing the -// remaining to spill over to P2. -// -// Each priority attempted will be excluded until there are no healthy priorities left, at which -// point the list of attempted priorities will be reset, essentially starting from the beginning. -// For example, given three priorities P0, P1, P2 with healthy % of 100, 0 and 50 respectively, the -// following sequence of priorities would be selected (assuming update_frequency = 1): -// Attempt 1: P0 (P0 is 100% healthy) -// Attempt 2: P2 (P0 already attempted, P2 only healthy priority) -// Attempt 3: P0 (no healthy priorities, reset) -// Attempt 4: P2 -// -// In the case of all upstream hosts being unhealthy, no adjustments will be made to the original -// priority load, so behavior should be identical to not using this plugin. -// -// Using this PriorityFilter requires rebuilding the priority load, which runs in O(# of -// priorities), which might incur significant overhead for clusters with many priorities. -// [#extension: envoy.retry_priorities.previous_priorities] -message PreviousPrioritiesConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.retry.previous_priorities.PreviousPrioritiesConfig"; - - // How often the priority load should be updated based on previously attempted priorities. Useful - // to allow each priorities to receive more than one request before being excluded or to reduce - // the number of times that the priority load has to be recomputed. - // - // For example, by setting this to 2, then the first two attempts (initial attempt and first - // retry) will use the unmodified priority load. The third and fourth attempt will use priority - // load which excludes the priorities routed to with the first two attempts, and the fifth and - // sixth attempt will use the priority load excluding the priorities used for the first four - // attempts. - // - // Must be greater than 0. - int32 update_frequency = 1 [(validate.rules).int32 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/extensions/router/cluster_specifiers/lua/v3/lua.proto b/src/main/proto/envoy/extensions/router/cluster_specifiers/lua/v3/lua.proto deleted file mode 100644 index b8ea10a..0000000 --- a/src/main/proto/envoy/extensions/router/cluster_specifiers/lua/v3/lua.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.router.cluster_specifiers.lua.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.router.cluster_specifiers.lua.v3"; -option java_outer_classname = "LuaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/router/cluster_specifiers/lua/v3;luav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Lua] -// -// Lua cluster specifier :ref:`configuration reference documentation `. -// [#extension: envoy.router.cluster_specifier_plugin.lua] - -message LuaConfig { - // The lua code that Envoy will execute to select cluster. - config.core.v3.DataSource source_code = 1 [(validate.rules).message = {required: true}]; - - // Default cluster. It will be used when the lua code execute failure. - string default_cluster = 2; -} diff --git a/src/main/proto/envoy/extensions/router/cluster_specifiers/matcher/v3/matcher.proto b/src/main/proto/envoy/extensions/router/cluster_specifiers/matcher/v3/matcher.proto deleted file mode 100644 index 87851b1..0000000 --- a/src/main/proto/envoy/extensions/router/cluster_specifiers/matcher/v3/matcher.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.router.cluster_specifiers.matcher.v3; - -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.router.cluster_specifiers.matcher.v3"; -option java_outer_classname = "MatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/router/cluster_specifiers/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Matcher Based Cluster Specifier] -// [#extension: envoy.router.cluster_specifier_plugin.matcher] - -message ClusterAction { - // Indicates the upstream cluster to which the request should be routed - // to. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; -} - -message MatcherClusterSpecifier { - // The matcher for cluster selection after the route has been selected. This is used when the - // route has multiple clusters (like multiple clusters for different users) and the matcher - // is used to select the cluster to use for the request. - // - // The match tree to use for grouping incoming requests into buckets. - // - // Example: - // - // .. validated-code-block:: yaml - // :type-name: xds.type.matcher.v3.Matcher - // - // matcher_list: - // matchers: - // - predicate: - // single_predicate: - // input: - // typed_config: - // '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput - // header_name: env - // value_match: - // exact: staging - // on_match: - // action: - // typed_config: - // '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction - // cluster: "staging-cluster" - // - // - predicate: - // single_predicate: - // input: - // typed_config: - // '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput - // header_name: env - // value_match: - // exact: prod - // on_match: - // action: - // typed_config: - // '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction - // cluster: "prod-cluster" - // - // # Catch-all with a default cluster. - // on_no_match: - // action: - // typed_config: - // '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction - // cluster: "default-cluster" - // - xds.type.matcher.v3.Matcher cluster_matcher = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto b/src/main/proto/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto deleted file mode 100644 index 7d538cf..0000000 --- a/src/main/proto/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.stat_sinks.graphite_statsd.v3; - -import "envoy/config/core/v3/address.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.stat_sinks.graphite_statsd.v3"; -option java_outer_classname = "GraphiteStatsdProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/stat_sinks/graphite_statsd/v3;graphite_statsdv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Graphite+Statsd] -// Stats configuration proto schema for ``envoy.stat_sinks.graphite_statsd`` sink. -// The sink emits stats with `Graphite `_ -// compatible tags. Tags are configurable via :ref:`StatsConfig -// `. -// [#extension: envoy.stat_sinks.graphite_statsd] - -message GraphiteStatsdSink { - oneof statsd_specifier { - option (validate.required) = true; - - // The UDP address of a running Graphite-compliant listener. If specified, - // statistics will be flushed to this address. - config.core.v3.Address address = 1; - } - - // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field - // ` for more details. - string prefix = 3; - - // Optional max datagram size to use when sending UDP messages. By default Envoy - // will emit one metric per datagram. By specifying a max-size larger than a single - // metric, Envoy will emit multiple, new-line separated metrics. The max datagram - // size should not exceed your network's MTU. - // - // Note that this value may not be respected if smaller than a single metric. - google.protobuf.UInt64Value max_bytes_per_datagram = 4 [(validate.rules).uint64 = {gt: 0}]; -} diff --git a/src/main/proto/envoy/extensions/stat_sinks/open_telemetry/v3/open_telemetry.proto b/src/main/proto/envoy/extensions/stat_sinks/open_telemetry/v3/open_telemetry.proto deleted file mode 100644 index 9b29b01..0000000 --- a/src/main/proto/envoy/extensions/stat_sinks/open_telemetry/v3/open_telemetry.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.stat_sinks.open_telemetry.v3; - -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/grpc_service.proto"; - -import "google/protobuf/wrappers.proto"; - -import "opentelemetry/proto/common/v1/common.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.stat_sinks.open_telemetry.v3"; -option java_outer_classname = "OpenTelemetryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/stat_sinks/open_telemetry/v3;open_telemetryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Open Telemetry Stats Sink] -// Stats configuration proto schema for ``envoy.stat_sinks.open_telemetry`` sink. -// [#extension: envoy.stat_sinks.open_telemetry] - -// [#next-free-field: 9] -message SinkConfig { - // ConversionAction is used to convert a stat to a metric. If a stat matches, - // the metric_name and static_metric_labels will be - // used to create the metric. This can be used to rename a - // stat, add static labels, and aggregate multiple stats into a single metric. - message ConversionAction { - // The metric name to use for the stat. - string metric_name = 2; - - // Static metric labels to use for the metric. - repeated opentelemetry.proto.common.v1.KeyValue static_metric_labels = 3; - } - - // DropAction is an action that, when matched, will prevent the stat from being converted to an OTLP metric and flushed. - message DropAction { - } - - oneof protocol_specifier { - option (validate.required) = true; - - // The upstream gRPC cluster that implements the OTLP/gRPC collector. - config.core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}]; - } - - // Attributes to be associated with the resource in the OTLP message. - // [#extension-category: envoy.tracers.opentelemetry.resource_detectors] - repeated config.core.v3.TypedExtensionConfig resource_detectors = 7; - - // If set to true, counters will be emitted as deltas, and the OTLP message will have - // ``AGGREGATION_TEMPORALITY_DELTA`` set as AggregationTemporality. - bool report_counters_as_deltas = 2; - - // If set to true, histograms will be emitted as deltas, and the OTLP message will have - // ``AGGREGATION_TEMPORALITY_DELTA`` set as AggregationTemporality. - bool report_histograms_as_deltas = 3; - - // If set to true, metrics will have their tags emitted as OTLP attributes, which may - // contain values used by the tag extractor or additional tags added during stats creation. - // Otherwise, no attributes will be associated with the export message. Default value is true. - google.protobuf.BoolValue emit_tags_as_attributes = 4; - - // If set to true, metric names will be represented as the tag extracted name instead - // of the full metric name. Default value is true. - google.protobuf.BoolValue use_tag_extracted_name = 5; - - // If set, emitted stats names will be prepended with a prefix, so full stat name will be - // .. For example, if the stat name is "foo.bar" and prefix is - // "pre", the full stat name will be "pre.foo.bar". If this field is not set, there is no - // prefix added. According to the example, the full stat name will remain "foo.bar". - string prefix = 6; - - // The custom conversion from a stat to a metric. Currently, the only supported input is - // ``envoy.extensions.matching.common_inputs.stats.v3.StatFullNameMatchInput``. - // The supported actions are - // - ``envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.DropAction``. - // - ``envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.ConversionAction``. - // If stats are not matched, they will be directly converted to OTLP metrics as usual. - xds.type.matcher.v3.Matcher custom_metric_conversions = 8; -} diff --git a/src/main/proto/envoy/extensions/stat_sinks/wasm/v3/wasm.proto b/src/main/proto/envoy/extensions/stat_sinks/wasm/v3/wasm.proto deleted file mode 100644 index a0a2c6f..0000000 --- a/src/main/proto/envoy/extensions/stat_sinks/wasm/v3/wasm.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.stat_sinks.wasm.v3; - -import "envoy/extensions/wasm/v3/wasm.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.stat_sinks.wasm.v3"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/stat_sinks/wasm/v3;wasmv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Wasm] -// Wasm :ref:`configuration overview `. -// [#extension: envoy.stat_sinks.wasm] - -message Wasm { - // General Plugin configuration. - envoy.extensions.wasm.v3.PluginConfig config = 1; -} diff --git a/src/main/proto/envoy/extensions/string_matcher/lua/v3/lua.proto b/src/main/proto/envoy/extensions/string_matcher/lua/v3/lua.proto deleted file mode 100644 index 04c5b36..0000000 --- a/src/main/proto/envoy/extensions/string_matcher/lua/v3/lua.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.string_matcher.lua.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.string_matcher.lua.v3"; -option java_outer_classname = "LuaProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/string_matcher/lua/v3;luav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Lua StringMatcher] -// A Lua StringMatcher allows executing a Lua script to determine if a string is a match. The configured source -// code must define a function named `envoy_match`. If the function returns true, the string is considered a match. -// Any other result, including an execution error, is considered a non-match. -// -// Example: -// -// .. code-block:: yaml -// -// source_code: -// inline_string: | -// function envoy_match(str) -// -- Do something. -// return true -// end -// -// [#extension: envoy.string_matcher.lua] - -message Lua { - // The Lua code that Envoy will execute - config.core.v3.DataSource source_code = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/tracers/fluentd/v3/fluentd.proto b/src/main/proto/envoy/extensions/tracers/fluentd/v3/fluentd.proto deleted file mode 100644 index 5e58a60..0000000 --- a/src/main/proto/envoy/extensions/tracers/fluentd/v3/fluentd.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.fluentd.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.fluentd.v3"; -option java_outer_classname = "FluentdProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/fluentd/v3;fluentdv3"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.fluentd.v4alpha"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Fluentd tracer] - -// Configuration for the Fluentd tracer. -// This tracer extension will send the emitted traces over a TCP connection to an upstream that is accepting -// the Fluentd Forward Protocol as described in: `Fluentd Forward Protocol Specification -// `_. -// [#extension: envoy.tracers.fluentd] -// [#next-free-field: 7] -message FluentdConfig { - // The upstream cluster to connect to for streaming the Fluentd messages. - string cluster = 1 [(validate.rules).string = {min_len: 1}]; - - // A tag is a string separated with ``.`` (e.g. ``log.type``) to categorize events. - // See: https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#message-modes - string tag = 2 [(validate.rules).string = {min_len: 1}]; - - // The prefix to use when emitting tracer stats. - string stat_prefix = 3 [(validate.rules).string = {min_len: 1}]; - - // Interval for flushing traces to the TCP stream. Tracer will flush requests every time - // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to - // 1 second. - google.protobuf.Duration buffer_flush_interval = 4 [(validate.rules).duration = {gt {}}]; - - // Soft size limit in bytes for access log entries buffer. The logger will buffer requests until - // this limit it hit, or every time flush interval is elapsed, whichever comes first. When the buffer - // limit is hit, the logger will immediately flush the buffer contents. Setting it to zero effectively - // disables the batching. Defaults to 16384. - google.protobuf.UInt32Value buffer_size_bytes = 5; - - // Optional retry, in case upstream connection has failed. If this field is not set, the default values will be applied. - config.core.v3.RetryPolicy retry_policy = 6; -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/dynatrace_resource_detector.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/dynatrace_resource_detector.proto deleted file mode 100644 index adb072f..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/dynatrace_resource_detector.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.resource_detectors.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.resource_detectors.v3"; -option java_outer_classname = "DynatraceResourceDetectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/resource_detectors/v3;resource_detectorsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynatrace Resource Detector config] - -// Configuration for the Dynatrace Resource Detector extension. -// The resource detector reads from the Dynatrace enrichment files -// and adds host/process related attributes to the OpenTelemetry resource. -// -// See: -// -// `Enrich ingested data with Dynatrace-specific dimensions `_ -// -// [#extension: envoy.tracers.opentelemetry.resource_detectors.dynatrace] -message DynatraceResourceDetectorConfig { -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/environment_resource_detector.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/environment_resource_detector.proto deleted file mode 100644 index df62fc2..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/environment_resource_detector.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.resource_detectors.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.resource_detectors.v3"; -option java_outer_classname = "EnvironmentResourceDetectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/resource_detectors/v3;resource_detectorsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Environment Resource Detector config] - -// Configuration for the Environment Resource detector extension. -// The resource detector reads from the ``OTEL_RESOURCE_ATTRIBUTES`` -// environment variable, as per the OpenTelemetry specification. -// -// See: -// -// `OpenTelemetry specification `_ -// -// [#extension: envoy.tracers.opentelemetry.resource_detectors.environment] -message EnvironmentResourceDetectorConfig { -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/static_config_resource_detector.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/static_config_resource_detector.proto deleted file mode 100644 index c13ee0d..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/resource_detectors/v3/static_config_resource_detector.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.resource_detectors.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.resource_detectors.v3"; -option java_outer_classname = "StaticConfigResourceDetectorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/resource_detectors/v3;resource_detectorsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Static Config Resource Detector config] - -// Configuration for the Static Resource detector extension. -// The resource detector uses static config for resource attribute, -// as per the OpenTelemetry specification. -// -// [#extension: envoy.tracers.opentelemetry.resource_detectors.static_config] -message StaticConfigResourceDetectorConfig { - // Custom Resource attributes to be included. - map attributes = 1; -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/always_on_sampler.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/always_on_sampler.proto deleted file mode 100644 index 241dc06..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/always_on_sampler.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.samplers.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3"; -option java_outer_classname = "AlwaysOnSamplerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/samplers/v3;samplersv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Always On Sampler config] -// Configuration for the "AlwaysOn" Sampler extension. -// The sampler follows the "AlwaysOn" implementation from the OpenTelemetry -// SDK specification. -// -// See: -// `AlwaysOn sampler specification `_ -// [#extension: envoy.tracers.opentelemetry.samplers.always_on] - -message AlwaysOnSamplerConfig { -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/cel_sampler.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/cel_sampler.proto deleted file mode 100644 index d4253ea..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/cel_sampler.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.samplers.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/type/v3/cel.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3"; -option java_outer_classname = "CelSamplerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/samplers/v3;samplersv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: "CEL" Sampler config] -// Configuration for the "CEL" Sampler extension. -// -// [#extension: envoy.tracers.opentelemetry.samplers.cel] - -message CELSamplerConfig { - // Expression that, when evaluated, will be used to make sample decision. - xds.type.v3.CelExpression expression = 1 - [(xds.annotations.v3.field_status).work_in_progress = true]; -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto deleted file mode 100644 index 31bc82c..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.samplers.v3; - -import "envoy/config/core/v3/http_service.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3"; -option java_outer_classname = "DynatraceSamplerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/samplers/v3;samplersv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Dynatrace Sampler config] - -// Configuration for the Dynatrace Sampler extension. -// [#extension: envoy.tracers.opentelemetry.samplers.dynatrace] -message DynatraceSamplerConfig { - // The Dynatrace tenant. - // - // The value can be obtained from the Envoy deployment page in Dynatrace. - string tenant = 1; - - // The id of the Dynatrace cluster id. - // - // The value can be obtained from the Envoy deployment page in Dynatrace. - int32 cluster_id = 2; - - // The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example: - // - // .. code-block:: yaml - // - // http_service: - // http_uri: - // cluster: dynatrace - // uri: .dev.dynatracelabs.com/api/v2/samplingConfiguration - // timeout: 10s - // request_headers_to_add: - // - header: - // key : "authorization" - // value: "Api-Token dt..." - // - config.core.v3.HttpService http_service = 3; - - // Default number of root spans per minute, used when the value can't be obtained from the Dynatrace API. - // - // A default value of ``1000`` is used when: - // - // - ``root_spans_per_minute`` is unset - // - ``root_spans_per_minute`` is set to 0 - // - uint32 root_spans_per_minute = 4; -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/parent_based_sampler.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/parent_based_sampler.proto deleted file mode 100644 index d5b5d1a..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/parent_based_sampler.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.samplers.v3; - -import "envoy/config/core/v3/extension.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3"; -option java_outer_classname = "ParentBasedSamplerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/samplers/v3;samplersv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Parent Based Sampler config] -// Configuration for the "ParentBased" Sampler extension. -// The sampler follows the "ParentBased" implementation from the OpenTelemetry -// SDK specification. -// -// See: -// `ParentBased sampler specification `_ -// [#extension: envoy.tracers.opentelemetry.samplers.parent_based] - -message ParentBasedSamplerConfig { - // Specifies the sampler to be used by this sampler. - // The configured sampler will be used if the parent trace ID is not passed to Envoy - // - // required - // [#extension-category: envoy.tracers.opentelemetry.samplers] - config.core.v3.TypedExtensionConfig wrapped_sampler = 1; -} diff --git a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/trace_id_ratio_based_sampler.proto b/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/trace_id_ratio_based_sampler.proto deleted file mode 100644 index 0a97da6..0000000 --- a/src/main/proto/envoy/extensions/tracers/opentelemetry/samplers/v3/trace_id_ratio_based_sampler.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.tracers.opentelemetry.samplers.v3; - -import "envoy/type/v3/percent.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3"; -option java_outer_classname = "TraceIdRatioBasedSamplerProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/tracers/opentelemetry/samplers/v3;samplersv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Trace Id Ratio Based Sampler config] -// Configuration for the "TraceIdRatioBased" Sampler extension. -// The sampler follows the "TraceIdRatioBased" implementation from the OpenTelemetry -// SDK specification. -// -// See: -// `TraceIdRatioBased sampler specification `_ -// [#extension: envoy.tracers.opentelemetry.samplers.trace_id_ratio_based] - -message TraceIdRatioBasedSamplerConfig { - // If the given trace_id falls into a given percentage of all possible - // trace_id values, ShouldSample will return RECORD_AND_SAMPLE. - // required - // [#extension-category: envoy.tracers.opentelemetry.samplers] - type.v3.FractionalPercent sampling_percentage = 1; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/alts/v3/alts.proto b/src/main/proto/envoy/extensions/transport_sockets/alts/v3/alts.proto deleted file mode 100644 index e5d7a8b..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/alts/v3/alts.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.alts.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.alts.v3"; -option java_outer_classname = "AltsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/alts/v3;altsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: ALTS] -// [#extension: envoy.transport_sockets.alts] - -// Configuration for ALTS transport socket. This provides Google's ALTS protocol to Envoy. -// Store the peer identity in dynamic metadata, namespace is "envoy.transport_socket.peer_information", key is "peer_identity". -// https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ -message Alts { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.transport_socket.alts.v2alpha.Alts"; - - // The location of a handshaker service, this is usually 169.254.169.254:8080 - // on GCE. - string handshaker_service = 1 [(validate.rules).string = {min_len: 1}]; - - // The acceptable service accounts from peer, peers not in the list will be rejected in the - // handshake validation step. If empty, no validation will be performed. - repeated string peer_service_accounts = 2; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto b/src/main/proto/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto deleted file mode 100644 index 2c9b533..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.http_11_proxy.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.http_11_proxy.v3"; -option java_outer_classname = "UpstreamHttp11ConnectProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/http_11_proxy/v3;http_11_proxyv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Upstream HTTP/1.1 Proxy] -// [#extension: envoy.transport_sockets.http_11_proxy] - -// HTTP/1.1 proxy transport socket establishes an upstream connection to a proxy address -// instead of the target host's address. This behavior is triggered when the transport -// socket is configured and proxy information is provided. -// -// Behavior when proxying: -// ======================= -// When an upstream connection is established, instead of connecting directly to the endpoint -// address, the client will connect to the specified proxy address, send an HTTP/1.1 ``CONNECT`` request -// indicating the endpoint address, and process the response. If the response has HTTP status 200, -// the connection will be passed down to the underlying transport socket. -// -// Configuring proxy information: -// ============================== -// Set ``typed_filter_metadata`` in :ref:`LbEndpoint.Metadata ` or :ref:`LocalityLbEndpoints.Metadata `. -// using the key ``envoy.http11_proxy_transport_socket.proxy_address`` and the -// proxy address in ``config::core::v3::Address`` format. -// -message Http11ProxyUpstreamTransport { - // The underlying transport socket being wrapped. Defaults to plaintext (raw_buffer) if unset. - config.core.v3.TransportSocket transport_socket = 1; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto b/src/main/proto/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto deleted file mode 100644 index 4ef0229..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.internal_upstream.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/type/metadata/v3/metadata.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.internal_upstream.v3"; -option java_outer_classname = "InternalUpstreamProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/internal_upstream/v3;internal_upstreamv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Internal Upstream] -// [#extension: envoy.transport_sockets.internal_upstream] - -// Configuration for the internal upstream address. An internal address defines -// a loopback user space socket residing in the same proxy instance. This -// extension allows passing additional structured state across the user space -// socket in addition to the regular byte stream. The purpose is to facilitate -// communication between filters on the downstream and the upstream internal -// connections. All filter state objects that are shared with the upstream -// connection are also shared with the downstream internal connection using -// this transport socket. -message InternalUpstreamTransport { - // Describes the location of the imported metadata value. - // If the metadata with the given name is not present at the source location, - // then no metadata is passed through for this particular instance. - message MetadataValueSource { - // Specifies what kind of metadata. - type.metadata.v3.MetadataKind kind = 1 [(validate.rules).message = {required: true}]; - - // Name is the filter namespace used in the dynamic metadata. - string name = 2 [(validate.rules).string = {min_len: 1}]; - } - - // Specifies the metadata namespaces and values to insert into the downstream - // internal connection dynamic metadata when an internal address is used as a - // host. If the destination name is repeated across two metadata source - // locations, and both locations contain the metadata with the given name, - // then the latter in the list overrides the former. - repeated MetadataValueSource passthrough_metadata = 1; - - // The underlying transport socket being wrapped. - config.core.v3.TransportSocket transport_socket = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto b/src/main/proto/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto deleted file mode 100644 index 12c0e92..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.proxy_protocol.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/proxy_protocol.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.proxy_protocol.v3"; -option java_outer_classname = "UpstreamProxyProtocolProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/proxy_protocol/v3;proxy_protocolv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Upstream Proxy Protocol] -// [#extension: envoy.transport_sockets.upstream_proxy_protocol] - -// Configuration for PROXY protocol socket -message ProxyProtocolUpstreamTransport { - // The PROXY protocol settings - config.core.v3.ProxyProtocolConfig config = 1; - - // The underlying transport socket being wrapped. - config.core.v3.TransportSocket transport_socket = 2 [(validate.rules).message = {required: true}]; - - // If this is set to true, the null addresses are allowed in the PROXY protocol header. - // The proxy protocol header encodes the null addresses to AF_UNSPEC. - // [#not-implemented-hide:] - bool allow_unspecified_address = 3; - - // If true, all the TLVs are encoded in the connection pool key. - // [#not-implemented-hide:] - bool tlv_as_pool_key = 4; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto b/src/main/proto/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto deleted file mode 100644 index 9756ff5..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/quic/v3/quic_transport.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.quic.v3; - -import "envoy/extensions/transport_sockets/tls/v3/tls.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.quic.v3"; -option java_outer_classname = "QuicTransportProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/quic/v3;quicv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: quic transport] -// [#extension: envoy.transport_sockets.quic] -// The QUIC configurations below provide the transport socket configuration for downstream/upstream QUIC. - -// Configuration for Downstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. -message QuicDownstreamTransport { - tls.v3.DownstreamTlsContext downstream_tls_context = 1 - [(validate.rules).message = {required: true}]; - - // If false, QUIC will tell TLS to reject any early data and to stop issuing 0-RTT credentials with resumption session tickets. This will prevent clients from sending 0-RTT requests. - // Default to true. - google.protobuf.BoolValue enable_early_data = 2; -} - -// Configuration for Upstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. -message QuicUpstreamTransport { - tls.v3.UpstreamTlsContext upstream_tls_context = 1 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto b/src/main/proto/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto deleted file mode 100644 index 4d6436f..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.raw_buffer.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.raw_buffer.v3"; -option java_outer_classname = "RawBufferProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/raw_buffer/v3;raw_bufferv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Raw Buffer] -// [#extension: envoy.transport_sockets.raw_buffer] - -// Configuration for raw buffer transport socket. -message RawBuffer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.transport_socket.raw_buffer.v2.RawBuffer"; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/s2a/v3/s2a.proto b/src/main/proto/envoy/extensions/transport_sockets/s2a/v3/s2a.proto deleted file mode 100644 index 03326c4..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/s2a/v3/s2a.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.s2a.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.s2a.v3"; -option java_outer_classname = "S2aProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/s2a/v3;s2av3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#not-implemented-hide:] -// Configuration for S2A transport socket. This allows Envoy clients to -// configure how to offload mTLS handshakes to the S2A service. -// https://github.com/google/s2a-go#readme -message S2AConfiguration { - // The address of the S2A. This can be an IP address or a hostname, - // followed by a port number. - string s2a_address = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/starttls/v3/starttls.proto b/src/main/proto/envoy/extensions/transport_sockets/starttls/v3/starttls.proto deleted file mode 100644 index 3e6d4cf..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/starttls/v3/starttls.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.starttls.v3; - -import "envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto"; -import "envoy/extensions/transport_sockets/tls/v3/tls.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.starttls.v3"; -option java_outer_classname = "StarttlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/starttls/v3;starttlsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: StartTls] -// [#extension: envoy.transport_sockets.starttls] - -// StartTls transport socket addresses situations when a protocol starts in clear-text and -// negotiates an in-band switch to TLS. StartTls transport socket is protocol agnostic. In the -// case of downstream StartTls a network filter is required which understands protocol exchange -// and a state machine to signal to the StartTls transport socket when a switch to TLS is -// required. Similarly, upstream StartTls requires the owner of an upstream transport socket to -// manage the state machine necessary to properly coordinate negotiation with the upstream and -// signal to the transport socket when a switch to secure transport is required. - -// Configuration for a downstream StartTls transport socket. -// StartTls transport socket wraps two sockets: -// * raw_buffer socket which is used at the beginning of the session -// * TLS socket used when a protocol negotiates a switch to encrypted traffic. -message StartTlsConfig { - // (optional) Configuration for clear-text socket used at the beginning of the session. - raw_buffer.v3.RawBuffer cleartext_socket_config = 1; - - // Configuration for a downstream TLS socket. - transport_sockets.tls.v3.DownstreamTlsContext tls_socket_config = 2 - [(validate.rules).message = {required: true}]; -} - -// Configuration for an upstream StartTls transport socket. -// StartTls transport socket wraps two sockets: -// * raw_buffer socket which is used at the beginning of the session -// * TLS socket used when a protocol negotiates a switch to encrypted traffic. -message UpstreamStartTlsConfig { - // (optional) Configuration for clear-text socket used at the beginning of the session. - raw_buffer.v3.RawBuffer cleartext_socket_config = 1; - - // Configuration for an upstream TLS socket. - transport_sockets.tls.v3.UpstreamTlsContext tls_socket_config = 2 - [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tap/v3/tap.proto b/src/main/proto/envoy/extensions/transport_sockets/tap/v3/tap.proto deleted file mode 100644 index 972bd44..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tap/v3/tap.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tap.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/extensions/common/tap/v3/common.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tap.v3"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap] -// [#extension: envoy.transport_sockets.tap] - -// Configuration for tap transport socket. This wraps another transport socket, providing the -// ability to interpose and record in plain text any traffic that is surfaced to Envoy. -message Tap { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.transport_socket.tap.v2alpha.Tap"; - - // Common configuration for the tap transport socket. - common.tap.v3.CommonExtensionConfig common_config = 1 - [(validate.rules).message = {required: true}]; - - // The underlying transport socket being wrapped. - config.core.v3.TransportSocket transport_socket = 2 [(validate.rules).message = {required: true}]; - - // Additional configurations for the transport socket tap - SocketTapConfig socket_tap_config = 3; -} - -// Additional configurations for the transport socket tap -message SocketTapConfig { - // Indicates to whether output the connection information per event - // This is only applicable if the streamed trace is enabled - bool set_connection_per_event = 1; - - // The contents of the transport tap's statistics prefix. - string stats_prefix = 2; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto b/src/main/proto/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto deleted file mode 100644 index 7428dac..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tcp_stats.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tcp_stats.v3"; -option java_outer_classname = "TcpStatsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tcp_stats/v3;tcp_statsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: TCP Stats Transport Socket wrapper] -// [#extension: envoy.transport_sockets.tcp_stats] - -// Configuration for the TCP Stats transport socket wrapper, which wraps another transport socket for -// all communication, but emits stats about the underlying TCP connection. -// -// The stats are documented :ref:`here ` for listeners and -// :ref:`here ` for clusters. -// -// This transport socket is currently only supported on Linux. -message Config { - // The underlying transport socket being wrapped. - config.core.v3.TransportSocket transport_socket = 1 [(validate.rules).message = {required: true}]; - - // Period to update stats while the connection is open. If unset, updates only happen when the - // connection is closed. Stats are always updated one final time when the connection is closed. - google.protobuf.Duration update_period = 2 [(validate.rules).duration = {gte {nanos: 1000000}}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/cert_mappers/sni/v3/config.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/cert_mappers/sni/v3/config.proto deleted file mode 100644 index e39abd2..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/cert_mappers/sni/v3/config.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.cert_mappers.sni.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.cert_mappers.sni.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/cert_mappers/sni/v3;sniv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SNI certificate mapper] -// [#extension: envoy.tls.certificate_mappers.sni] - -// Uses the SNI value from the TLS client hello as the secret resource name. -message SNI { - // The value to use as the secret name when SNI is empty or absent. - string default_value = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/cert_mappers/static_name/v3/config.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/cert_mappers/static_name/v3/config.proto deleted file mode 100644 index 0fbd87f..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/cert_mappers/static_name/v3/config.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.cert_mappers.static_name.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.cert_mappers.static_name.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/cert_mappers/static_name/v3;static_namev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Static secret certificate mapper] -// [#extension: envoy.tls.certificate_mappers.static_name] - -// A mapping to a fixed secret name for all certificates. -message StaticName { - // The name for the secret to use for all connections. - string name = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/cert_selectors/on_demand_secret/v3/config.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/cert_selectors/on_demand_secret/v3/config.proto deleted file mode 100644 index 97d26e8..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/cert_selectors/on_demand_secret/v3/config.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.cert_selectors.on_demand_secret.v3; - -import "envoy/config/core/v3/config_source.proto"; -import "envoy/config/core/v3/extension.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.cert_selectors.on_demand_secret.v3"; -option java_outer_classname = "ConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/cert_selectors/on_demand_secret/v3;on_demand_secretv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: On-demand secret certificate selector] -// [#extension: envoy.tls.certificate_selectors.on_demand_secret] - -// Fetches the secret on-demand while allowing the parent cluster or listener to accept connections -// without warming. During the handshake, a secret name is derived from the peer hello message, an -// SDS resource request starts, and the handshake is paused. Once an SDS response is received with a -// resource, the handshake is resumed with the provided certificate. If the SDS server indicates the -// resource removal, the handshake is failed, and the SDS subscription to the resource is stopped. -// -// Similar to the regular SDS, the certificate is configured using the outer common TLS context, -// e.g. by setting the FIPS compliance policy on the loaded certificate. -message Config { - // Defines the configuration source of the secrets. - config.core.v3.ConfigSource config_source = 1 [(validate.rules).message = {required: true}]; - - // Extension point to specify a function to compute the secret name. The extension is called - // during the TLS handshake after receiving the "CLIENT HELLO" message from the client. - // [#extension-category: envoy.tls.certificate_mappers] - config.core.v3.TypedExtensionConfig certificate_mapper = 2 - [(validate.rules).message = {required: true}]; - - // A list of secret resource names to start fetching on configuration load (prior to receiving any - // requests). The parent resource initializes immediately without waiting for the fetch to - // complete. - repeated string prefetch_secret_names = 3; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto deleted file mode 100644 index 8a5f896..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/cert.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v3; - -import public "envoy/extensions/transport_sockets/tls/v3/common.proto"; -import public "envoy/extensions/transport_sockets/tls/v3/secret.proto"; -import public "envoy/extensions/transport_sockets/tls/v3/tls.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; -option java_outer_classname = "CertProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/common.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/v3/common.proto deleted file mode 100644 index 9bc5fb5..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/common.proto +++ /dev/null @@ -1,597 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common TLS configuration] - -// [#next-free-field: 7] -message TlsParameters { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.TlsParameters"; - - enum TlsProtocol { - // Envoy will choose the optimal TLS version. - TLS_AUTO = 0; - - // TLS 1.0 - TLSv1_0 = 1; - - // TLS 1.1 - TLSv1_1 = 2; - - // TLS 1.2 - TLSv1_2 = 3; - - // TLS 1.3 - TLSv1_3 = 4; - } - - enum CompliancePolicy { - // FIPS_202205 configures a TLS connection to use: - // - // * TLS 1.2 or 1.3 - // * For TLS 1.2, only ECDHE_[RSA|ECDSA]_WITH_AES_*_GCM_SHA*. - // * For TLS 1.3, only AES-GCM - // * P-256 or P-384 for key agreement. - // * For server signatures, only ``PKCS#1/PSS`` with ``SHA256/384/512``, or ECDSA - // with P-256 or P-384. - // - // .. attention:: - // - // Please refer to `BoringSSL policies `_ - // for details. - FIPS_202205 = 0; - } - - // Minimum TLS protocol version. By default, it's ``TLSv1_2`` for both clients and servers. - // - // TLS protocol versions below TLSv1_2 require setting compatible ciphers with the - // ``cipher_suites`` setting as the default ciphers no longer include compatible ciphers. - // - // .. attention:: - // - // Using TLS protocol versions below TLSv1_2 has serious security considerations and risks. - TlsProtocol tls_minimum_protocol_version = 1 [(validate.rules).enum = {defined_only: true}]; - - // Maximum TLS protocol version. By default, it's ``TLSv1_2`` for clients and ``TLSv1_3`` for - // servers. - TlsProtocol tls_maximum_protocol_version = 2 [(validate.rules).enum = {defined_only: true}]; - - // If specified, the TLS listener will only support the specified `cipher list - // `_ - // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3). - // - // If not specified, a default list will be used. Defaults are different for server (downstream) and - // client (upstream) TLS configurations. - // Defaults will change over time in response to security considerations; If you care, configure - // it instead of using the default. - // - // In non-FIPS builds, the default server cipher list is: - // - // .. code-block:: none - // - // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] - // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // - // In builds using :ref:`BoringSSL FIPS `, the default server cipher list is: - // - // .. code-block:: none - // - // ECDHE-ECDSA-AES128-GCM-SHA256 - // ECDHE-RSA-AES128-GCM-SHA256 - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // - // In non-FIPS builds, the default client cipher list is: - // - // .. code-block:: none - // - // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305] - // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305] - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - // - // In builds using :ref:`BoringSSL FIPS `, the default client cipher list is: - // - // .. code-block:: none - // - // ECDHE-ECDSA-AES128-GCM-SHA256 - // ECDHE-RSA-AES128-GCM-SHA256 - // ECDHE-ECDSA-AES256-GCM-SHA384 - // ECDHE-RSA-AES256-GCM-SHA384 - repeated string cipher_suites = 3; - - // If specified, the TLS connection will only support the specified ECDH - // curves. If not specified, the default curves will be used. - // - // In non-FIPS builds, the default curves are: - // - // .. code-block:: none - // - // X25519 - // P-256 - // - // In builds using :ref:`BoringSSL FIPS `, the default curve is: - // - // .. code-block:: none - // - // P-256 - repeated string ecdh_curves = 4; - - // If specified, the TLS connection will only support the specified signature algorithms. - // The list is ordered by preference. - // If not specified, the default signature algorithms defined by BoringSSL will be used. - // - // Default signature algorithms selected by BoringSSL (may be out of date): - // - // .. code-block:: none - // - // ecdsa_secp256r1_sha256 - // rsa_pss_rsae_sha256 - // rsa_pkcs1_sha256 - // ecdsa_secp384r1_sha384 - // rsa_pss_rsae_sha384 - // rsa_pkcs1_sha384 - // rsa_pss_rsae_sha512 - // rsa_pkcs1_sha512 - // rsa_pkcs1_sha1 - // - // Signature algorithms supported by BoringSSL (may be out of date): - // - // .. code-block:: none - // - // rsa_pkcs1_sha256 - // rsa_pkcs1_sha384 - // rsa_pkcs1_sha512 - // ecdsa_secp256r1_sha256 - // ecdsa_secp384r1_sha384 - // ecdsa_secp521r1_sha512 - // rsa_pss_rsae_sha256 - // rsa_pss_rsae_sha384 - // rsa_pss_rsae_sha512 - // ed25519 - // rsa_pkcs1_sha1 - // ecdsa_sha1 - repeated string signature_algorithms = 5; - - // Compliance policies configure various aspects of the TLS based on the given policy. - // The policies are applied last during configuration and may override the other TLS - // parameters, or any previous policy. - repeated CompliancePolicy compliance_policies = 6 [(validate.rules).repeated = {max_items: 1}]; -} - -// BoringSSL private key method configuration. The private key methods are used for external -// (potentially asynchronous) signing and decryption operations. Some use cases for private key -// methods would be TPM support and TLS acceleration. -message PrivateKeyProvider { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.auth.PrivateKeyProvider"; - - reserved 2; - - reserved "config"; - - // Private key method provider name. The name must match a - // supported private key method provider type. - string provider_name = 1 [(validate.rules).string = {min_len: 1}]; - - // Private key method provider specific configuration. - oneof config_type { - google.protobuf.Any typed_config = 3 [(udpa.annotations.sensitive) = true]; - } - - // If the private key provider isn't available (eg. the required hardware capability doesn't existed), - // Envoy will fallback to the BoringSSL default implementation when the ``fallback`` is true. - // The default value is ``false``. - bool fallback = 4; -} - -// [#next-free-field: 9] -message TlsCertificate { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.TlsCertificate"; - - // The TLS certificate chain. - // - // If ``certificate_chain`` is a filesystem path, a watch will be added to the - // parent directory for any file moves to support rotation. This currently - // only applies to dynamic secrets, when the ``TlsCertificate`` is delivered via - // SDS. - config.core.v3.DataSource certificate_chain = 1; - - // The TLS private key. - // - // If ``private_key`` is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the ``TlsCertificate`` is delivered via SDS. - config.core.v3.DataSource private_key = 2 [(udpa.annotations.sensitive) = true]; - - // ``Pkcs12`` data containing TLS certificate, chain, and private key. - // - // If ``pkcs12`` is a filesystem path, the file will be read, but no watch will - // be added to the parent directory, since ``pkcs12`` isn't used by SDS. - // This field is mutually exclusive with ``certificate_chain``, ``private_key`` and ``private_key_provider``. - // This can't be marked as ``oneof`` due to API compatibility reasons. Setting - // both :ref:`private_key `, - // :ref:`certificate_chain `, - // or :ref:`private_key_provider ` - // and :ref:`pkcs12 ` - // fields will result in an error. Use :ref:`password - // ` - // to specify the password to unprotect the ``PKCS12`` data, if necessary. - config.core.v3.DataSource pkcs12 = 8 [(udpa.annotations.sensitive) = true]; - - // If specified, updates of file-based ``certificate_chain`` and ``private_key`` - // sources will be triggered by this watch. The certificate/key pair will be - // read together and validated for atomic read consistency (i.e. no - // intervening modification occurred between cert/key read, verified by file - // hash comparisons). This allows explicit control over the path watched, by - // default the parent directories of the filesystem paths in - // ``certificate_chain`` and ``private_key`` are watched if this field is not - // specified. This only applies when a ``TlsCertificate`` is delivered by SDS - // with references to filesystem paths. See the :ref:`SDS key rotation - // ` documentation for further details. - config.core.v3.WatchedDirectory watched_directory = 7; - - // BoringSSL private key method provider. This is an alternative to :ref:`private_key - // ` field. - // When both :ref:`private_key ` and - // :ref:`private_key_provider ` fields are set, - // ``private_key_provider`` takes precedence. - // If ``private_key_provider`` is unavailable and :ref:`fallback - // ` - // is enabled, ``private_key`` will be used. - PrivateKeyProvider private_key_provider = 6; - - // The password to decrypt the TLS private key. If this field is not set, it is assumed that the - // TLS private key is not password encrypted. - config.core.v3.DataSource password = 3 [(udpa.annotations.sensitive) = true]; - - // The OCSP response to be stapled with this certificate during the handshake. - // The response must be DER-encoded and may only be provided via ``filename`` or - // ``inline_bytes``. The response may pertain to only one certificate. - config.core.v3.DataSource ocsp_staple = 4; - - // [#not-implemented-hide:] - repeated config.core.v3.DataSource signed_certificate_timestamp = 5; -} - -message TlsSessionTicketKeys { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.auth.TlsSessionTicketKeys"; - - // Keys for encrypting and decrypting TLS session tickets. The - // first key in the array contains the key to encrypt all new sessions created by this context. - // All keys are candidates for decrypting received tickets. This allows for easy rotation of keys - // by, for example, putting the new key first, and the previous key second. - // - // If :ref:`session_ticket_keys ` - // is not specified, the TLS library will still support resuming sessions via tickets, but it will - // use an internally-generated and managed key, so sessions cannot be resumed across hot restarts - // or on different hosts. - // - // Each key must contain exactly 80 bytes of cryptographically-secure random data. For - // example, the output of ``openssl rand 80``. - // - // .. attention:: - // - // Using this feature has serious security considerations and risks. Improper handling of keys - // may result in loss of secrecy in connections, even if ciphers supporting perfect forward - // secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some - // discussion. To minimize the risk, you must: - // - // * Keep the session ticket keys at least as secure as your TLS certificate private keys - // * Rotate session ticket keys at least daily, and preferably hourly - // * Always generate keys using a cryptographically-secure random data source - repeated config.core.v3.DataSource keys = 1 - [(validate.rules).repeated = {min_items: 1}, (udpa.annotations.sensitive) = true]; -} - -// Indicates a certificate to be obtained from a named CertificateProvider plugin instance. -// The plugin instances are defined in the client's bootstrap file. -// The plugin allows certificates to be fetched/refreshed over the network asynchronously with -// respect to the TLS handshake. -// [#not-implemented-hide:] -message CertificateProviderPluginInstance { - // Provider instance name. - // - // Instance names should generally be defined not in terms of the underlying provider - // implementation (e.g., "file_watcher") but rather in terms of the function of the - // certificates (e.g., "foo_deployment_identity"). - string instance_name = 1 [(validate.rules).string = {min_len: 1}]; - - // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "example.com" to specify a certificate for a - // particular domain. Not all provider instances will actually use this field, so the value - // defaults to the empty string. - string certificate_name = 2; -} - -// Matcher for subject alternative names, to match both type and value of the SAN. -message SubjectAltNameMatcher { - // Indicates the choice of GeneralName as defined in section 4.2.1.5 of RFC 5280 to match - // against. - enum SanType { - SAN_TYPE_UNSPECIFIED = 0; - EMAIL = 1; - DNS = 2; - URI = 3; - IP_ADDRESS = 4; - OTHER_NAME = 5; - } - - // Specification of type of SAN. Note that the default enum value is an invalid choice. - SanType san_type = 1 [(validate.rules).enum = {defined_only: true not_in: 0}]; - - // Matcher for SAN value. - // - // If the :ref:`san_type ` - // is :ref:`DNS ` - // and the matcher type is :ref:`exact `, DNS wildcards are evaluated - // according to the rules in https://www.rfc-editor.org/rfc/rfc6125#section-6.4.3. - // For example, ``*.example.com`` would match ``test.example.com`` but not ``example.com`` and not - // ``a.b.example.com``. - // - // The string matching for OTHER_NAME SAN values depends on their ASN.1 type: - // - // * OBJECT: Validated against its dotted numeric notation (e.g., "1.2.3.4") - // * BOOLEAN: Validated against strings "true" or "false" - // * INTEGER/ENUMERATED: Validated against a string containing the integer value - // * NULL: Validated against an empty string - // * Other types: Validated directly against the string value - type.matcher.v3.StringMatcher matcher = 2 [(validate.rules).message = {required: true}]; - - // OID Value which is required if OTHER_NAME SAN type is used. - // For example, UPN OID is 1.3.6.1.4.1.311.20.2.3 - // (Reference: http://oid-info.com/get/1.3.6.1.4.1.311.20.2.3). - // - // If set for SAN types other than OTHER_NAME, it will be ignored. - string oid = 3; -} - -// [#next-free-field: 18] -message CertificateValidationContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.auth.CertificateValidationContext"; - - // Peer certificate verification mode. - enum TrustChainVerification { - // Perform default certificate verification (e.g., against CA / verification lists) - VERIFY_TRUST_CHAIN = 0; - - // Connections where the certificate fails verification will be permitted. - // For HTTP connections, the result of certificate verification can be used in route matching. ( - // see :ref:`validated ` ). - ACCEPT_UNTRUSTED = 1; - } - - message SystemRootCerts { - } - - reserved 4, 5; - - reserved "verify_subject_alt_name"; - - // TLS certificate data containing certificate authority certificates to use in verifying - // a presented peer certificate (e.g. server certificate for clusters or client certificate - // for listeners). If not specified and a peer certificate is presented it will not be - // verified. By default, a client certificate is optional, unless one of the additional - // options (:ref:`require_client_certificate - // `, - // :ref:`verify_certificate_spki - // `, - // :ref:`verify_certificate_hash - // `, or - // :ref:`match_typed_subject_alt_names - // `) is also - // specified. - // - // It can optionally contain certificate revocation lists, in which case Envoy will verify - // that the presented peer certificate has not been revoked by one of the included CRLs. Note - // that if a CRL is provided for any certificate authority in a trust chain, a CRL must be - // provided for all certificate authorities in that chain. Failure to do so will result in - // verification failure for both revoked and unrevoked certificates from that chain. - // The behavior of requiring all certificates to contain CRLs can be altered by - // setting :ref:`only_verify_leaf_cert_crl ` - // true. If set to true, only the final certificate in the chain undergoes CRL verification. - // - // See :ref:`the TLS overview ` for a list of common - // system CA locations. - // - // If ``trusted_ca`` is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the ``CertificateValidationContext`` is - // delivered via SDS. - // - // X509_V_FLAG_PARTIAL_CHAIN is set by default, so non-root/intermediate ca certificate in ``trusted_ca`` - // can be treated as trust anchor as well. It allows verification with building valid partial chain instead - // of a full chain. - // - // If ``ca_certificate_provider_instance`` is set, it takes precedence over ``trusted_ca``. - config.core.v3.DataSource trusted_ca = 1 - [(udpa.annotations.field_migrate).oneof_promotion = "ca_cert_source"]; - - // Certificate provider instance for fetching TLS certificates. - // - // If set, takes precedence over ``trusted_ca``. - // [#not-implemented-hide:] - CertificateProviderPluginInstance ca_certificate_provider_instance = 13 - [(udpa.annotations.field_migrate).oneof_promotion = "ca_cert_source"]; - - // Use system root certs for validation. - // If present, system root certs are used only if neither of the ``trusted_ca`` - // or ``ca_certificate_provider_instance`` fields are set. - // [#not-implemented-hide:] - SystemRootCerts system_root_certs = 17; - - // If specified, updates of a file-based ``trusted_ca`` source will be triggered - // by this watch. This allows explicit control over the path watched, by - // default the parent directory of the filesystem path in ``trusted_ca`` is - // watched if this field is not specified. This only applies when a - // ``CertificateValidationContext`` is delivered by SDS with references to - // filesystem paths. See the :ref:`SDS key rotation ` - // documentation for further details. - config.core.v3.WatchedDirectory watched_directory = 11; - - // An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the - // SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate - // matches one of the specified values. - // - // A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -pubkey - // | openssl pkey -pubin -outform DER - // | openssl dgst -sha256 -binary - // | openssl enc -base64 - // NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A= - // - // This is the format used in HTTP Public Key Pinning. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - // - // .. attention:: - // - // This option is preferred over :ref:`verify_certificate_hash - // `, - // because SPKI is tied to a private key, so it doesn't change when the certificate - // is renewed using the same private key. - repeated string verify_certificate_spki = 3 - [(validate.rules).repeated = {items {string {min_len: 44 max_bytes: 44}}}]; - - // An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that - // the SHA-256 of the DER-encoded presented certificate matches one of the specified values. - // - // A hex-encoded SHA-256 of the certificate can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2 - // df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a - // - // A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate - // can be generated with the following command: - // - // .. code-block:: bash - // - // $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2 - // DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A - // - // Both of those formats are acceptable. - // - // When both: - // :ref:`verify_certificate_hash - // ` and - // :ref:`verify_certificate_spki - // ` are specified, - // a hash matching value from either of the lists will result in the certificate being accepted. - repeated string verify_certificate_hash = 2 - [(validate.rules).repeated = {items {string {min_len: 64 max_bytes: 95}}}]; - - // An optional list of Subject Alternative name matchers. If specified, Envoy will verify that the - // Subject Alternative Name of the presented certificate matches one of the specified matchers. - // The matching uses "any" semantics, that is to say, the SAN is verified if at least one matcher is - // matched. - // - // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be - // configured with exact match type in the :ref:`string matcher `. - // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com", - // it should be configured as shown below. - // - // .. code-block:: yaml - // - // match_typed_subject_alt_names: - // - san_type: DNS - // matcher: - // exact: "api.example.com" - // - // .. attention:: - // - // Subject Alternative Names are easily spoofable and verifying only them is insecure, - // therefore this option must be used together with :ref:`trusted_ca - // `. - repeated SubjectAltNameMatcher match_typed_subject_alt_names = 15; - - // This field is deprecated in favor of - // :ref:`match_typed_subject_alt_names - // `. - // Note that if both this field and :ref:`match_typed_subject_alt_names - // ` - // are specified, the former (deprecated field) is ignored. - repeated type.matcher.v3.StringMatcher match_subject_alt_names = 9 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // [#not-implemented-hide:] Must present signed certificate time-stamp. - google.protobuf.BoolValue require_signed_certificate_timestamp = 6; - - // An optional `certificate revocation list - // `_ - // (in PEM format). If specified, Envoy will verify that the presented peer - // certificate has not been revoked by this CRL. If this DataSource contains - // multiple CRLs, all of them will be used. Note that if a CRL is provided - // for any certificate authority in a trust chain, a CRL must be provided - // for all certificate authorities in that chain. Failure to do so will - // result in verification failure for both revoked and unrevoked certificates - // from that chain. This default behavior can be altered by setting - // :ref:`only_verify_leaf_cert_crl ` to - // true. - // - // If ``crl`` is a filesystem path, a watch will be added to the parent - // directory for any file moves to support rotation. This currently only - // applies to dynamic secrets, when the ``CertificateValidationContext`` is - // delivered via SDS. - config.core.v3.DataSource crl = 7; - - // If specified, Envoy will not reject expired certificates. - bool allow_expired_certificate = 8; - - // Certificate trust chain verification mode. - TrustChainVerification trust_chain_verification = 10 - [(validate.rules).enum = {defined_only: true}]; - - // The configuration of an extension specific certificate validator. - // If specified, all validation is done by the specified validator, - // and the behavior of all other validation settings is defined by the specified validator (and may be entirely ignored, unused, and unvalidated). - // Refer to the documentation for the specified validator. If you do not want a custom validation algorithm, do not set this field. - // [#extension-category: envoy.tls.cert_validator] - config.core.v3.TypedExtensionConfig custom_validator_config = 12; - - // If this option is set to true, only the certificate at the end of the - // certificate chain will be subject to validation by :ref:`CRL `. - bool only_verify_leaf_cert_crl = 14; - - // Defines maximum depth of a certificate chain accepted in verification, the default limit is 100, though this can be system-dependent. - // This number does not include the leaf but includes the trust anchor, so a depth of 1 allows the leaf and one CA certificate. If a trusted issuer - // appears in the chain, but in a depth larger than configured, the certificate validation will fail. - // This matches the semantics of ``SSL_CTX_set_verify_depth`` in OpenSSL 1.0.x and older versions of BoringSSL. It differs from ``SSL_CTX_set_verify_depth`` - // in OpenSSL 1.1.x and newer versions of BoringSSL in that the trust anchor is included. - // Trusted issues are specified by setting :ref:`trusted_ca ` - google.protobuf.UInt32Value max_verify_depth = 16 [(validate.rules).uint32 = {lte: 100}]; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/secret.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/v3/secret.proto deleted file mode 100644 index 94660e2..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/secret.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/config_source.proto"; -import "envoy/extensions/transport_sockets/tls/v3/common.proto"; - -import "udpa/annotations/sensitive.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; -option java_outer_classname = "SecretProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Secrets configuration] - -message GenericSecret { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.GenericSecret"; - - // Secret of generic type and is available to filters. It is expected - // that only only one of secret and secrets is set. - config.core.v3.DataSource secret = 1 [(udpa.annotations.sensitive) = true]; - - // For cases where multiple associated secrets need to be distributed together. It is expected - // that only only one of secret and secrets is set. - map secrets = 2 [(udpa.annotations.sensitive) = true]; -} - -message SdsSecretConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.SdsSecretConfig"; - - // Name by which the secret can be uniquely referred to. When both name and config are specified, - // then secret can be fetched and/or reloaded via SDS. When only name is specified, then secret - // will be loaded from static resources. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - config.core.v3.ConfigSource sds_config = 2; -} - -// [#next-free-field: 6] -message Secret { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.Secret"; - - // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to. - string name = 1; - - oneof type { - TlsCertificate tls_certificate = 2; - - TlsSessionTicketKeys session_ticket_keys = 3; - - CertificateValidationContext validation_context = 4; - - GenericSecret generic_secret = 5; - } -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/tls.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/v3/tls.proto deleted file mode 100644 index d656c66..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/tls.proto +++ /dev/null @@ -1,366 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/extensions/transport_sockets/tls/v3/common.proto"; -import "envoy/extensions/transport_sockets/tls/v3/secret.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; -option java_outer_classname = "TlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: TLS transport socket] -// [#extension: envoy.transport_sockets.tls] -// The TLS contexts below provide the transport socket configuration for upstream/downstream TLS. - -// [#next-free-field: 8] -message UpstreamTlsContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.auth.UpstreamTlsContext"; - - // Common TLS context settings. - // - // .. attention:: - // - // Server certificate verification is not enabled by default. To enable verification, configure - // :ref:`trusted_ca`. - CommonTlsContext common_tls_context = 1; - - // SNI string to use when creating TLS backend connections. - string sni = 2 [(validate.rules).string = {max_bytes: 255}]; - - // If true, replaces the SNI for the connection with the hostname of the upstream host, if - // the hostname is known due to either a DNS cluster type or the - // :ref:`hostname ` is set on - // the host. - // - // See :ref:`SNI configuration ` for details on how this - // interacts with other validation options. - bool auto_host_sni = 6; - - // If true, replaces any Subject Alternative Name (SAN) validations with a validation for a DNS SAN matching - // the SNI value sent. The validation uses the actual requested SNI, regardless of how the SNI is configured. - // - // For common cases where an SNI value is present and the server certificate should include a corresponding SAN, - // this option ensures the SAN is properly validated. - // - // See the :ref:`validation configuration ` for how this interacts with - // other validation options. - bool auto_sni_san_validation = 7; - - // If true, server-initiated TLS renegotiation will be allowed. - // - // .. attention:: - // - // TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary. - bool allow_renegotiation = 3; - - // Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets - // for TLSv1.2 and older) to be stored for session resumption. - // - // Defaults to 1, setting this to 0 disables session resumption. - google.protobuf.UInt32Value max_session_keys = 4; - - // Controls enforcement of the ``keyUsage`` extension in peer certificates. If set to ``true``, the handshake will fail if - // the ``keyUsage`` is incompatible with TLS usage. - // - // .. note:: - // The default value is ``false`` (i.e., enforcement off). It is expected to change to ``true`` in a future release. - // - // The ``ssl.was_key_usage_invalid`` in :ref:`listener metrics ` metric will be incremented - // for configurations that would fail if this option were enabled. - google.protobuf.BoolValue enforce_rsa_key_usage = 5; -} - -// [#next-free-field: 12] -message DownstreamTlsContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.auth.DownstreamTlsContext"; - - enum OcspStaplePolicy { - // OCSP responses are optional. If absent or expired, the certificate is used without stapling. - LENIENT_STAPLING = 0; - - // OCSP responses are optional. If absent, the certificate is used without stapling. If present but expired, - // the certificate is not used for subsequent connections. Connections are rejected if no suitable certificate - // is found. - STRICT_STAPLING = 1; - - // OCSP responses are required. Connections fail if a certificate lacks a valid OCSP response. Expired responses - // prevent certificate use in new connections, and connections are rejected if no suitable certificate is available. - MUST_STAPLE = 2; - } - - // Common TLS context settings. - CommonTlsContext common_tls_context = 1; - - // If specified, Envoy will reject connections without a valid client - // certificate. - google.protobuf.BoolValue require_client_certificate = 2; - - // If specified, Envoy will reject connections without a valid and matching SNI. - // [#not-implemented-hide:] - google.protobuf.BoolValue require_sni = 3; - - oneof session_ticket_keys_type { - // TLS session ticket key settings. - TlsSessionTicketKeys session_ticket_keys = 4; - - // Config for fetching TLS session ticket keys via SDS API. - SdsSecretConfig session_ticket_keys_sds_secret_config = 5; - - // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS - // server to not issue TLS session tickets for the purposes of stateless TLS session resumption. - // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using - // the keys specified through either :ref:`session_ticket_keys ` - // or :ref:`session_ticket_keys_sds_secret_config `. - // If this config is set to false and no keys are explicitly configured, the TLS server will issue - // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the - // implication that sessions cannot be resumed across hot restarts or on different hosts. - bool disable_stateless_session_resumption = 7; - } - - // If ``true``, the TLS server will not maintain a session cache of TLS sessions. - // - // .. note:: - // This applies only to TLSv1.2 and earlier. - // - bool disable_stateful_session_resumption = 10; - - // Maximum lifetime of TLS sessions. If specified, ``session_timeout`` will change the maximum lifetime - // of the TLS session. - // - // This serves as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_. - // Only whole seconds are considered; fractional seconds are ignored. - google.protobuf.Duration session_timeout = 6 [(validate.rules).duration = { - lt {seconds: 4294967296} - gte {} - }]; - - // Configuration for handling certificates without an OCSP response or with expired responses. - // - // Defaults to ``LENIENT_STAPLING`` - OcspStaplePolicy ocsp_staple_policy = 8 [(validate.rules).enum = {defined_only: true}]; - - // Multiple certificates are allowed in Downstream transport socket to serve different SNI. - // This option controls the behavior when no matching certificate is found for the received SNI value, - // or no SNI value was sent. If enabled, all certificates will be evaluated for a match for non-SNI criteria - // such as key type and OCSP settings. If disabled, the first provided certificate will be used. - // Defaults to ``false``. See more details in :ref:`Multiple TLS certificates `. - google.protobuf.BoolValue full_scan_certs_on_sni_mismatch = 9; - - // If ``true``, the downstream client's preferred cipher is used during the handshake. If ``false``, Envoy - // uses its preferred cipher. - // - // .. note:: - // This has no effect when using TLSv1_3. - // - bool prefer_client_ciphers = 11; -} - -// TLS key log configuration. -// The key log file format is "format used by NSS for its SSLKEYLOGFILE debugging output" (text taken from openssl man page) -message TlsKeyLog { - // Path to save the TLS key log. - string path = 1 [(validate.rules).string = {min_len: 1}]; - - // Local IP address ranges to filter connections for TLS key logging. If not set, matches any local IP address. - repeated config.core.v3.CidrRange local_address_range = 2; - - // Remote IP address ranges to filter connections for TLS key logging. If not set, matches any remote IP address. - repeated config.core.v3.CidrRange remote_address_range = 3; -} - -// TLS context shared by both client and server TLS contexts. -// [#next-free-field: 17] -message CommonTlsContext { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.auth.CommonTlsContext"; - - // Config for the Certificate Provider to fetch certificates. Certificates are fetched/refreshed asynchronously over - // the network relative to the TLS handshake. - // - // DEPRECATED: This message is not currently used, but if we ever do need it, we will want to - // move it out of CommonTlsContext and into common.proto, similar to the existing - // CertificateProviderPluginInstance message. - // - // [#not-implemented-hide:] - message CertificateProvider { - // opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "TLS" to specify a new tls-certificate. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Provider specific config. - // Note: an implementation is expected to dedup multiple instances of the same config - // to maintain a single certificate-provider instance. The sharing can happen, for - // example, among multiple clusters or between the tls_certificate and validation_context - // certificate providers of a cluster. - // This config could be supplied inline or (in future) a named xDS resource. - oneof config { - option (validate.required) = true; - - config.core.v3.TypedExtensionConfig typed_config = 2; - } - } - - // Similar to CertificateProvider above, but allows the provider instances to be configured on - // the client side instead of being sent from the control plane. - // - // DEPRECATED: This message was moved outside of CommonTlsContext - // and now lives in common.proto. - // - // [#not-implemented-hide:] - message CertificateProviderInstance { - // Provider instance name. This name must be defined in the client's configuration (e.g., a - // bootstrap file) to correspond to a provider instance (i.e., the same data in the typed_config - // field that would be sent in the CertificateProvider message if the config was sent by the - // control plane). If not present, defaults to "default". - // - // Instance names should generally be defined not in terms of the underlying provider - // implementation (e.g., "file_watcher") but rather in terms of the function of the - // certificates (e.g., "foo_deployment_identity"). - string instance_name = 1; - - // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify - // a root-certificate (validation context) or "example.com" to specify a certificate for a - // particular domain. Not all provider instances will actually use this field, so the value - // defaults to the empty string. - string certificate_name = 2; - } - - message CombinedCertificateValidationContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext"; - - // How to validate peer certificates. - CertificateValidationContext default_validation_context = 1 - [(validate.rules).message = {required: true}]; - - // Config for fetching validation context via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - SdsSecretConfig validation_context_sds_secret_config = 2 - [(validate.rules).message = {required: true}]; - - // Certificate provider for fetching CA certs. This will populate the - // ``default_validation_context.trusted_ca`` field. - // [#not-implemented-hide:] - CertificateProvider validation_context_certificate_provider = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Certificate provider instance for fetching CA certs. This will populate the - // ``default_validation_context.trusted_ca`` field. - // [#not-implemented-hide:] - CertificateProviderInstance validation_context_certificate_provider_instance = 4 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - } - - reserved 5; - - // TLS protocol versions, cipher suites etc. - TlsParameters tls_params = 1; - - // Only a single TLS certificate is supported in client contexts. In server contexts, - // :ref:`Multiple TLS certificates ` can be associated with the - // same context to allow both RSA and ECDSA certificates and support SNI-based selection. - // - // If ``tls_certificate_provider_instance`` is set, this field is ignored. - // If this field is set, ``tls_certificate_sds_secret_configs`` is ignored. - repeated TlsCertificate tls_certificates = 2; - - // Configs for fetching TLS certificates via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - // - // The same number and types of certificates as :ref:`tls_certificates ` - // are valid in the certificates fetched through this setting. - // - // If ``tls_certificates`` or ``tls_certificate_provider_instance`` are set, this field - // is ignored. - repeated SdsSecretConfig tls_certificate_sds_secret_configs = 6; - - // Certificate provider instance for fetching TLS certs. - // - // If this field is set, ``tls_certificates`` and ``tls_certificate_provider_instance`` - // are ignored. - // [#not-implemented-hide:] - CertificateProviderPluginInstance tls_certificate_provider_instance = 14; - - // Custom TLS certificate selector. - // - // Select TLS certificate based on TLS client hello. - // If empty, defaults to native TLS certificate selection behavior: - // DNS SANs or Subject Common Name in TLS certificates is extracted as server name pattern to match SNI. - // [#extension-category: envoy.tls.certificate_selectors] - config.core.v3.TypedExtensionConfig custom_tls_certificate_selector = 16; - - // Certificate provider for fetching TLS certificates. - // [#not-implemented-hide:] - CertificateProvider tls_certificate_certificate_provider = 9 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Certificate provider instance for fetching TLS certificates. - // [#not-implemented-hide:] - CertificateProviderInstance tls_certificate_certificate_provider_instance = 11 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - oneof validation_context_type { - // How to validate peer certificates. - CertificateValidationContext validation_context = 3; - - // Config for fetching validation context via SDS API. Note SDS API allows certificates to be - // fetched/refreshed over the network asynchronously with respect to the TLS handshake. - SdsSecretConfig validation_context_sds_secret_config = 7; - - // Combines the default ``CertificateValidationContext`` with the SDS-provided dynamic context for certificate - // validation. - // - // When the SDS server returns a dynamic ``CertificateValidationContext``, it is merged - // with the default context using ``Message::MergeFrom()``. The merging rules are as follows: - // - // * **Singular Fields:** Dynamic fields override the default singular fields. - // * **Repeated Fields:** Dynamic repeated fields are concatenated with the default repeated fields. - // * **Boolean Fields:** Boolean fields are combined using a logical OR operation. - // - // The resulting ``CertificateValidationContext`` is used to perform certificate validation. - CombinedCertificateValidationContext combined_validation_context = 8; - - // Certificate provider for fetching validation context. - // [#not-implemented-hide:] - CertificateProvider validation_context_certificate_provider = 10 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Certificate provider instance for fetching validation context. - // [#not-implemented-hide:] - CertificateProviderInstance validation_context_certificate_provider_instance = 12 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - } - - // Supplies the list of ALPN protocols that the listener should expose. In - // practice this is likely to be set to one of two values (see the - // :ref:`codec_type - // ` - // parameter in the HTTP connection manager for more information): - // - // * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1. - // * "http/1.1" If the listener is only going to support HTTP/1.1. - // - // There is no default for this parameter. If empty, Envoy will not expose ALPN. - repeated string alpn_protocols = 4; - - // Custom TLS handshaker. If empty, defaults to native TLS handshaking - // behavior. - config.core.v3.TypedExtensionConfig custom_handshaker = 13; - - // TLS key log configuration - TlsKeyLog key_log = 15; -} diff --git a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto b/src/main/proto/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto deleted file mode 100644 index 73592f8..0000000 --- a/src/main/proto/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.transport_sockets.tls.v3; - -import "envoy/config/core/v3/base.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tls.v3"; -option java_outer_classname = "TlsSpiffeValidatorConfigProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3;tlsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SPIFFE Certificate Validator] -// [#extension: envoy.tls.cert_validator.spiffe] - -// Configuration specific to the `SPIFFE `_ certificate validator. -// -// Example: -// -// .. validated-code-block:: yaml -// :type-name: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext -// -// custom_validator_config: -// name: envoy.tls.cert_validator.spiffe -// typed_config: -// "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig -// trust_domains: -// - name: foo.com -// trust_bundle: -// filename: "foo.pem" -// - name: envoy.com -// trust_bundle: -// filename: "envoy.pem" -// -// In this example, a presented peer certificate whose SAN matches ``spiffe://foo.com/**`` is validated against -// the "foo.pem" x.509 certificate. All the trust bundles are isolated from each other, so no trust domain can mint -// a SVID belonging to another trust domain. That means, in this example, a SVID signed by ``envoy.com``'s CA with ``spiffe://foo.com/**`` -// SAN would be rejected since Envoy selects the trust bundle according to the presented SAN before validate the certificate. -// -// Note that SPIFFE validator inherits and uses the following options from :ref:`CertificateValidationContext `. -// -// - :ref:`allow_expired_certificate ` to allow expired certificates. -// - :ref:`match_typed_subject_alt_names ` to match **URI** SAN of certificates. Unlike the default validator, SPIFFE validator only matches **URI** SAN (which equals to SVID in SPIFFE terminology) and ignore other SAN types. -// -message SPIFFECertValidatorConfig { - message TrustDomain { - // Name of the trust domain, ``example.com``, ``foo.bar.gov`` for example. - // Note that this must *not* have "spiffe://" prefix. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Specify a data source holding x.509 trust bundle used for validating incoming SVID(s) in this trust domain. - config.core.v3.DataSource trust_bundle = 2; - } - - // This field specifies trust domains used for validating incoming X.509-SVID(s). - repeated TrustDomain trust_domains = 1 [(validate.rules).repeated = {min_items: 1}]; - - // This field specifies all trust bundles as a single DataSource. If both - // trust_bundles and trust_domains are specified, trust_bundles will - // take precedence. Currently assumes file will be a SPIFFE Trust Bundle Map. - // If DataSource is a file, dynamic file watching will be enabled, - // and updates to the specified file will trigger a refresh of the trust_bundles. - config.core.v3.DataSource trust_bundles = 2; -} diff --git a/src/main/proto/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.proto b/src/main/proto/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.proto deleted file mode 100644 index aac0417..0000000 --- a/src/main/proto/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.udp_packet_writer.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.udp_packet_writer.v3"; -option java_outer_classname = "UdpDefaultWriterFactoryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/udp_packet_writer/v3;udp_packet_writerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP packet writer config] -// [#extension: envoy.udp_packet_writer.default] - -// Configuration for the default UDP packet writer factory which simply -// uses the kernel's sendmsg() to send UDP packets. -message UdpDefaultWriterFactory { -} diff --git a/src/main/proto/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.proto b/src/main/proto/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.proto deleted file mode 100644 index e0fc23a..0000000 --- a/src/main/proto/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.udp_packet_writer.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.udp_packet_writer.v3"; -option java_outer_classname = "UdpGsoBatchWriterFactoryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/udp_packet_writer/v3;udp_packet_writerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: UDP GSO batch packet writer config] -// [#extension: envoy.udp_packet_writer.gso] - -// Configuration for the UDP GSO batch packet writer factory. -message UdpGsoBatchWriterFactory { -} diff --git a/src/main/proto/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto b/src/main/proto/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto deleted file mode 100644 index cb578db..0000000 --- a/src/main/proto/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.generic.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.generic.v3"; -option java_outer_classname = "GenericConnectionPoolProtoOuterClass"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/generic/v3;genericv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Generic Connection Pool] - -// A connection pool which forwards downstream HTTP as TCP, UDP or HTTP to upstream, -// based on CONNECT configuration. -// [#extension: envoy.upstreams.http.generic] -message GenericConnectionPoolProto { -} diff --git a/src/main/proto/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto b/src/main/proto/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto deleted file mode 100644 index 45f3a16..0000000 --- a/src/main/proto/envoy/extensions/upstreams/http/http/v3/http_connection_pool.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.http.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.http.v3"; -option java_outer_classname = "HttpConnectionPoolProtoOuterClass"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/http/v3;httpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Http Connection Pool] - -// A connection pool which forwards downstream HTTP as HTTP to upstream. -// [#extension: envoy.upstreams.http.http] -message HttpConnectionPoolProto { -} diff --git a/src/main/proto/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto b/src/main/proto/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto deleted file mode 100644 index 1f0f288..0000000 --- a/src/main/proto/envoy/extensions/upstreams/http/tcp/v3/tcp_connection_pool.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.tcp.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.tcp.v3"; -option java_outer_classname = "TcpConnectionPoolProtoOuterClass"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/tcp/v3;tcpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tcp Connection Pool] - -// A connection pool which forwards downstream HTTP as TCP to upstream, -// [#extension: envoy.upstreams.http.tcp] -message TcpConnectionPoolProto { -} diff --git a/src/main/proto/envoy/extensions/upstreams/http/udp/v3/udp_connection_pool.proto b/src/main/proto/envoy/extensions/upstreams/http/udp/v3/udp_connection_pool.proto deleted file mode 100644 index 07d637d..0000000 --- a/src/main/proto/envoy/extensions/upstreams/http/udp/v3/udp_connection_pool.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.udp.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.udp.v3"; -option java_outer_classname = "UdpConnectionPoolProtoOuterClass"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/udp/v3;udpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Udp Connection Pool] - -// A connection pool which forwards downstream HTTP as UDP to upstream, -// [#extension: envoy.upstreams.http.udp] -message UdpConnectionPoolProto { -} diff --git a/src/main/proto/envoy/extensions/upstreams/http/v3/http_protocol_options.proto b/src/main/proto/envoy/extensions/upstreams/http/v3/http_protocol_options.proto deleted file mode 100644 index 03f0158..0000000 --- a/src/main/proto/envoy/extensions/upstreams/http/v3/http_protocol_options.proto +++ /dev/null @@ -1,223 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.http.v3; - -import "envoy/config/common/matcher/v3/matcher.proto"; -import "envoy/config/core/v3/extension.proto"; -import "envoy/config/core/v3/protocol.proto"; -import "envoy/config/route/v3/route_components.proto"; -import "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.http.v3"; -option java_outer_classname = "HttpProtocolOptionsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/http/v3;httpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP Protocol Options] -// [#extension: envoy.upstreams.http.http_protocol_options] - -// HttpProtocolOptions specifies Http upstream protocol options. This object -// is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name ``envoy.extensions.upstreams.http.v3.HttpProtocolOptions``. -// -// This controls what protocol(s) should be used for upstream and how said protocol(s) are configured. -// -// This replaces the prior pattern of explicit protocol configuration directly -// in the cluster. So a configuration like this, explicitly configuring the use of HTTP/2 upstream: -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// upstream_http_protocol_options: -// auto_sni: true -// common_http_protocol_options: -// idle_timeout: 1s -// http2_protocol_options: -// max_concurrent_streams: 100 -// .... [further cluster config] -// -// Would now look like this: -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// typed_extension_protocol_options: -// envoy.extensions.upstreams.http.v3.HttpProtocolOptions: -// "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions -// upstream_http_protocol_options: -// auto_sni: true -// common_http_protocol_options: -// idle_timeout: 1s -// explicit_http_config: -// http2_protocol_options: -// max_concurrent_streams: 100 -// .... [further cluster config] -// [#next-free-field: 12] -message HttpProtocolOptions { - // If this is used, the cluster will only operate on one of the possible upstream protocols. - // Note that HTTP/2 or above should generally be used for upstream gRPC clusters. - message ExplicitHttpConfig { - oneof protocol_config { - option (validate.required) = true; - - config.core.v3.Http1ProtocolOptions http_protocol_options = 1; - - config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; - - // .. warning:: - // QUIC upstream support is currently not ready for internet use. - // Please see :ref:`here ` for details. - config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; - } - } - - // If this is used, the cluster can use either of the configured protocols, and - // will use whichever protocol was used by the downstream connection. - // - // If HTTP/3 is configured for downstream and not configured for upstream, - // HTTP/3 requests will fail over to HTTP/2. - message UseDownstreamHttpConfig { - config.core.v3.Http1ProtocolOptions http_protocol_options = 1; - - config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; - - // .. warning:: - // QUIC upstream support is currently not ready for internet use. - // Please see :ref:`here ` for details. - config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; - } - - // If this is used, the cluster can use either HTTP/1 or HTTP/2, and will use whichever - // protocol is negotiated by ALPN with the upstream. - // Clusters configured with ``AutoHttpConfig`` will use the highest available - // protocol; HTTP/2 if supported, otherwise HTTP/1. - // If the upstream does not support ALPN, ``AutoHttpConfig`` will fail over to HTTP/1. - // This can only be used with transport sockets which support ALPN. Using a - // transport socket which does not support ALPN will result in configuration - // failure. The transport layer may be configured with custom ALPN, but the default ALPN - // for the cluster (or if custom ALPN fails) will be "h2,http/1.1". - message AutoHttpConfig { - config.core.v3.Http1ProtocolOptions http_protocol_options = 1; - - config.core.v3.Http2ProtocolOptions http2_protocol_options = 2; - - // Unlike HTTP/1 and HTTP/2, HTTP/3 will not be configured unless it is - // present, and (soon) only if there is an indication of server side - // support. - // See :ref:`here ` for more information on - // when HTTP/3 will be used, and when Envoy will fail over to TCP. - // - // .. warning:: - // QUIC upstream support is currently not ready for internet use. - // Please see :ref:`here ` for details. - config.core.v3.Http3ProtocolOptions http3_protocol_options = 3; - - // The presence of alternate protocols cache options causes the use of the - // alternate protocols cache, which is responsible for parsing and caching - // HTTP Alt-Svc headers. This enables the use of HTTP/3 for origins that - // advertise supporting it. - // - // .. note:: - // This is required when HTTP/3 is enabled. - config.core.v3.AlternateProtocolsCacheOptions alternate_protocols_cache_options = 4; - } - - message OutlierDetection { - // If specified, only responses matching the matcher will be treated by outlier detection as errors. - // If not specified, only 5xx codes are treated by outlier detection as errors. - config.common.matcher.v3.MatchPredicate error_matcher = 1 - [(validate.rules).message = {required: true}]; - } - - // This contains options common across HTTP/1 and HTTP/2 - config.core.v3.HttpProtocolOptions common_http_protocol_options = 1; - - // This contains common protocol options which are only applied upstream. - config.core.v3.UpstreamHttpProtocolOptions upstream_http_protocol_options = 2; - - // This controls the actual protocol to be used upstream. - oneof upstream_protocol_options { - option (validate.required) = true; - - // To explicitly configure either HTTP/1 or HTTP/2 (but not both!) use ``explicit_http_config``. - ExplicitHttpConfig explicit_http_config = 3; - - // This allows switching on protocol based on what protocol the downstream - // connection used. - UseDownstreamHttpConfig use_downstream_protocol_config = 4; - - // This allows switching on protocol based on ALPN - AutoHttpConfig auto_config = 5; - } - - // Optional HTTP filters for the upstream HTTP filter chain. - // - // .. note:: - // Upstream HTTP filters are currently in alpha. - // - // - // These filters will be applied for all HTTP streams which flow through this - // cluster. Unlike downstream HTTP filters, they will *not* be applied to terminated CONNECT requests. - // - // If using upstream HTTP filters, please be aware that local errors sent by - // upstream HTTP filters will not trigger retries, and local errors sent by - // upstream HTTP filters will count as a final response if hedging is configured. - // [#extension-category: envoy.filters.http.upstream] - repeated filters.network.http_connection_manager.v3.HttpFilter http_filters = 6; - - // Configuration options for Unified Header Validation (UHV). - // UHV is an extensible mechanism for checking validity of HTTP responses. - // - // [#comment:TODO(yanavlasov): Make it a link to the default header validator doc when it becomes visible.] - // Leaving this field unspecified, selects the default header validator ``envoy.http.header_validators.envoy_default``. - // - // [#not-implemented-hide:] - // [#extension-category: envoy.http.header_validators] - config.core.v3.TypedExtensionConfig header_validation_config = 7; - - // Defines http specific outlier detection parameters. - OutlierDetection outlier_detection = 8; - - // Specifies a list of HTTP-level mirroring policies for requests routed to this cluster. - // Cluster-level policies override route-level policies when they both are configured. - // - // .. note:: - // - // Mirroring will not be triggered if the :ref:`primary cluster - // ` does not exist. - repeated config.route.v3.RouteAction.RequestMirrorPolicy request_mirror_policies = 9; - - // Specifies a list of hash policies for consistent hashing load balancing (e.g., Ring Hash or - // Maglev) for requests routed to this cluster. When configured, cluster-level policies override - // route-level policies. When not configured, route-level policies (if any) will be used. - // - // This enables consistent routing to the same upstream host for all requests to a cluster, - // which is particularly useful for stateful services like caching, session management, or - // sticky routing requirements. - // - // .. note:: - // - // Hash policies are only effective when the cluster is configured with a hash-based load - // balancing policy (e.g., :ref:`RING_HASH ` - // or :ref:`MAGLEV `). - repeated config.route.v3.RouteAction.HashPolicy hash_policy = 10; - - // Specifies the retry policy for requests routed to this cluster. When configured, - // cluster-level retry policy overrides route-level retry policy. When not configured, - // route-level retry policy (if any) will be used. - // - // .. note:: - // - // Cluster-level retry policy will override route-level retry policy entirely. Policies are - // not merged. - config.route.v3.RetryPolicy retry_policy = 11; -} diff --git a/src/main/proto/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto b/src/main/proto/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto deleted file mode 100644 index d9bf119..0000000 --- a/src/main/proto/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.tcp.generic.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.tcp.generic.v3"; -option java_outer_classname = "GenericConnectionPoolProtoOuterClass"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/tcp/generic/v3;genericv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Generic Connection Pool] - -// A connection pool which forwards downstream TCP as TCP or HTTP to upstream, -// based on CONNECT configuration. -// [#extension: envoy.upstreams.tcp.generic] -message GenericConnectionPoolProto { -} diff --git a/src/main/proto/envoy/extensions/upstreams/tcp/v3/tcp_protocol_options.proto b/src/main/proto/envoy/extensions/upstreams/tcp/v3/tcp_protocol_options.proto deleted file mode 100644 index 4e0dbf4..0000000 --- a/src/main/proto/envoy/extensions/upstreams/tcp/v3/tcp_protocol_options.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.upstreams.tcp.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.upstreams.tcp.v3"; -option java_outer_classname = "TcpProtocolOptionsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/tcp/v3;tcpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: TCP Protocol Options] -// [#extension: envoy.upstreams.tcp.tcp_protocol_options] - -// TCProtocolOptions specifies TCP upstream protocol options. This object -// is used in -// :ref:`typed_extension_protocol_options`, -// keyed by the name ``envoy.extensions.upstreams.tcp.v3.TcpProtocolOptions``. -// -// .. code:: -// -// clusters: -// - name: some_service -// connect_timeout: 5s -// typed_extension_protocol_options: -// envoy.extensions.upstreams.tcp.v3.TcpProtocolOptions: -// "@type": type.googleapis.com/envoy.extensions.upstreams.tcp.v3.TcpProtocolOptions -// idle_timeout: 10m -// .... [further cluster config] - -message TcpProtocolOptions { - // The idle timeout for the connection. The idle timeout is defined as the period in which - // the connection is not associated with a downstream connection. When the idle timeout is - // reached, the connection will be closed. - // - // If not set, the default idle timeout is 10 minutes. To disable idle timeouts, explicitly set this to 0. - // - // .. warning:: - // Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP - // FIN packets, etc. - google.protobuf.Duration idle_timeout = 1; -} diff --git a/src/main/proto/envoy/extensions/wasm/v3/wasm.proto b/src/main/proto/envoy/extensions/wasm/v3/wasm.proto deleted file mode 100644 index e8fea67..0000000 --- a/src/main/proto/envoy/extensions/wasm/v3/wasm.proto +++ /dev/null @@ -1,211 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.wasm.v3; - -import "envoy/config/core/v3/backoff.proto"; -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.wasm.v3"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/wasm/v3;wasmv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Wasm] -// [#extension: envoy.bootstrap.wasm] - -// If there is a fatal error on the VM (e.g. exception, ``abort()``), then the policy will be applied. -enum FailurePolicy { - // No policy is specified. The default policy will be used. The default policy is ``FAIL_CLOSED``. - UNSPECIFIED = 0; - - // New plugin instance will be created for the new request if the VM is failed. Note this will only - // be applied to the following failures: - // - // * ``proxy_wasm::FailState::RuntimeError`` - // - // This will fallback to the ``FAIL_CLOSED`` for all other failures. - FAIL_RELOAD = 1; - - // All plugins associated with the VM will return an HTTP 503 error. - FAIL_CLOSED = 2; - - // All plugins associated with the VM will be ignored and the filter chain will continue. This - // makes sense when the plugin is optional. - FAIL_OPEN = 3; -} - -message ReloadConfig { - // Backoff strategy for the VM failure reload. If not specified, the default 1s base interval - // will be applied. - config.core.v3.BackoffStrategy backoff = 1; -} - -// Configuration for restricting Proxy-Wasm capabilities available to modules. -message CapabilityRestrictionConfig { - // The Proxy-Wasm capabilities which will be allowed. Capabilities are mapped by - // name. The ``SanitizationConfig`` which each capability maps to is currently unimplemented and ignored, - // and so should be left empty. - // - // The capability names are given in the - // `Proxy-Wasm ABI `_. - // Additionally, the following WASI capabilities from - // `this list `_ - // are implemented and can be allowed: - // ``fd_write``, ``fd_read``, ``fd_seek``, ``fd_close``, ``fd_fdstat_get``, ``environ_get``, ``environ_sizes_get``, - // ``args_get``, ``args_sizes_get``, ``proc_exit``, ``clock_time_get``, ``random_get``. - map allowed_capabilities = 1; -} - -// Configuration for sanitization of inputs to an allowed capability. -// -// .. note:: -// This is currently unimplemented. -message SanitizationConfig { -} - -// Configuration for a Wasm VM. -// [#next-free-field: 8] -message VmConfig { - // An ID which will be used along with a hash of the wasm code (or the name of the registered Null - // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same - // ``vm_id`` and code will use the same VM. May be left blank. Sharing a VM between plugins can - // reduce memory utilization and make sharing of data easier which may have security implications. - // [#comment: TODO: add ref for details.] - string vm_id = 1; - - // The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time. - // The priority to search for the available engine is: v8 -> wasmtime -> wamr. - // Available Wasm runtime types are registered as extensions. The following runtimes are included - // in Envoy code base: - // - // .. _extension_envoy.wasm.runtime.null: - // - // **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the - // Envoy binary. The registered name is given in the ``code`` field as ``inline_string``. - // - // .. _extension_envoy.wasm.runtime.v8: - // - // **envoy.wasm.runtime.v8**: `V8 `_-based WebAssembly runtime. - // - // .. _extension_envoy.wasm.runtime.wamr: - // - // **envoy.wasm.runtime.wamr**: `WAMR `_-based WebAssembly runtime. - // This runtime is not enabled in the official build. - // - // .. _extension_envoy.wasm.runtime.wasmtime: - // - // **envoy.wasm.runtime.wasmtime**: `Wasmtime `_-based WebAssembly runtime. - // This runtime is not enabled in the official build. - // - // [#extension-category: envoy.wasm.runtime] - string runtime = 2; - - // The Wasm code that Envoy will execute. - config.core.v3.AsyncDataSource code = 3; - - // The Wasm configuration used in initialization of a new VM - // (``proxy_on_start``). ``google.protobuf.Struct`` is serialized as JSON before - // passing it to the plugin. ``google.protobuf.BytesValue`` and - // ``google.protobuf.StringValue`` are passed directly without the wrapper. - google.protobuf.Any configuration = 4; - - // Allow the wasm file to include pre-compiled code on VMs which support it. - // - // .. warning:: - // This should only be enabled for trusted sources as the precompiled code is not - // verified. - bool allow_precompiled = 5; - - // If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration - // update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter - // warming state. - bool nack_on_code_cache_miss = 6; - - // Specifies environment variables to be injected to this VM which will be available through - // WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions - // are generally called implicitly by your language's standard library. Therefore, you do not - // need to call them directly. You can access environment variables in the same way you would - // on native platforms. - // - // .. warning:: - // Envoy rejects the configuration if there's conflict of key space. - EnvironmentVariables environment_variables = 7; -} - -message EnvironmentVariables { - // The keys of *Envoy's* environment variables exposed to this VM. In other words, if a key exists in Envoy's environment - // variables, then that key-value pair will be injected. Note that if a key does not exist, it will be ignored. - repeated string host_env_keys = 1; - - // Explicitly given key-value pairs to be injected to this VM in the form of "KEY=VALUE". - map key_values = 2; -} - -// Base Configuration for Wasm Plugins e.g. filters and services. -// [#next-free-field: 10] -message PluginConfig { - // A unique name for a filters/services in a VM for use in identifying the filter/service if - // multiple filters/services are handled by the same ``vm_id`` and ``root_id`` and for - // logging/debugging. - string name = 1; - - // A unique ID for a set of filters/services in a VM which will share a RootContext and Contexts - // if applicable (e.g. an Wasm HttpFilter and an Wasm AccessLog). If left blank, all - // filters/services with a blank root_id with the same ``vm_id`` will share Context(s). - string root_id = 2; - - // Configuration for finding or starting VM. - oneof vm { - VmConfig vm_config = 3; - // TODO: add referential VM configurations. - } - - // Filter/service configuration used to configure or reconfigure a plugin - // (``proxy_on_configure``). - // ``google.protobuf.Struct`` is serialized as JSON before - // passing it to the plugin. ``google.protobuf.BytesValue`` and - // ``google.protobuf.StringValue`` are passed directly without the wrapper. - google.protobuf.Any configuration = 4; - - // If there is a fatal error on the VM (e.g. exception, ``abort()``, ``on_start`` or ``on_configure`` return false), - // then all plugins associated with the VM will either fail closed (by default), e.g. by returning an HTTP 503 error, - // or fail open (if 'fail_open' is set to true) by bypassing the filter. - // - // .. note:: - // When ``on_start`` or ``on_configure`` return ``false`` during xDS updates the xDS configuration will be rejected and when ``on_start`` or ``on_configure`` return ``false`` on - // initial startup the proxy will not start. - // - // This field is deprecated in favor of the ``failure_policy`` field. - bool fail_open = 5 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // The failure policy for the plugin. - FailurePolicy failure_policy = 7; - - // Reload configuration. This is only applied when ``failure_policy`` is set to ``FAIL_RELOAD``. - ReloadConfig reload_config = 8; - - // Configuration for restricting Proxy-Wasm capabilities available to modules. - CapabilityRestrictionConfig capability_restriction_config = 6; - - // Whether or not to allow plugin onRequestHeaders and onResponseHeaders callbacks to return - // FilterHeadersStatus::StopIteration. - google.protobuf.BoolValue allow_on_headers_stop_iteration = 9; -} - -// WasmService is configured as a built-in ``envoy.wasm_service`` :ref:`WasmService -// ` This opaque configuration will be used to create a Wasm Service. -message WasmService { - // General plugin configuration. - PluginConfig config = 1; - - // If true, create a single VM rather than creating one VM per worker. Such a singleton can - // not be used with filters. - bool singleton = 2; -} diff --git a/src/main/proto/envoy/extensions/watchdog/profile_action/v3/profile_action.proto b/src/main/proto/envoy/extensions/watchdog/profile_action/v3/profile_action.proto deleted file mode 100644 index dec616c..0000000 --- a/src/main/proto/envoy/extensions/watchdog/profile_action/v3/profile_action.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.watchdog.profile_action.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.watchdog.profile_action.v3"; -option java_outer_classname = "ProfileActionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/watchdog/profile_action/v3;profile_actionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Watchdog Action that does CPU profiling.] -// [#extension: envoy.watchdog.profile_action] - -// Configuration for the profile watchdog action. -message ProfileActionConfig { - // How long the profile should last. If not set defaults to 5 seconds. - google.protobuf.Duration profile_duration = 1; - - // File path to the directory to output profiles. - string profile_path = 2 [(validate.rules).string = {min_len: 1}]; - - // Limits the max number of profiles that can be generated by this action - // over its lifetime to avoid filling the disk. - // If not set (i.e. it's 0), a default of 10 will be used. - uint64 max_profiles = 3; -} diff --git a/src/main/proto/envoy/service/accesslog/v2/als.proto b/src/main/proto/envoy/service/accesslog/v2/als.proto deleted file mode 100644 index 24d90f1..0000000 --- a/src/main/proto/envoy/service/accesslog/v2/als.proto +++ /dev/null @@ -1,72 +0,0 @@ -syntax = "proto3"; - -package envoy.service.accesslog.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/data/accesslog/v2/accesslog.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.accesslog.v2"; -option java_outer_classname = "AlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v2;accesslogv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC Access Log Service (ALS)] - -// Service for streaming access logs from Envoy to an access log server. -service AccessLogService { - // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different - // API for "critical" access logs in which Envoy will buffer access logs for some period of time - // until it gets an ACK so it could then retry. This API is designed for high throughput with the - // expectation that it might be lossy. - rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) { - } -} - -// Empty response for the StreamAccessLogs API. Will never be sent. See below. -message StreamAccessLogsResponse { -} - -// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream -// access logs without ever expecting a response. -message StreamAccessLogsMessage { - message Identifier { - // The node sending the access log messages over the stream. - api.v2.core.Node node = 1 [(validate.rules).message = {required: true}]; - - // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig - // `. - string log_name = 2 [(validate.rules).string = {min_bytes: 1}]; - } - - // Wrapper for batches of HTTP access log entries. - message HTTPAccessLogEntries { - repeated data.accesslog.v2.HTTPAccessLogEntry log_entry = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - // Wrapper for batches of TCP access log entries. - message TCPAccessLogEntries { - repeated data.accesslog.v2.TCPAccessLogEntry log_entry = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier identifier = 1; - - // Batches of log entries of a single type. Generally speaking, a given stream should only - // ever include one type of log entry. - oneof log_entries { - option (validate.required) = true; - - HTTPAccessLogEntries http_logs = 2; - - TCPAccessLogEntries tcp_logs = 3; - } -} diff --git a/src/main/proto/envoy/service/accesslog/v3/als.proto b/src/main/proto/envoy/service/accesslog/v3/als.proto deleted file mode 100644 index 384d41f..0000000 --- a/src/main/proto/envoy/service/accesslog/v3/als.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; - -package envoy.service.accesslog.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.accesslog.v3"; -option java_outer_classname = "AlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v3;accesslogv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC access log service (ALS)] - -// Service for streaming access logs from Envoy to an access log server. -service AccessLogService { - // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different - // API for "critical" access logs in which Envoy will buffer access logs for some period of time - // until it gets an ACK so it could then retry. This API is designed for high throughput with the - // expectation that it might be lossy. - rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) { - } -} - -// Empty response for the StreamAccessLogs API. Will never be sent. See below. -message StreamAccessLogsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v2.StreamAccessLogsResponse"; -} - -// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream -// access logs without ever expecting a response. -message StreamAccessLogsMessage { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v2.StreamAccessLogsMessage"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v2.StreamAccessLogsMessage.Identifier"; - - // The node sending the access log messages over the stream. - config.core.v3.Node node = 1 [(validate.rules).message = {required: true}]; - - // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig - // `. - string log_name = 2 [(validate.rules).string = {min_len: 1}]; - } - - // Wrapper for batches of HTTP access log entries. - message HTTPAccessLogEntries { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v2.StreamAccessLogsMessage.HTTPAccessLogEntries"; - - repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - // Wrapper for batches of TCP access log entries. - message TCPAccessLogEntries { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.accesslog.v2.StreamAccessLogsMessage.TCPAccessLogEntries"; - - repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 - [(validate.rules).repeated = {min_items: 1}]; - } - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier identifier = 1; - - // Batches of log entries of a single type. Generally speaking, a given stream should only - // ever include one type of log entry. - oneof log_entries { - option (validate.required) = true; - - HTTPAccessLogEntries http_logs = 2; - - TCPAccessLogEntries tcp_logs = 3; - } -} diff --git a/src/main/proto/envoy/service/auth/v2/attribute_context.proto b/src/main/proto/envoy/service/auth/v2/attribute_context.proto deleted file mode 100644 index 3a11b73..0000000 --- a/src/main/proto/envoy/service/auth/v2/attribute_context.proto +++ /dev/null @@ -1,161 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v2; - -import "envoy/api/v2/core/address.proto"; -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v2"; -option java_outer_classname = "AttributeContextProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2;authv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Attribute Context ] - -// See :ref:`network filter configuration overview ` -// and :ref:`HTTP filter configuration overview `. - -// An attribute is a piece of metadata that describes an activity on a network. -// For example, the size of an HTTP request, or the status code of an HTTP response. -// -// Each attribute has a type and a name, which is logically defined as a proto message field -// of the `AttributeContext`. The `AttributeContext` is a collection of individual attributes -// supported by Envoy authorization system. -// [#comment: The following items are left out of this proto -// Request.Auth field for JWTs -// Request.Api for api management -// Origin peer that originated the request -// Caching Protocol -// request_context return values to inject back into the filter chain -// peer.claims -- from X.509 extensions -// Configuration -// - field mask to send -// - which return values from request_context are copied back -// - which return values are copied into request_headers] -// [#next-free-field: 12] -message AttributeContext { - // This message defines attributes for a node that handles a network request. - // The node can be either a service or an application that sends, forwards, - // or receives the request. Service peers should fill in the `service`, - // `principal`, and `labels` as appropriate. - // [#next-free-field: 6] - message Peer { - // The address of the peer, this is typically the IP address. - // It can also be UDS path, or others. - api.v2.core.Address address = 1; - - // The canonical service name of the peer. - // It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster - // ` - // If a more trusted source of the service name is available through mTLS/secure naming, it - // should be used. - string service = 2; - - // The labels associated with the peer. - // These could be pod labels for Kubernetes or tags for VMs. - // The source of the labels could be an X.509 certificate or other configuration. - map labels = 3; - - // The authenticated identity of this peer. - // For example, the identity associated with the workload such as a service account. - // If an X.509 certificate is used to assert the identity this field should be sourced from - // `URI Subject Alternative Names`, `DNS Subject Alternate Names` or `Subject` in that order. - // The primary identity should be the principal. The principal format is issuer specific. - // - // Example: - // * SPIFFE format is `spiffe://trust-domain/path` - // * Google account format is `https://accounts.google.com/{userid}` - string principal = 4; - - // The X.509 certificate used to authenticate the identify of this peer. - // When present, the certificate contents are encoded in URL and PEM format. - string certificate = 5; - } - - // Represents a network request, such as an HTTP request. - message Request { - // The timestamp when the proxy receives the first byte of the request. - google.protobuf.Timestamp time = 1; - - // Represents an HTTP request or an HTTP-like request. - HttpRequest http = 2; - } - - // This message defines attributes for an HTTP request. - // HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. - // [#next-free-field: 12] - message HttpRequest { - // The unique ID for a request, which can be propagated to downstream - // systems. The ID should have low probability of collision - // within a single day for a specific service. - // For HTTP requests, it should be X-Request-ID or equivalent. - string id = 1; - - // The HTTP request method, such as `GET`, `POST`. - string method = 2; - - // The HTTP request headers. If multiple headers share the same key, they - // must be merged according to the HTTP spec. All header keys must be - // lower-cased, because HTTP header keys are case-insensitive. - map headers = 3; - - // The request target, as it appears in the first line of the HTTP request. This includes - // the URL path and query-string. No decoding is performed. - string path = 4; - - // The HTTP request `Host` or 'Authority` header value. - string host = 5; - - // The HTTP URL scheme, such as `http` and `https`. This is set for HTTP/2 - // requests only. For HTTP/1.1, use "x-forwarded-for" header value to lookup - // the scheme of the request. - string scheme = 6; - - // This field is always empty, and exists for compatibility reasons. The HTTP URL query is - // included in `path` field. - string query = 7; - - // This field is always empty, and exists for compatibility reasons. The URL fragment is - // not submitted as part of HTTP requests; it is unknowable. - string fragment = 8; - - // The HTTP request size in bytes. If unknown, it must be -1. - int64 size = 9; - - // The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2". - // - // See :repo:`headers.h:ProtocolStrings ` for a list of all - // possible values. - string protocol = 10; - - // The HTTP request body. - string body = 11; - } - - // The source of a network activity, such as starting a TCP connection. - // In a multi hop network activity, the source represents the sender of the - // last hop. - Peer source = 1; - - // The destination of a network activity, such as accepting a TCP connection. - // In a multi hop network activity, the destination represents the receiver of - // the last hop. - Peer destination = 2; - - // Represents a network request, such as an HTTP request. - Request request = 4; - - // This is analogous to http_request.headers, however these contents will not be sent to the - // upstream server. Context_extensions provide an extension mechanism for sending additional - // information to the auth server without modifying the proto definition. It maps to the - // internal opaque context in the filter chain. - map context_extensions = 10; - - // Dynamic metadata associated with the request. - api.v2.core.Metadata metadata_context = 11; -} diff --git a/src/main/proto/envoy/service/auth/v2/external_auth.proto b/src/main/proto/envoy/service/auth/v2/external_auth.proto deleted file mode 100644 index a1b4055..0000000 --- a/src/main/proto/envoy/service/auth/v2/external_auth.proto +++ /dev/null @@ -1,82 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/service/auth/v2/attribute_context.proto"; -import "envoy/type/http_status.proto"; - -import "google/rpc/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v2"; -option java_outer_classname = "ExternalAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2;authv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Authorization Service ] - -// The authorization service request messages used by external authorization :ref:`network filter -// ` and :ref:`HTTP filter `. - -// A generic interface for performing authorization check on incoming -// requests to a networked service. -service Authorization { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. - rpc Check(CheckRequest) returns (CheckResponse) { - } -} - -message CheckRequest { - // The request attributes. - AttributeContext attributes = 1; -} - -// HTTP attributes for a denied response. -message DeniedHttpResponse { - // This field allows the authorization service to send a HTTP response status - // code to the downstream client other than 403 (Forbidden). - type.HttpStatus status = 1 [(validate.rules).message = {required: true}]; - - // This field allows the authorization service to send HTTP response headers - // to the downstream client. Note that the `append` field in `HeaderValueOption` defaults to - // false when used in this message. - repeated api.v2.core.HeaderValueOption headers = 2; - - // This field allows the authorization service to send a response body data - // to the downstream client. - string body = 3; -} - -// HTTP attributes for an ok response. -message OkHttpResponse { - // HTTP entity headers in addition to the original request headers. This allows the authorization - // service to append, to add or to override headers from the original request before - // dispatching it to the upstream. Note that the `append` field in `HeaderValueOption` defaults to - // false when used in this message. By setting the `append` field to `true`, - // the filter will append the correspondent header value to the matched request header. - // By leaving `append` as false, the filter will either add a new header, or override an existing - // one if there is a match. - repeated api.v2.core.HeaderValueOption headers = 2; -} - -// Intended for gRPC and Network Authorization servers `only`. -message CheckResponse { - // Status `OK` allows the request. Any other status indicates the request should be denied. - google.rpc.Status status = 1; - - // An message that contains HTTP response attributes. This message is - // used when the authorization service needs to send custom responses to the - // downstream client or, to modify/add request headers being dispatched to the upstream. - oneof http_response { - // Supplies http attributes for a denied response. - DeniedHttpResponse denied_response = 2; - - // Supplies http attributes for an ok response. - OkHttpResponse ok_response = 3; - } -} diff --git a/src/main/proto/envoy/service/auth/v2alpha/external_auth.proto b/src/main/proto/envoy/service/auth/v2alpha/external_auth.proto deleted file mode 100644 index 3307105..0000000 --- a/src/main/proto/envoy/service/auth/v2alpha/external_auth.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v2alpha; - -option java_multiple_files = true; -option java_outer_classname = "CertsProto"; -option java_package = "io.envoyproxy.envoy.service.auth.v2alpha"; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v2alpha"; - -import "envoy/service/auth/v2/external_auth.proto"; - -// [#protodoc-title: Authorization Service ] - -// The authorization service request messages used by external authorization :ref:`network filter -// ` and :ref:`HTTP filter `. - -// A generic interface for performing authorization check on incoming -// requests to a networked service. -service Authorization { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. - rpc Check(v2.CheckRequest) returns (v2.CheckResponse); -} diff --git a/src/main/proto/envoy/service/auth/v3/attribute_context.proto b/src/main/proto/envoy/service/auth/v3/attribute_context.proto deleted file mode 100644 index 2c4fbb4..0000000 --- a/src/main/proto/envoy/service/auth/v3/attribute_context.proto +++ /dev/null @@ -1,222 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v3; - -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v3"; -option java_outer_classname = "AttributeContextProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v3;authv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Attribute context] - -// See :ref:`network filter configuration overview ` -// and :ref:`HTTP filter configuration overview `. - -// An attribute is a piece of metadata that describes an activity on a network. -// For example, the size of an HTTP request, or the status code of an HTTP response. -// -// Each attribute has a type and a name, which is logically defined as a proto message field -// of the ``AttributeContext``. The ``AttributeContext`` is a collection of individual attributes -// supported by Envoy authorization system. -// [#comment: The following items are left out of this proto -// Request.Auth field for JWTs -// Request.Api for api management -// Origin peer that originated the request -// Caching Protocol -// request_context return values to inject back into the filter chain -// peer.claims -- from X.509 extensions -// Configuration -// - field mask to send -// - which return values from request_context are copied back -// - which return values are copied into request_headers] -// [#next-free-field: 14] -message AttributeContext { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.AttributeContext"; - - // This message defines attributes for a node that handles a network request. - // The node can be either a service or an application that sends, forwards, - // or receives the request. Service peers should fill in the ``service``, - // ``principal``, and ``labels`` as appropriate. - // [#next-free-field: 6] - message Peer { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.AttributeContext.Peer"; - - // The address of the peer, this is typically the IP address. - // It can also be UDS path, or others. - config.core.v3.Address address = 1; - - // The canonical service name of the peer. - // It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster - // ` - // If a more trusted source of the service name is available through mTLS/secure naming, it - // should be used. - string service = 2; - - // The labels associated with the peer. - // These could be pod labels for Kubernetes or tags for VMs. - // The source of the labels could be an X.509 certificate or other configuration. - map labels = 3; - - // The authenticated identity of this peer. - // For example, the identity associated with the workload such as a service account. - // If an X.509 certificate is used to assert the identity this field should be sourced from - // ``URI Subject Alternative Names``, ``DNS Subject Alternate Names`` or ``Subject`` in that order. - // The primary identity should be the principal. The principal format is issuer specific. - // - // Examples: - // - // - SPIFFE format is ``spiffe://trust-domain/path``. - // - Google account format is ``https://accounts.google.com/{userid}``. - string principal = 4; - - // The X.509 certificate used to authenticate the identify of this peer. - // When present, the certificate contents are encoded in URL and PEM format. - string certificate = 5; - } - - // Represents a network request, such as an HTTP request. - message Request { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.AttributeContext.Request"; - - // The timestamp when the proxy receives the first byte of the request. - google.protobuf.Timestamp time = 1; - - // Represents an HTTP request or an HTTP-like request. - HttpRequest http = 2; - } - - // This message defines attributes for an HTTP request. - // HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. - // [#next-free-field: 14] - message HttpRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.AttributeContext.HttpRequest"; - - // The unique ID for a request, which can be propagated to downstream - // systems. The ID should have low probability of collision - // within a single day for a specific service. - // For HTTP requests, it should be X-Request-ID or equivalent. - string id = 1; - - // The HTTP request method, such as ``GET``, ``POST``. - string method = 2; - - // The HTTP request headers. If multiple headers share the same key, they - // must be merged according to the HTTP spec. All header keys must be - // lower-cased, because HTTP header keys are case-insensitive. - // Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by "!". - // This field will not be set if - // :ref:`encode_raw_headers ` - // is set to true. - map headers = 3 - [(udpa.annotations.field_migrate).oneof_promotion = "headers_type"]; - - // A list of the raw HTTP request headers. This is used instead of - // :ref:`headers ` when - // :ref:`encode_raw_headers ` - // is set to true. - // - // Note that this is not actually a map type. ``header_map`` contains a single repeated field - // ``headers``. - // - // Here, only the ``key`` and ``raw_value`` fields will be populated for each HeaderValue, and - // that is only when - // :ref:`encode_raw_headers ` - // is set to true. - // - // Also, unlike the - // :ref:`headers ` - // field, headers with the same key are not combined into a single comma separated header. - config.core.v3.HeaderMap header_map = 13 - [(udpa.annotations.field_migrate).oneof_promotion = "headers_type"]; - - // The request target, as it appears in the first line of the HTTP request. This includes - // the URL path and query-string. No decoding is performed. - string path = 4; - - // The HTTP request ``Host`` or ``:authority`` header value. - string host = 5; - - // The HTTP URL scheme, such as ``http`` and ``https``. - string scheme = 6; - - // This field is always empty, and exists for compatibility reasons. The HTTP URL query is - // included in ``path`` field. - string query = 7; - - // This field is always empty, and exists for compatibility reasons. The URL fragment is - // not submitted as part of HTTP requests; it is unknowable. - string fragment = 8; - - // The HTTP request size in bytes. If unknown, it must be -1. - int64 size = 9; - - // The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2". - // - // See :repo:`headers.h:ProtocolStrings ` for a list of all - // possible values. - string protocol = 10; - - // The HTTP request body. - string body = 11; - - // The HTTP request body in bytes. This is used instead of - // :ref:`body ` when - // :ref:`pack_as_bytes ` - // is set to true. - bytes raw_body = 12; - } - - // This message defines attributes for the underlying TLS session. - message TLSSession { - // SNI used for TLS session. - string sni = 1; - } - - // The source of a network activity, such as starting a TCP connection. - // In a multi hop network activity, the source represents the sender of the - // last hop. - Peer source = 1; - - // The destination of a network activity, such as accepting a TCP connection. - // In a multi hop network activity, the destination represents the receiver of - // the last hop. - Peer destination = 2; - - // Represents a network request, such as an HTTP request. - Request request = 4; - - // This is analogous to http_request.headers, however these contents will not be sent to the - // upstream server. Context_extensions provide an extension mechanism for sending additional - // information to the auth server without modifying the proto definition. It maps to the - // internal opaque context in the filter chain. - map context_extensions = 10; - - // Dynamic metadata associated with the request. - config.core.v3.Metadata metadata_context = 11; - - // Metadata associated with the selected route. - config.core.v3.Metadata route_metadata_context = 13; - - // TLS session details of the underlying connection. - // This is not populated by default and will be populated only if the ext_authz filter has - // been specifically configured to include this information. - // For HTTP ext_authz, that requires :ref:`include_tls_session ` - // to be set to true. - // For network ext_authz, that requires :ref:`include_tls_session ` - // to be set to true. - TLSSession tls_session = 12; -} diff --git a/src/main/proto/envoy/service/auth/v3/external_auth.proto b/src/main/proto/envoy/service/auth/v3/external_auth.proto deleted file mode 100644 index 520a4ff..0000000 --- a/src/main/proto/envoy/service/auth/v3/external_auth.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; - -package envoy.service.auth.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/service/auth/v3/attribute_context.proto"; -import "envoy/type/v3/http_status.proto"; - -import "google/protobuf/struct.proto"; -import "google/rpc/status.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.auth.v3"; -option java_outer_classname = "ExternalAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/auth/v3;authv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Authorization service] - -// The authorization service request messages used by external authorization :ref:`network filter -// ` and :ref:`HTTP filter `. - -// A generic interface for performing authorization check on incoming -// requests to a networked service. -service Authorization { - // Performs authorization check based on the attributes associated with the - // incoming request, and returns status `OK` or not `OK`. - rpc Check(CheckRequest) returns (CheckResponse) { - } -} - -message CheckRequest { - option (udpa.annotations.versioning).previous_message_type = "envoy.service.auth.v2.CheckRequest"; - - // The request attributes. - AttributeContext attributes = 1; -} - -// HTTP attributes for a denied response. -message DeniedHttpResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.DeniedHttpResponse"; - - // This field allows the authorization service to send an HTTP response status code to the - // downstream client. If not set, Envoy sends ``403 Forbidden`` HTTP status code by default. - type.v3.HttpStatus status = 1; - - // This field allows the authorization service to send HTTP response headers - // to the downstream client. Note that the :ref:`append field in HeaderValueOption ` defaults to - // false when used in this message. - repeated config.core.v3.HeaderValueOption headers = 2; - - // This field allows the authorization service to send a response body data - // to the downstream client. - string body = 3; -} - -// HTTP attributes for an OK response. -// [#next-free-field: 9] -message OkHttpResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.OkHttpResponse"; - - // HTTP entity headers in addition to the original request headers. This allows the authorization - // service to append, to add or to override headers from the original request before - // dispatching it to the upstream. Note that the :ref:`append field in HeaderValueOption ` defaults to - // false when used in this message. By setting the ``append`` field to ``true``, - // the filter will append the correspondent header value to the matched request header. - // By leaving ``append`` as false, the filter will either add a new header, or override an existing - // one if there is a match. - repeated config.core.v3.HeaderValueOption headers = 2; - - // HTTP entity headers to remove from the original request before dispatching - // it to the upstream. This allows the authorization service to act on auth - // related headers (like ``Authorization``), process them, and consume them. - // Under this model, the upstream will either receive the request (if it's - // authorized) or not receive it (if it's not), but will not see headers - // containing authorization credentials. - // - // Pseudo headers (such as ``:authority``, ``:method``, ``:path`` etc), as well as - // the header ``Host``, may not be removed as that would make the request - // malformed. If mentioned in ``headers_to_remove`` these special headers will - // be ignored. - // - // When using the HTTP service this must instead be set by the HTTP - // authorization service as a comma separated list like so: - // ``x-envoy-auth-headers-to-remove: one-auth-header, another-auth-header``. - repeated string headers_to_remove = 5; - - // This field has been deprecated in favor of :ref:`CheckResponse.dynamic_metadata - // `. Until it is removed, - // setting this field overrides :ref:`CheckResponse.dynamic_metadata - // `. - google.protobuf.Struct dynamic_metadata = 3 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // This field allows the authorization service to send HTTP response headers - // to the downstream client on success. Note that the :ref:`append field in HeaderValueOption ` - // defaults to false when used in this message. - repeated config.core.v3.HeaderValueOption response_headers_to_add = 6; - - // This field allows the authorization service to set (and overwrite) query - // string parameters on the original request before it is sent upstream. - repeated config.core.v3.QueryParameter query_parameters_to_set = 7; - - // This field allows the authorization service to specify which query parameters - // should be removed from the original request before it is sent upstream. Each - // element in this list is a case-sensitive query parameter name to be removed. - repeated string query_parameters_to_remove = 8; -} - -// Intended for gRPC and Network Authorization servers ``only``. -// [#next-free-field: 6] -message CheckResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.auth.v2.CheckResponse"; - - // Status ``OK`` allows the request. Any other status indicates the request should be denied, and - // for HTTP filter, if not overridden by :ref:`denied HTTP response status ` - // Envoy sends ``403 Forbidden`` HTTP status code by default. - google.rpc.Status status = 1; - - // An message that contains HTTP response attributes. This message is - // used when the authorization service needs to send custom responses to the - // downstream client or, to modify/add request headers being dispatched to the upstream. - oneof http_response { - // Supplies http attributes for a denied response. - DeniedHttpResponse denied_response = 2; - - // Supplies http attributes for an ok response. - OkHttpResponse ok_response = 3; - - // Supplies http attributes for an error response. This is used when the authorization - // service encounters an internal error and wants to return custom headers and body to the - // downstream client. When ``error_response`` is set, the ext_authz filter increments the - // ``ext_authz_error`` stat and respects the :ref:`failure_mode_allow - // ` - // configuration. The HTTP status code, headers, and body are taken from the - // :ref:`DeniedHttpResponse ` message. - // If the status field is not set, Envoy sends the status code configured via - // :ref:`status_on_error `, - // which defaults to ``403 Forbidden``. - DeniedHttpResponse error_response = 5; - } - - // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next - // filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. - // - :ref:`envoy.filters.network.ext_authz ` for network filter. - google.protobuf.Struct dynamic_metadata = 4; -} diff --git a/src/main/proto/envoy/service/cluster/v3/cds.proto b/src/main/proto/envoy/service/cluster/v3/cds.proto deleted file mode 100644 index bb34266..0000000 --- a/src/main/proto/envoy/service/cluster/v3/cds.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.service.cluster.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.cluster.v3"; -option java_outer_classname = "CdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3;clusterv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: CDS] - -// Return list of all clusters this proxy will load balance to. -service ClusterDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.cluster.v3.Cluster"; - - rpc StreamClusters(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc DeltaClusters(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc FetchClusters(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:clusters"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message CdsDummy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.CdsDummy"; -} diff --git a/src/main/proto/envoy/service/discovery/v2/ads.proto b/src/main/proto/envoy/service/discovery/v2/ads.proto deleted file mode 100644 index 7a77275..0000000 --- a/src/main/proto/envoy/service/discovery/v2/ads.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v2; - -import "envoy/api/v2/discovery.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v2"; -option java_outer_classname = "AdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Aggregated Discovery Service (ADS)] - -// Discovery services for endpoints, clusters, routes, -// and listeners are retained in the package `envoy.api.v2` for backwards -// compatibility with existing management servers. New development in discovery -// services should proceed in the package `envoy.service.discovery.v2`. - -// See https://github.com/envoyproxy/envoy-api#apis for a description of the role of -// ADS and how it is intended to be used by a management server. ADS requests -// have the same structure as their singleton xDS counterparts, but can -// multiplex many resource types on a single stream. The type_url in the -// DiscoveryRequest/DiscoveryResponse provides sufficient information to recover -// the multiplexed singleton APIs at the Envoy instance and management server. -service AggregatedDiscoveryService { - // This is a gRPC-only API. - rpc StreamAggregatedResources(stream api.v2.DiscoveryRequest) - returns (stream api.v2.DiscoveryResponse) { - } - - rpc DeltaAggregatedResources(stream api.v2.DeltaDiscoveryRequest) - returns (stream api.v2.DeltaDiscoveryResponse) { - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message AdsDummy { -} diff --git a/src/main/proto/envoy/service/discovery/v2/hds.proto b/src/main/proto/envoy/service/discovery/v2/hds.proto deleted file mode 100644 index 0507534..0000000 --- a/src/main/proto/envoy/service/discovery/v2/hds.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/health_check.proto"; -import "envoy/api/v2/endpoint/endpoint_components.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v2"; -option java_outer_classname = "HdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.health.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Health Discovery Service (HDS)] - -// HDS is Health Discovery Service. It compliments Envoy’s health checking -// service by designating this Envoy to be a healthchecker for a subset of hosts -// in the cluster. The status of these health checks will be reported to the -// management server, where it can be aggregated etc and redistributed back to -// Envoy through EDS. -service HealthDiscoveryService { - // 1. Envoy starts up and if its can_healthcheck option in the static - // bootstrap config is enabled, sends HealthCheckRequest to the management - // server. It supplies its capabilities (which protocol it can health check - // with, what zone it resides in, etc.). - // 2. In response to (1), the management server designates this Envoy as a - // healthchecker to health check a subset of all upstream hosts for a given - // cluster (for example upstream Host 1 and Host 2). It streams - // HealthCheckSpecifier messages with cluster related configuration for all - // clusters this Envoy is designated to health check. Subsequent - // HealthCheckSpecifier message will be sent on changes to: - // a. Endpoints to health checks - // b. Per cluster configuration change - // 3. Envoy creates a health probe based on the HealthCheck config and sends - // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck - // configuration Envoy waits upon the arrival of the probe response and - // looks at the content of the response to decide whether the endpoint is - // healthy or not. If a response hasn't been received within the timeout - // interval, the endpoint health status is considered TIMEOUT. - // 4. Envoy reports results back in an EndpointHealthResponse message. - // Envoy streams responses as often as the interval configured by the - // management server in HealthCheckSpecifier. - // 5. The management Server collects health statuses for all endpoints in the - // cluster (for all clusters) and uses this information to construct - // EndpointDiscoveryResponse messages. - // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load - // balances traffic to them without additional health checking. It may - // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection - // failed to a particular endpoint to account for health status propagation - // delay between HDS and EDS). - // By default, can_healthcheck is true. If can_healthcheck is false, Cluster - // configuration may not contain HealthCheck message. - // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above - // invariant? - // TODO(htuch): Add @amb67's diagram. - rpc StreamHealthCheck(stream HealthCheckRequestOrEndpointHealthResponse) - returns (stream HealthCheckSpecifier) { - } - - // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of - // request/response. Should we add an identifier to the HealthCheckSpecifier - // to bind with the response? - rpc FetchHealthCheck(HealthCheckRequestOrEndpointHealthResponse) returns (HealthCheckSpecifier) { - option (google.api.http).post = "/v2/discovery:health_check"; - option (google.api.http).body = "*"; - } -} - -// Defines supported protocols etc, so the management server can assign proper -// endpoints to healthcheck. -message Capability { - // Different Envoy instances may have different capabilities (e.g. Redis) - // and/or have ports enabled for different protocols. - enum Protocol { - HTTP = 0; - TCP = 1; - REDIS = 2; - } - - repeated Protocol health_check_protocols = 1; -} - -message HealthCheckRequest { - api.v2.core.Node node = 1; - - Capability capability = 2; -} - -message EndpointHealth { - api.v2.endpoint.Endpoint endpoint = 1; - - api.v2.core.HealthStatus health_status = 2; -} - -message EndpointHealthResponse { - repeated EndpointHealth endpoints_health = 1; -} - -message HealthCheckRequestOrEndpointHealthResponse { - oneof request_type { - HealthCheckRequest health_check_request = 1; - - EndpointHealthResponse endpoint_health_response = 2; - } -} - -message LocalityEndpoints { - api.v2.core.Locality locality = 1; - - repeated api.v2.endpoint.Endpoint endpoints = 2; -} - -// The cluster name and locality is provided to Envoy for the endpoints that it -// health checks to support statistics reporting, logging and debugging by the -// Envoy instance (outside of HDS). For maximum usefulness, it should match the -// same cluster structure as that provided by EDS. -message ClusterHealthCheck { - string cluster_name = 1; - - repeated api.v2.core.HealthCheck health_checks = 2; - - repeated LocalityEndpoints locality_endpoints = 3; -} - -message HealthCheckSpecifier { - repeated ClusterHealthCheck cluster_health_checks = 1; - - // The default is 1 second. - google.protobuf.Duration interval = 2; -} diff --git a/src/main/proto/envoy/service/discovery/v2/rtds.proto b/src/main/proto/envoy/service/discovery/v2/rtds.proto deleted file mode 100644 index 3a333ca..0000000 --- a/src/main/proto/envoy/service/discovery/v2/rtds.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v2"; -option java_outer_classname = "RtdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.runtime.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Runtime Discovery Service (RTDS)] -// RTDS :ref:`configuration overview ` - -// Discovery service for Runtime resources. -service RuntimeDiscoveryService { - option (envoy.annotations.resource).type = "envoy.service.discovery.v2.Runtime"; - - rpc StreamRuntime(stream api.v2.DiscoveryRequest) returns (stream api.v2.DiscoveryResponse) { - } - - rpc DeltaRuntime(stream api.v2.DeltaDiscoveryRequest) - returns (stream api.v2.DeltaDiscoveryResponse) { - } - - rpc FetchRuntime(api.v2.DiscoveryRequest) returns (api.v2.DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:runtime"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message RtdsDummy { -} - -// RTDS resource type. This describes a layer in the runtime virtual filesystem. -message Runtime { - // Runtime resource name. This makes the Runtime a self-describing xDS - // resource. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - google.protobuf.Struct layer = 2; -} diff --git a/src/main/proto/envoy/service/discovery/v2/sds.proto b/src/main/proto/envoy/service/discovery/v2/sds.proto deleted file mode 100644 index 6971388..0000000 --- a/src/main/proto/envoy/service/discovery/v2/sds.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v2; - -import "envoy/api/v2/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v2"; -option java_outer_classname = "SdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2;discoveryv2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.secret.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Secret Discovery Service (SDS)] - -service SecretDiscoveryService { - option (envoy.annotations.resource).type = "envoy.api.v2.auth.Secret"; - - rpc DeltaSecrets(stream api.v2.DeltaDiscoveryRequest) - returns (stream api.v2.DeltaDiscoveryResponse) { - } - - rpc StreamSecrets(stream api.v2.DiscoveryRequest) returns (stream api.v2.DiscoveryResponse) { - } - - rpc FetchSecrets(api.v2.DiscoveryRequest) returns (api.v2.DiscoveryResponse) { - option (google.api.http).post = "/v2/discovery:secrets"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message SdsDummy { -} diff --git a/src/main/proto/envoy/service/discovery/v3/ads.proto b/src/main/proto/envoy/service/discovery/v3/ads.proto deleted file mode 100644 index 50f2af4..0000000 --- a/src/main/proto/envoy/service/discovery/v3/ads.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v3"; -option java_outer_classname = "AdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3;discoveryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Aggregated Discovery Service (ADS)] - -// Discovery services for endpoints, clusters, routes, -// and listeners are retained in the package `envoy.api.v2` for backwards -// compatibility with existing management servers. New development in discovery -// services should proceed in the package `envoy.service.discovery.v2`. - -// See https://github.com/envoyproxy/envoy-api#apis for a description of the role of -// ADS and how it is intended to be used by a management server. ADS requests -// have the same structure as their singleton xDS counterparts, but can -// multiplex many resource types on a single stream. The type_url in the -// DiscoveryRequest/DiscoveryResponse provides sufficient information to recover -// the multiplexed singleton APIs at the Envoy instance and management server. -service AggregatedDiscoveryService { - // This is a gRPC-only API. - rpc StreamAggregatedResources(stream DiscoveryRequest) returns (stream DiscoveryResponse) { - } - - rpc DeltaAggregatedResources(stream DeltaDiscoveryRequest) - returns (stream DeltaDiscoveryResponse) { - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message AdsDummy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.AdsDummy"; -} diff --git a/src/main/proto/envoy/service/discovery/v3/discovery.proto b/src/main/proto/envoy/service/discovery/v3/discovery.proto deleted file mode 100644 index e1ce827..0000000 --- a/src/main/proto/envoy/service/discovery/v3/discovery.proto +++ /dev/null @@ -1,443 +0,0 @@ -syntax = "proto3"; - -package envoy.service.discovery.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/rpc/status.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.discovery.v3"; -option java_outer_classname = "DiscoveryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3;discoveryv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common discovery API components] - -// Specifies a resource to be subscribed to. -message ResourceLocator { - // The resource name to subscribe to. - string name = 1; - - // A set of dynamic parameters used to match against the dynamic parameter - // constraints on the resource. This allows clients to select between - // multiple variants of the same resource. - map dynamic_parameters = 2; -} - -// Specifies a concrete resource name. -message ResourceName { - // The name of the resource. - string name = 1; - - // Dynamic parameter constraints associated with this resource. To be used by client-side caches - // (including xDS proxies) when matching subscribed resource locators. - DynamicParameterConstraints dynamic_parameter_constraints = 2; -} - -// [#not-implemented-hide:] -// An error associated with a specific resource name, returned to the -// client by the server. -message ResourceError { - // The name of the resource. - ResourceName resource_name = 1; - - // The error reported for the resource. - google.rpc.Status error_detail = 2; -} - -// A DiscoveryRequest requests a set of versioned resources of the same type for -// a given Envoy node on some API. -// [#next-free-field: 8] -message DiscoveryRequest { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.DiscoveryRequest"; - - // The ``version_info`` provided in the request messages will be the ``version_info`` - // received with the most recent successfully processed response or empty on - // the first request. It is expected that no new request is sent after a - // response is received until the Envoy instance is ready to ACK/NACK the new - // configuration. ACK/NACK takes place by returning the new API config version - // as applied or the previous API config version respectively. Each ``type_url`` - // (see below) has an independent version associated with it. - string version_info = 1; - - // The node making the request. - config.core.v3.Node node = 2; - - // List of resources to subscribe to, e.g. list of cluster names or a route - // configuration name. If this is empty, all resources for the API are - // returned. LDS/CDS may have empty ``resource_names``, which will cause all - // resources for the Envoy instance to be returned. The LDS and CDS responses - // will then imply a number of resources that need to be fetched via EDS/RDS, - // which will be explicitly enumerated in ``resource_names``. - repeated string resource_names = 3; - - // [#not-implemented-hide:] - // Alternative to ``resource_names`` field that allows specifying dynamic - // parameters along with each resource name. Clients that populate this - // field must be able to handle responses from the server where resources - // are wrapped in a Resource message. - // - // .. note:: - // It is legal for a request to have some resources listed - // in ``resource_names`` and others in ``resource_locators``. - // - repeated ResourceLocator resource_locators = 7; - - // Type of the resource that is being requested, e.g. - // ``type.googleapis.com/envoy.api.v2.ClusterLoadAssignment``. This is implicit - // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is - // required for ADS. - string type_url = 4; - - // nonce corresponding to ``DiscoveryResponse`` being ACK/NACKed. See above - // discussion on ``version_info`` and the ``DiscoveryResponse`` nonce comment. This - // may be empty only if: - // - // * This is a non-persistent-stream xDS such as HTTP, or - // * The client has not yet accepted an update in this xDS stream (unlike - // delta, where it is populated only for new explicit ACKs). - // - string response_nonce = 5; - - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The ``message`` field in ``error_details`` provides the Envoy - // internal exception related to the failure. It is only intended for consumption during manual - // debugging, the string provided is not guaranteed to be stable across Envoy versions. - google.rpc.Status error_detail = 6; -} - -// [#next-free-field: 8] -message DiscoveryResponse { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.DiscoveryResponse"; - - // The version of the response data. - string version_info = 1; - - // The response resources. These resources are typed and depend on the API being called. - repeated google.protobuf.Any resources = 2; - - // [#not-implemented-hide:] - // Canary is used to support two Envoy command line flags: - // - // * ``--terminate-on-canary-transition-failure``. When set, Envoy is able to - // terminate if it detects that configuration is stuck at canary. Consider - // this example sequence of updates: - // - // * Management server applies a canary config successfully. - // * Management server rolls back to a production config. - // * Envoy rejects the new production config. - // - // Since there is no sensible way to continue receiving configuration - // updates, Envoy will then terminate and apply production config from a - // clean slate. - // - // * ``--dry-run-canary``. When set, a canary response will never be applied, only - // validated via a dry run. - // - bool canary = 3; - - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the ``type_url`` in the 'resources' repeated Any (if non-empty). - string type_url = 4; - - // For gRPC based subscriptions, the nonce provides a way to explicitly ack a - // specific ``DiscoveryResponse`` in a following ``DiscoveryRequest``. Additional - // messages may have been sent by Envoy to the management server for the - // previous version on the stream prior to this ``DiscoveryResponse``, that were - // unprocessed at response send time. The nonce allows the management server - // to ignore any further ``DiscoveryRequests`` for the previous version until a - // ``DiscoveryRequest`` bearing the nonce. The nonce is optional and is not - // required for non-stream based xDS implementations. - string nonce = 5; - - // The control plane instance that sent the response. - config.core.v3.ControlPlane control_plane = 6; - - // [#not-implemented-hide:] - // Errors associated with specific resources. Clients are expected to - // remember the most recent error for a given resource across responses; - // the error condition is not considered to be cleared until a response is - // received that contains the resource in the 'resources' field. - repeated ResourceError resource_errors = 7; -} - -// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC -// endpoint for Delta xDS. -// -// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full -// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a -// diff to the state of a xDS client. -// In Delta XDS there are per-resource versions, which allow tracking state at -// the resource granularity. -// An xDS Delta session is always in the context of a gRPC bidirectional -// stream. This allows the xDS server to keep track of the state of xDS clients -// connected to it. -// -// In Delta xDS the nonce field is required and used to pair -// ``DeltaDiscoveryResponse`` to a ``DeltaDiscoveryRequest`` ACK or NACK. -// Optionally, a response message level ``system_version_info`` is present for -// debugging purposes only. -// -// ``DeltaDiscoveryRequest`` plays two independent roles. Any ``DeltaDiscoveryRequest`` -// can be either or both of: -// -// * Informing the server of what resources the client has gained/lost interest in -// (using ``resource_names_subscribe`` and ``resource_names_unsubscribe``), or -// * (N)ACKing an earlier resource update from the server (using ``response_nonce``, -// with presence of ``error_detail`` making it a NACK). -// -// Additionally, the first message (for a given ``type_url``) of a reconnected gRPC stream -// has a third role: informing the server of the resources (and their versions) -// that the client already possesses, using the ``initial_resource_versions`` field. -// -// As with state-of-the-world, when multiple resource types are multiplexed (ADS), -// all requests/acknowledgments/updates are logically walled off by ``type_url``: -// a Cluster ACK exists in a completely separate world from a prior Route NACK. -// In particular, ``initial_resource_versions`` being sent at the "start" of every -// gRPC stream actually entails a message for each ``type_url``, each with its own -// ``initial_resource_versions``. -// [#next-free-field: 10] -message DeltaDiscoveryRequest { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.DeltaDiscoveryRequest"; - - // The node making the request. - config.core.v3.Node node = 1; - - // Type of the resource that is being requested, e.g. - // ``type.googleapis.com/envoy.api.v2.ClusterLoadAssignment``. This does not need to be set if - // resources are only referenced via ``xds_resource_subscribe`` and - // ``xds_resources_unsubscribe``. - string type_url = 2; - - // DeltaDiscoveryRequests allow the client to add or remove individual - // resources to the set of tracked resources in the context of a stream. - // All resource names in the ``resource_names_subscribe`` list are added to the - // set of tracked resources and all resource names in the ``resource_names_unsubscribe`` - // list are removed from the set of tracked resources. - // - // *Unlike* state-of-the-world xDS, an empty ``resource_names_subscribe`` or - // ``resource_names_unsubscribe`` list simply means that no resources are to be - // added or removed to the resource list. - // *Like* state-of-the-world xDS, the server must send updates for all tracked - // resources, but can also send updates for resources the client has not subscribed to. - // - // .. note:: - // The server must respond with all resources listed in ``resource_names_subscribe``, - // even if it believes the client has the most recent version of them. The reason: - // the client may have dropped them, but then regained interest before it had a chance - // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd. - // - // These two fields can be set in any ``DeltaDiscoveryRequest``, including ACKs - // and ``initial_resource_versions``. - // - // A list of Resource names to add to the list of tracked resources. - repeated string resource_names_subscribe = 3; - - // A list of Resource names to remove from the list of tracked resources. - repeated string resource_names_unsubscribe = 4; - - // [#not-implemented-hide:] - // Alternative to ``resource_names_subscribe`` field that allows specifying dynamic parameters - // along with each resource name. - // - // .. note:: - // It is legal for a request to have some resources listed - // in ``resource_names_subscribe`` and others in ``resource_locators_subscribe``. - // - repeated ResourceLocator resource_locators_subscribe = 8; - - // [#not-implemented-hide:] - // Alternative to ``resource_names_unsubscribe`` field that allows specifying dynamic parameters - // along with each resource name. - // - // .. note:: - // It is legal for a request to have some resources listed - // in ``resource_names_unsubscribe`` and others in ``resource_locators_unsubscribe``. - // - repeated ResourceLocator resource_locators_unsubscribe = 9; - - // Informs the server of the versions of the resources the xDS client knows of, to enable the - // client to continue the same logical xDS session even in the face of gRPC stream reconnection. - // It will not be populated: - // - // * In the very first stream of a session, since the client will not yet have any resources. - // * In any message after the first in a stream (for a given ``type_url``), since the server will - // already be correctly tracking the client's state. - // - // (In ADS, the first message ``of each type_url`` of a reconnected stream populates this map.) - // The map's keys are names of xDS resources known to the xDS client. - // The map's values are opaque resource versions. - map initial_resource_versions = 5; - - // When the ``DeltaDiscoveryRequest`` is a ACK or NACK message in response - // to a previous ``DeltaDiscoveryResponse``, the ``response_nonce`` must be the - // nonce in the ``DeltaDiscoveryResponse``. - // Otherwise (unlike in ``DiscoveryRequest``) ``response_nonce`` must be omitted. - string response_nonce = 6; - - // This is populated when the previous :ref:`DiscoveryResponse ` - // failed to update configuration. The ``message`` field in ``error_details`` - // provides the Envoy internal exception related to the failure. - google.rpc.Status error_detail = 7; -} - -// [#next-free-field: 10] -message DeltaDiscoveryResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.api.v2.DeltaDiscoveryResponse"; - - // The version of the response data (used for debugging). - string system_version_info = 1; - - // The response resources. These are typed resources, whose types must match - // the ``type_url`` field. - repeated Resource resources = 2; - - // field id 3 IS available! - - // Type URL for resources. Identifies the xDS API when muxing over ADS. - // Must be consistent with the ``type_url`` in the Any within 'resources' if 'resources' is non-empty. - string type_url = 4; - - // Resource names of resources that have been deleted and to be removed from the xDS Client. - // Removed resources for missing resources can be ignored. - repeated string removed_resources = 6; - - // Alternative to ``removed_resources`` that allows specifying which variant of - // a resource is being removed. This variant must be used for any resource - // for which dynamic parameter constraints were sent to the client. - repeated ResourceName removed_resource_names = 8; - - // The nonce provides a way for ``DeltaDiscoveryRequests`` to uniquely - // reference a ``DeltaDiscoveryResponse`` when (N)ACKing. The nonce is required. - string nonce = 5; - - // [#not-implemented-hide:] - // The control plane instance that sent the response. - config.core.v3.ControlPlane control_plane = 7; - - // [#not-implemented-hide:] - // Errors associated with specific resources. - // - // .. note:: - // A resource in this field with a status of NOT_FOUND should be treated the same as - // a resource listed in the ``removed_resources`` or ``removed_resource_names`` fields. - // - repeated ResourceError resource_errors = 9; -} - -// A set of dynamic parameter constraints associated with a variant of an individual xDS resource. -// These constraints determine whether the resource matches a subscription based on the set of -// dynamic parameters in the subscription, as specified in the -// :ref:`ResourceLocator.dynamic_parameters ` -// field. This allows xDS implementations (clients, servers, and caching proxies) to determine -// which variant of a resource is appropriate for a given client. -message DynamicParameterConstraints { - // A single constraint for a given key. - message SingleConstraint { - message Exists { - } - - // The key to match against. - string key = 1; - - oneof constraint_type { - option (validate.required) = true; - - // Matches this exact value. - string value = 2; - - // Key is present (matches any value except for the key being absent). - // This allows setting a default constraint for clients that do - // not send a key at all, while there may be other clients that need - // special configuration based on that key. - Exists exists = 3; - } - } - - message ConstraintList { - repeated DynamicParameterConstraints constraints = 1; - } - - oneof type { - // A single constraint to evaluate. - SingleConstraint constraint = 1; - - // A list of constraints that match if any one constraint in the list - // matches. - ConstraintList or_constraints = 2; - - // A list of constraints that must all match. - ConstraintList and_constraints = 3; - - // The inverse (NOT) of a set of constraints. - DynamicParameterConstraints not_constraints = 4; - } -} - -// [#next-free-field: 10] -message Resource { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Resource"; - - // Cache control properties for the resource. - // [#not-implemented-hide:] - message CacheControl { - // If true, xDS proxies may not cache this resource. - // - // .. note:: - // This does not apply to clients other than xDS proxies, which must cache resources - // for their own use, regardless of the value of this field. - // - bool do_not_cache = 1; - } - - // The resource's name, to distinguish it from others of the same type of resource. - // Only one of ``name`` or ``resource_name`` may be set. - string name = 3; - - // Alternative to the ``name`` field, to be used when the server supports - // multiple variants of the named resource that are differentiated by - // dynamic parameter constraints. - // Only one of ``name`` or ``resource_name`` may be set. - ResourceName resource_name = 8; - - // The aliases are a list of other names that this resource can go by. - repeated string aliases = 4; - - // The resource level version. It allows xDS to track the state of individual - // resources. - string version = 1; - - // The resource being tracked. - google.protobuf.Any resource = 2; - - // Time-to-live value for the resource. For each resource, a timer is started. The timer is - // reset each time the resource is received with a new TTL. If the resource is received with - // no TTL set, the timer is removed for the resource. Upon expiration of the timer, the - // configuration for the resource will be removed. - // - // The TTL can be refreshed or changed by sending a response that doesn't change the resource - // version. In this case the ``resource`` field does not need to be populated, which allows for - // light-weight "heartbeat" updates to keep a resource with a TTL alive. - // - // The TTL feature is meant to support configurations that should be removed in the event of - // a management server failure. For example, the feature may be used for fault injection - // testing where the fault injection should be terminated in the event that Envoy loses contact - // with the management server. - google.protobuf.Duration ttl = 6; - - // Cache control properties for the resource. - // [#not-implemented-hide:] - CacheControl cache_control = 7; - - // The Metadata field can be used to provide additional information for the resource. - // E.g. the trace data for debugging. - config.core.v3.Metadata metadata = 9; -} diff --git a/src/main/proto/envoy/service/endpoint/v3/eds.proto b/src/main/proto/envoy/service/endpoint/v3/eds.proto deleted file mode 100644 index d156c44..0000000 --- a/src/main/proto/envoy/service/endpoint/v3/eds.proto +++ /dev/null @@ -1,45 +0,0 @@ -syntax = "proto3"; - -package envoy.service.endpoint.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.endpoint.v3"; -option java_outer_classname = "EdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3;endpointv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: EDS] -// Endpoint discovery :ref:`architecture overview ` - -service EndpointDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.endpoint.v3.ClusterLoadAssignment"; - - // The resource_names field in DiscoveryRequest specifies a list of clusters - // to subscribe to updates for. - rpc StreamEndpoints(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc DeltaEndpoints(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc FetchEndpoints(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:endpoints"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message EdsDummy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.EdsDummy"; -} diff --git a/src/main/proto/envoy/service/endpoint/v3/leds.proto b/src/main/proto/envoy/service/endpoint/v3/leds.proto deleted file mode 100644 index e9e578a..0000000 --- a/src/main/proto/envoy/service/endpoint/v3/leds.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.service.endpoint.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.endpoint.v3"; -option java_outer_classname = "LedsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3;endpointv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#not-implemented-hide:] -// [#protodoc-title: LEDS] -// Locality-Endpoint discovery -// [#comment:TODO(adisuissa): Link to unified matching docs: -// :ref:`architecture overview`] - -service LocalityEndpointDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.endpoint.v3.LbEndpoint"; - - // State-of-the-World (DiscoveryRequest) and REST are not supported. - - // The resource_names_subscribe resource_names_unsubscribe fields in DeltaDiscoveryRequest - // specify a list of glob collections to subscribe to updates for. - rpc DeltaLocalityEndpoints(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message LedsDummy { -} diff --git a/src/main/proto/envoy/service/event_reporting/v2alpha/event_reporting_service.proto b/src/main/proto/envoy/service/event_reporting/v2alpha/event_reporting_service.proto deleted file mode 100644 index 63ed03e..0000000 --- a/src/main/proto/envoy/service/event_reporting/v2alpha/event_reporting_service.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package envoy.service.event_reporting.v2alpha; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.event_reporting.v2alpha"; -option java_outer_classname = "EventReportingServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/event_reporting/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.service.event_reporting.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: gRPC Event Reporting Service] - -// [#not-implemented-hide:] -// Service for streaming different types of events from Envoy to a server. The examples of -// such events may be health check or outlier detection events. -service EventReportingService { - // Envoy will connect and send StreamEventsRequest messages forever. - // The management server may send StreamEventsResponse to configure event stream. See below. - // This API is designed for high throughput with the expectation that it might be lossy. - rpc StreamEvents(stream StreamEventsRequest) returns (stream StreamEventsResponse) { - } -} - -// [#not-implemented-hide:] -// An events envoy sends to the management server. -message StreamEventsRequest { - message Identifier { - // The node sending the event messages over the stream. - api.v2.core.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier identifier = 1; - - // Batch of events. When the stream is already active, it will be the events occurred - // since the last message had been sent. If the server receives unknown event type, it should - // silently ignore it. - // - // The following events are supported: - // - // * :ref:`HealthCheckEvent ` - // * :ref:`OutlierDetectionEvent ` - repeated google.protobuf.Any events = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// [#not-implemented-hide:] -// The management server may send envoy a StreamEventsResponse to tell which events the server -// is interested in. In future, with aggregated event reporting service, this message will -// contain, for example, clusters the envoy should send events for, or event types the server -// wants to process. -message StreamEventsResponse { -} diff --git a/src/main/proto/envoy/service/event_reporting/v3/event_reporting_service.proto b/src/main/proto/envoy/service/event_reporting/v3/event_reporting_service.proto deleted file mode 100644 index 1ebb01c..0000000 --- a/src/main/proto/envoy/service/event_reporting/v3/event_reporting_service.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package envoy.service.event_reporting.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.event_reporting.v3"; -option java_outer_classname = "EventReportingServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/event_reporting/v3;event_reportingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: gRPC Event Reporting Service] - -// [#not-implemented-hide:] -// Service for streaming different types of events from Envoy to a server. The examples of -// such events may be health check or outlier detection events. -service EventReportingService { - // Envoy will connect and send StreamEventsRequest messages forever. - // The management server may send StreamEventsResponse to configure event stream. See below. - // This API is designed for high throughput with the expectation that it might be lossy. - rpc StreamEvents(stream StreamEventsRequest) returns (stream StreamEventsResponse) { - } -} - -// [#not-implemented-hide:] -// An events envoy sends to the management server. -message StreamEventsRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.event_reporting.v2alpha.StreamEventsRequest"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.event_reporting.v2alpha.StreamEventsRequest.Identifier"; - - // The node sending the event messages over the stream. - config.core.v3.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data that will only be sent in the first message on the stream. This is effectively - // structured metadata and is a performance optimization. - Identifier identifier = 1; - - // Batch of events. When the stream is already active, it will be the events occurred - // since the last message had been sent. If the server receives unknown event type, it should - // silently ignore it. - // - // The following events are supported: - // - // * :ref:`HealthCheckEvent ` - // * :ref:`OutlierDetectionEvent ` - repeated google.protobuf.Any events = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// [#not-implemented-hide:] -// The management server may send envoy a StreamEventsResponse to tell which events the server -// is interested in. In future, with aggregated event reporting service, this message will -// contain, for example, clusters the envoy should send events for, or event types the server -// wants to process. -message StreamEventsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.event_reporting.v2alpha.StreamEventsResponse"; -} diff --git a/src/main/proto/envoy/service/ext_proc/v3/external_processor.proto b/src/main/proto/envoy/service/ext_proc/v3/external_processor.proto deleted file mode 100644 index 1c033c0..0000000 --- a/src/main/proto/envoy/service/ext_proc/v3/external_processor.proto +++ /dev/null @@ -1,533 +0,0 @@ -syntax = "proto3"; - -package envoy.service.ext_proc.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto"; -import "envoy/type/v3/http_status.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "xds/annotations/v3/status.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.ext_proc.v3"; -option java_outer_classname = "ExternalProcessorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/ext_proc/v3;ext_procv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: External processing service] - -// A service that can access and modify HTTP requests and responses -// as part of a filter chain. -// The overall external processing protocol works like this: -// -// 1. The data plane sends to the service information about the HTTP request. -// 2. The service sends back a ProcessingResponse message that directs -// the data plane to either stop processing, continue without it, or send -// it the next chunk of the message body. -// 3. If so requested, the data plane sends the server the message body in -// chunks, or the entire body at once. In either case, the server may send -// back a ProcessingResponse for each message it receives, or wait for -// a certain amount of body chunks received before streaming back the -// ProcessingResponse messages. -// 4. If so requested, the data plane sends the server the HTTP trailers, -// and the server sends back a ProcessingResponse. -// 5. At this point, request processing is done, and we pick up again -// at step 1 when the data plane receives a response from the upstream -// server. -// 6. At any point above, if the server closes the gRPC stream cleanly, -// then the data plane proceeds without consulting the server. -// 7. At any point above, if the server closes the gRPC stream with an error, -// then the data plane returns a 500 error to the client, unless the filter -// was configured to ignore errors. -// -// In other words, the process is a request/response conversation, but -// using a gRPC stream to make it easier for the server to -// maintain state. -service ExternalProcessor { - // This begins the bidirectional stream that the data plane will use to - // give the server control over what the filter does. The actual - // protocol is described by the ProcessingRequest and ProcessingResponse - // messages below. - rpc Process(stream ProcessingRequest) returns (stream ProcessingResponse) { - } -} - -// This message specifies the filter protocol configurations which will be sent to the ext_proc -// server in a :ref:`ProcessingRequest `. -// If the server does not support these protocol configurations, it may choose to close the gRPC stream. -// If the server supports these protocol configurations, it should respond based on the API specifications. -message ProtocolConfiguration { - // Specify the filter configuration :ref:`request_body_mode - // ` - envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode request_body_mode = 1 - [(validate.rules).enum = {defined_only: true}]; - - // Specify the filter configuration :ref:`response_body_mode - // ` - envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode response_body_mode = 2 - [(validate.rules).enum = {defined_only: true}]; - - // Specify the filter configuration :ref:`send_body_without_waiting_for_header_response - // ` - // If the client is waiting for a header response from the server, setting ``true`` means the client will send body to the server - // as they arrive. Setting ``false`` means the client will buffer the arrived data and not send it to the server immediately. - bool send_body_without_waiting_for_header_response = 3; -} - -// This represents the different types of messages that the data plane can send -// to an external processing server. -// [#next-free-field: 12] -message ProcessingRequest { - reserved 1; - - reserved "async_mode"; - - // Each request message will include one of the following sub-messages. Which - // ones are set for a particular HTTP request/response depend on the - // processing mode. - oneof request { - option (validate.required) = true; - - // Information about the HTTP request headers, as well as peer info and additional - // properties. Unless ``observability_mode`` is ``true``, the server must send back a - // HeaderResponse message, an ImmediateResponse message, or close the stream. - HttpHeaders request_headers = 2; - - // Information about the HTTP response headers, as well as peer info and additional - // properties. Unless ``observability_mode`` is ``true``, the server must send back a - // HeaderResponse message or close the stream. - HttpHeaders response_headers = 3; - - // A chunk of the HTTP request body. Unless ``observability_mode`` is true, the server must send back - // a BodyResponse message, an ImmediateResponse message, or close the stream. - HttpBody request_body = 4; - - // A chunk of the HTTP response body. Unless ``observability_mode`` is ``true``, the server must send back - // a BodyResponse message or close the stream. - HttpBody response_body = 5; - - // The HTTP trailers for the request path. Unless ``observability_mode`` is ``true``, the server - // must send back a TrailerResponse message or close the stream. - // - // This message is only sent if the trailers processing mode is set to ``SEND`` and - // the original downstream request has trailers. - HttpTrailers request_trailers = 6; - - // The HTTP trailers for the response path. Unless ``observability_mode`` is ``true``, the server - // must send back a TrailerResponse message or close the stream. - // - // This message is only sent if the trailers processing mode is set to ``SEND`` and - // the original upstream response has trailers. - HttpTrailers response_trailers = 7; - } - - // Dynamic metadata associated with the request. - config.core.v3.Metadata metadata_context = 8; - - // The values of properties selected by the ``request_attributes`` - // or ``response_attributes`` list in the configuration. Each entry - // in the list is populated from the standard - // :ref:`attributes ` supported in the data plane. - map attributes = 9; - - // Specify whether the filter that sent this request is running in :ref:`observability_mode - // ` - // and defaults to false. - // - // * A value of ``false`` indicates that the server must respond - // to this message by either sending back a matching ProcessingResponse message, - // or by closing the stream. - // * A value of ``true`` indicates that the server should not respond to this message, as any - // responses will be ignored. However, it may still close the stream to indicate that no more messages - // are needed. - // - bool observability_mode = 10; - - // Specify the filter protocol configurations to be sent to the server. - // ``protocol_config`` is only encoded in the first ``ProcessingRequest`` message from the client to the server. - ProtocolConfiguration protocol_config = 11; -} - -// This represents the different types of messages the server may send back to the data plane -// when the ``observability_mode`` field in the received ProcessingRequest is set to false. -// -// * If the corresponding ``BodySendMode`` in the -// :ref:`processing_mode ` -// is not set to ``FULL_DUPLEX_STREAMED``, then for every received ProcessingRequest, -// the server must send back exactly one ProcessingResponse message. -// * If it is set to ``FULL_DUPLEX_STREAMED``, the server must follow the API defined -// for this mode to send the ProcessingResponse messages. -// [#next-free-field: 13] -message ProcessingResponse { - // The response type that is sent by the server. - oneof response { - option (validate.required) = true; - - // The server must send back this message in response to a message with the - // ``request_headers`` field set. - HeadersResponse request_headers = 1; - - // The server must send back this message in response to a message with the - // ``response_headers`` field set. - HeadersResponse response_headers = 2; - - // The server must send back this message in response to a message with - // the ``request_body`` field set. - BodyResponse request_body = 3; - - // The server must send back this message in response to a message with - // the ``response_body`` field set. - BodyResponse response_body = 4; - - // The server must send back this message in response to a message with - // the ``request_trailers`` field set. - TrailersResponse request_trailers = 5; - - // The server must send back this message in response to a message with - // the ``response_trailers`` field set. - TrailersResponse response_trailers = 6; - - // If specified, attempt to create a locally generated response, send it - // downstream, and stop processing additional filters and ignore any - // additional messages received from the remote server for this request or - // response. If a response has already started -- for example, if this - // message is sent response to a ``response_body`` message -- then - // this will either ship the reply directly to the downstream codec, - // or reset the stream. - ImmediateResponse immediate_response = 7; - - // The server sends back this message to initiate or continue local response streaming. - // The server must initiate local response streaming with the ``headers_response`` in response to a ProcessingRequest - // with the ``request_headers`` only. - // The server may follow up with multiple messages containing ``body_response``. The server must indicate - // end of stream by setting ``end_of_stream`` to ``true`` in the ``headers_response`` - // or ``body_response`` message or by sending a ``trailers_response`` message. - // The client may send a ``request_body`` or ``request_trailers`` to the server depending on configuration. - // The streaming local response can only be sent when the ``request_header_mode`` in the filter - // :ref:`processing_mode ` - // is set to ``SEND``. The ext_proc server should not send StreamedImmediateResponse if it did not observe request headers, - // as it will result in the race with the upstream server response and reset of the client request. - // Presently only the FULL_DUPLEX_STREAMED or NONE body modes are supported. - StreamedImmediateResponse streamed_immediate_response = 11; - } - - // Optional metadata that will be emitted as dynamic metadata to be consumed by - // following filters. This metadata will be placed in the namespace(s) specified by the top-level - // field name(s) of the struct. - google.protobuf.Struct dynamic_metadata = 8; - - // Override how parts of the HTTP request and response are processed - // for the duration of this particular request/response only. Servers - // may use this to intelligently control how requests are processed - // based on the headers and other metadata that they see. - // This field is only applicable when servers responding to the header requests. - // If it is set in the response to the body or trailer requests, it will be ignored by the data plane. - // It is also ignored by the data plane when the ext_proc filter config - // :ref:`allow_mode_override - // ` - // is set to false, or - // :ref:`send_body_without_waiting_for_header_response - // ` - // is set to true. - envoy.extensions.filters.http.ext_proc.v3.ProcessingMode mode_override = 9; - - // [#not-implemented-hide:] - // Used only in ``FULL_DUPLEX_STREAMED`` and ``GRPC`` body send modes. - // Instructs the data plane to stop sending body data and to send a - // half-close on the ext_proc stream. The ext_proc server should then echo - // back all subsequent body contents as-is until it sees the client's - // half-close, at which point the ext_proc server can terminate the stream - // with an OK status. This provides a safe way for the ext_proc server - // to indicate that it does not need to see the rest of the stream; - // without this, the ext_proc server could not terminate the stream - // early, because it would wind up dropping any body contents that the - // client had already sent before it saw the ext_proc stream termination. - bool request_drain = 12; - - // When ext_proc server receives a request message, in case it needs more - // time to process the message, it sends back a ProcessingResponse message - // with a new timeout value. When the data plane receives this response - // message, it ignores other fields in the response, just stop the original - // timer, which has the timeout value specified in - // :ref:`message_timeout - // ` - // and start a new timer with this ``override_message_timeout`` value and keep the - // data plane ext_proc filter state machine intact. - // Has to be >= 1ms and <= - // :ref:`max_message_timeout ` - // Such message can be sent at most once in a particular data plane ext_proc filter processing state. - // To enable this API, one has to set ``max_message_timeout`` to a number >= 1ms. - google.protobuf.Duration override_message_timeout = 10; -} - -// The following are messages that are sent to the server. - -// This message is sent to the external server when the HTTP request and responses -// are first received. -message HttpHeaders { - // The HTTP request headers. All header keys will be - // lower-cased, because HTTP header keys are case-insensitive. - // The header value is encoded in the - // :ref:`raw_value ` field. - config.core.v3.HeaderMap headers = 1; - - // [#not-implemented-hide:] - // This field is deprecated and not implemented. Attributes will be sent in - // the top-level :ref:`attributes attributes = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // If ``true``, then there is no message body associated with this - // request or response. - bool end_of_stream = 3; -} - -// This message is sent to the external server when the HTTP request and -// response bodies are received. -message HttpBody { - // The contents of the body in the HTTP request/response. Note that in - // streaming mode multiple ``HttpBody`` messages may be sent. - // - // In ``GRPC`` body send mode, a separate ``HttpBody`` message will be - // sent for each message in the gRPC stream. - bytes body = 1; - - // If ``true``, this will be the last ``HttpBody`` message that will be sent and no - // trailers will be sent for the current request/response. - bool end_of_stream = 2; - - // This field is used in ``GRPC`` body send mode when ``end_of_stream`` is - // true and ``body`` is empty. Those values would normally indicate an - // empty message on the stream with the end-of-stream bit set. - // However, if the half-close happens after the last message on the - // stream was already sent, then this field will be true to indicate an - // end-of-stream with *no* message (as opposed to an empty message). - bool end_of_stream_without_message = 3; - - // This field is used in ``GRPC`` body send mode to indicate whether - // the message is compressed. This will never be set to true by gRPC - // but may be set to true by a proxy like Envoy. - bool grpc_message_compressed = 4; -} - -// This message is sent to the external server when the HTTP request and -// response trailers are received. -message HttpTrailers { - // The header value is encoded in the - // :ref:`raw_value ` field. - config.core.v3.HeaderMap trailers = 1; -} - -// The following are messages that may be sent back by the server. - -// This message is sent by the external server to the data plane after ``HttpHeaders`` was -// sent to it. -message HeadersResponse { - // Details the modifications (if any) to be made by the data plane to the current - // request/response. - CommonResponse response = 1; -} - -// This message is sent by the external server to the data plane after ``HttpBody`` was -// sent to it. -message BodyResponse { - // Details the modifications (if any) to be made by the data plane to the current - // request/response. - CommonResponse response = 1; -} - -// This message is sent by the external server to the data plane after ``HttpTrailers`` was -// sent to it. -message TrailersResponse { - // Details the modifications (if any) to be made by the data plane to the current - // request/response trailers. - HeaderMutation header_mutation = 1; -} - -// This message is sent by the external server to the data plane after ``HttpHeaders`` -// to initiate local response streaming. The server may follow up with multiple messages containing ``body_response``. -// The server must indicate end of stream by setting ``end_of_stream`` to ``true`` in the ``headers_response`` -// or ``body_response`` message or by sending a ``trailers_response`` message. -message StreamedImmediateResponse { - oneof response { - // Response headers to be sent downstream. The ":status" header must be set. - HttpHeaders headers_response = 1; - - // Response body to be sent downstream. - StreamedBodyResponse body_response = 2; - - // Response trailers to be sent downstream. - config.core.v3.HeaderMap trailers_response = 3; - } -} - -// This message contains common fields between header and body responses. -// [#next-free-field: 6] -message CommonResponse { - // The status of the response. - enum ResponseStatus { - // Apply the mutation instructions in this message to the - // request or response, and then continue processing the filter - // stream as normal. This is the default. - CONTINUE = 0; - - // Apply the specified header mutation, replace the body with the body - // specified in the body mutation (if present), and do not send any - // further messages for this request or response even if the processing - // mode is configured to do so. - // - // When used in response to a request_headers or response_headers message, - // this status makes it possible to either completely replace the body - // while discarding the original body, or to add a body to a message that - // formerly did not have one. - // - // In other words, this response makes it possible to turn an HTTP GET - // into a POST, PUT, or PATCH. - // - // Not supported if the body send mode is ``GRPC``. - CONTINUE_AND_REPLACE = 1; - } - - // If set, provide additional direction on how the data plane should - // handle the rest of the HTTP filter chain. - ResponseStatus status = 1 [(validate.rules).enum = {defined_only: true}]; - - // Instructions on how to manipulate the headers. When responding to an - // HttpBody request, header mutations will only take effect if - // the current processing mode for the body is BUFFERED. - HeaderMutation header_mutation = 2; - - // Replace the body of the last message sent to the remote server on this - // stream. If responding to an HttpBody request, simply replace or clear - // the body chunk that was sent with that request. Body mutations may take - // effect in response either to ``header`` or ``body`` messages. When it is - // in response to ``header`` messages, it only take effect if the - // :ref:`status ` - // is set to CONTINUE_AND_REPLACE. - BodyMutation body_mutation = 3; - - // [#not-implemented-hide:] - // Add new trailers to the message. This may be used when responding to either a - // HttpHeaders or HttpBody message, but only if this message is returned - // along with the CONTINUE_AND_REPLACE status. - // The header value is encoded in the - // :ref:`raw_value ` field. - config.core.v3.HeaderMap trailers = 4; - - // Clear the route cache for the current client request. This is necessary - // if the remote server modified headers that are used to calculate the route. - // This field is ignored in the response direction. This field is also ignored - // if the data plane ext_proc filter is in the upstream filter chain. - bool clear_route_cache = 5; -} - -// This message causes the filter to attempt to create a locally -// generated response, send it downstream, stop processing -// additional filters, and ignore any additional messages received -// from the remote server for this request or response. If a response -// has already started, then this will either ship the reply directly -// to the downstream codec, or reset the stream. -// [#next-free-field: 6] -message ImmediateResponse { - // The response code to return. - type.v3.HttpStatus status = 1 [(validate.rules).message = {required: true}]; - - // Apply changes to the default headers, which will include content-type. - HeaderMutation headers = 2; - - // The message body to return with the response which is sent using the - // text/plain content type, or encoded in the grpc-message header. - bytes body = 3; - - // If set, then include a gRPC status trailer. - GrpcStatus grpc_status = 4; - - // A string detailing why this local reply was sent, which may be included - // in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS% - // command operator field for use in access logging). - string details = 5; -} - -// This message specifies a gRPC status for an ImmediateResponse message. -message GrpcStatus { - // The actual gRPC status. - uint32 status = 1; -} - -// Change HTTP headers or trailers by appending, replacing, or removing -// headers. -message HeaderMutation { - // Add or replace HTTP headers. Attempts to set the value of - // any ``x-envoy`` header, and attempts to set the ``:method``, - // ``:authority``, ``:scheme``, or ``host`` headers will be ignored. - // The header value is encoded in the - // :ref:`raw_value ` field. - repeated config.core.v3.HeaderValueOption set_headers = 1; - - // Remove these HTTP headers. Attempts to remove system headers -- - // any header starting with ``:``, plus ``host`` -- will be ignored. - repeated string remove_headers = 2; -} - -// The body response message corresponding to ``FULL_DUPLEX_STREAMED`` or ``GRPC`` body modes. -message StreamedBodyResponse { - // In ``FULL_DUPLEX_STREAMED`` body send mode, contains the body response chunk that will be - // passed to the upstream/downstream by the data plane. In ``GRPC`` body send mode, contains - // a serialized gRPC message to be passed to the upstream/downstream by the data plane. - bytes body = 1; - - // The server sets this flag to true if it has received a body request with - // :ref:`end_of_stream ` set to true, - // and this is the last chunk of body responses. - // Note that in ``GRPC`` body send mode, this allows the ext_proc - // server to tell the data plane to send a half close after a client - // message, which will result in discarding any other messages sent by - // the client application. - bool end_of_stream = 2; - - // This field is used in ``GRPC`` body send mode when ``end_of_stream`` is - // true and ``body`` is empty. Those values would normally indicate an - // empty message on the stream with the end-of-stream bit set. - // However, if the half-close happens after the last message on the - // stream was already sent, then this field will be true to indicate an - // end-of-stream with *no* message (as opposed to an empty message). - bool end_of_stream_without_message = 3; - - // This field is used in ``GRPC`` body send mode to indicate whether - // the message is compressed. This will never be set to true by gRPC - // but may be set to true by a proxy like Envoy. - bool grpc_message_compressed = 4; -} - -// This message specifies the body mutation the server sends to the data plane. -message BodyMutation { - // The type of mutation for the body. - oneof mutation { - // The entire body to replace. - // Should only be used when the corresponding ``BodySendMode`` in the - // :ref:`processing_mode ` - // is not set to ``FULL_DUPLEX_STREAMED`` or ``GRPC``. - bytes body = 1; - - // Clear the corresponding body chunk. - // Should only be used when the corresponding ``BodySendMode`` in the - // :ref:`processing_mode ` - // is not set to ``FULL_DUPLEX_STREAMED`` or ``GRPC``. - // Clear the corresponding body chunk. - bool clear_body = 2; - - // Must be used when the corresponding ``BodySendMode`` in the - // :ref:`processing_mode ` - // is set to ``FULL_DUPLEX_STREAMED`` or ``GRPC``. - StreamedBodyResponse streamed_response = 3 - [(xds.annotations.v3.field_status).work_in_progress = true]; - } -} diff --git a/src/main/proto/envoy/service/extension/v3/config_discovery.proto b/src/main/proto/envoy/service/extension/v3/config_discovery.proto deleted file mode 100644 index 0100bcf..0000000 --- a/src/main/proto/envoy/service/extension/v3/config_discovery.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package envoy.service.extension.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.extension.v3"; -option java_outer_classname = "ConfigDiscoveryProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/extension/v3;extensionv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Extension config discovery service (ECDS)] - -// A service that supports dynamic configuration updates for a specific filter. -// Currently, ECDS is supported for network filters, HTTP filters, UDP session filters, and listener filters. -// Please check :ref:`Extension Config Discovery Service (ECDS) API `. -// -// The overall extension config discovery service works as follows: -// -// #. A filter (:ref:`Downstream Network `, -// :ref:`Upstream Network `, -// :ref:`Listener `, -// :ref:`UDP Session `, -// or :ref:`HTTP `) -// contains a (:ref:`ExtensionConfigSource config discovery `) configuration. This configuration -// includes a :ref:`config_source `, -// from which the filter configuration will be fetched. -// #. The client then registers for a resource using the filter name as the ``resource_name``. -// #. The xDS server sends back the filter's configuration. -// #. The client stores the configuration that will be used in the next instantiation of the filter chain, -// i.e., for the next requests. Whenever an updated filter configuration arrives, it will be taken into -// account in the following instantiation of the filter chain. -// -// .. note:: -// Filters that are configured using ECDS are warmed. For more details see -// :ref:`ExtensionConfigSource `. -// -// Return extension configurations. -service ExtensionConfigDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.core.v3.TypedExtensionConfig"; - - rpc StreamExtensionConfigs(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc DeltaExtensionConfigs(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc FetchExtensionConfigs(discovery.v3.DiscoveryRequest) - returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:extension_configs"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue -// with importing services: https://github.com/google/protobuf/issues/4221 and -// protoxform to upgrade the file. -message EcdsDummy { -} diff --git a/src/main/proto/envoy/service/health/v3/hds.proto b/src/main/proto/envoy/service/health/v3/hds.proto deleted file mode 100644 index 41ed204..0000000 --- a/src/main/proto/envoy/service/health/v3/hds.proto +++ /dev/null @@ -1,199 +0,0 @@ -syntax = "proto3"; - -package envoy.service.health.v3; - -import "envoy/config/cluster/v3/cluster.proto"; -import "envoy/config/core/v3/address.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/config/core/v3/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint_components.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/duration.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.health.v3"; -option java_outer_classname = "HdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/health/v3;healthv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Health discovery service (HDS)] - -// HDS is Health Discovery Service. It compliments Envoy’s health checking -// service by designating this Envoy to be a healthchecker for a subset of hosts -// in the cluster. The status of these health checks will be reported to the -// management server, where it can be aggregated etc and redistributed back to -// Envoy through EDS. -service HealthDiscoveryService { - // 1. Envoy starts up and if its can_healthcheck option in the static - // bootstrap config is enabled, sends HealthCheckRequest to the management - // server. It supplies its capabilities (which protocol it can health check - // with, what zone it resides in, etc.). - // 2. In response to (1), the management server designates this Envoy as a - // healthchecker to health check a subset of all upstream hosts for a given - // cluster (for example upstream Host 1 and Host 2). It streams - // HealthCheckSpecifier messages with cluster related configuration for all - // clusters this Envoy is designated to health check. Subsequent - // HealthCheckSpecifier message will be sent on changes to: - // a. Endpoints to health checks - // b. Per cluster configuration change - // 3. Envoy creates a health probe based on the HealthCheck config and sends - // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck - // configuration Envoy waits upon the arrival of the probe response and - // looks at the content of the response to decide whether the endpoint is - // healthy or not. If a response hasn't been received within the timeout - // interval, the endpoint health status is considered TIMEOUT. - // 4. Envoy reports results back in an EndpointHealthResponse message. - // Envoy streams responses as often as the interval configured by the - // management server in HealthCheckSpecifier. - // 5. The management Server collects health statuses for all endpoints in the - // cluster (for all clusters) and uses this information to construct - // EndpointDiscoveryResponse messages. - // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load - // balances traffic to them without additional health checking. It may - // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection - // failed to a particular endpoint to account for health status propagation - // delay between HDS and EDS). - // By default, can_healthcheck is true. If can_healthcheck is false, Cluster - // configuration may not contain HealthCheck message. - // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above - // invariant? - // TODO(htuch): Add @amb67's diagram. - rpc StreamHealthCheck(stream HealthCheckRequestOrEndpointHealthResponse) - returns (stream HealthCheckSpecifier) { - } - - // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of - // request/response. Should we add an identifier to the HealthCheckSpecifier - // to bind with the response? - rpc FetchHealthCheck(HealthCheckRequestOrEndpointHealthResponse) returns (HealthCheckSpecifier) { - option (google.api.http).post = "/v3/discovery:health_check"; - option (google.api.http).body = "*"; - } -} - -// Defines supported protocols etc, so the management server can assign proper -// endpoints to healthcheck. -message Capability { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.Capability"; - - // Different Envoy instances may have different capabilities (e.g. Redis) - // and/or have ports enabled for different protocols. - enum Protocol { - HTTP = 0; - TCP = 1; - REDIS = 2; - } - - repeated Protocol health_check_protocols = 1; -} - -message HealthCheckRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.HealthCheckRequest"; - - config.core.v3.Node node = 1; - - Capability capability = 2; -} - -message EndpointHealth { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.EndpointHealth"; - - config.endpoint.v3.Endpoint endpoint = 1; - - config.core.v3.HealthStatus health_status = 2; -} - -// Group endpoint health by locality under each cluster. -message LocalityEndpointsHealth { - config.core.v3.Locality locality = 1; - - repeated EndpointHealth endpoints_health = 2; -} - -// The health status of endpoints in a cluster. The cluster name and locality -// should match the corresponding fields in ClusterHealthCheck message. -message ClusterEndpointsHealth { - string cluster_name = 1; - - repeated LocalityEndpointsHealth locality_endpoints_health = 2; -} - -message EndpointHealthResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.EndpointHealthResponse"; - - // Deprecated - Flat list of endpoint health information. - repeated EndpointHealth endpoints_health = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Organize Endpoint health information by cluster. - repeated ClusterEndpointsHealth cluster_endpoints_health = 2; -} - -message HealthCheckRequestOrEndpointHealthResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.HealthCheckRequestOrEndpointHealthResponse"; - - oneof request_type { - HealthCheckRequest health_check_request = 1; - - EndpointHealthResponse endpoint_health_response = 2; - } -} - -message LocalityEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.LocalityEndpoints"; - - config.core.v3.Locality locality = 1; - - repeated config.endpoint.v3.Endpoint endpoints = 2; -} - -// The cluster name and locality is provided to Envoy for the endpoints that it -// health checks to support statistics reporting, logging and debugging by the -// Envoy instance (outside of HDS). For maximum usefulness, it should match the -// same cluster structure as that provided by EDS. -// [#next-free-field: 6] -message ClusterHealthCheck { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.ClusterHealthCheck"; - - string cluster_name = 1; - - repeated config.core.v3.HealthCheck health_checks = 2; - - repeated LocalityEndpoints locality_endpoints = 3; - - // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` - // on connection when health checking. For more details, see - // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. - repeated config.cluster.v3.Cluster.TransportSocketMatch transport_socket_matches = 4; - - // Optional configuration used to bind newly established upstream connections. - // If the address and port are empty, no bind will be performed. - config.core.v3.BindConfig upstream_bind_config = 5; -} - -message HealthCheckSpecifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.HealthCheckSpecifier"; - - repeated ClusterHealthCheck cluster_health_checks = 1; - - // The default is 1 second. - google.protobuf.Duration interval = 2; -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message HdsDummy { -} diff --git a/src/main/proto/envoy/service/listener/v3/lds.proto b/src/main/proto/envoy/service/listener/v3/lds.proto deleted file mode 100644 index 43a5194..0000000 --- a/src/main/proto/envoy/service/listener/v3/lds.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.service.listener.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.listener.v3"; -option java_outer_classname = "LdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/listener/v3;listenerv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Listener] -// Listener :ref:`configuration overview ` - -// The Envoy instance initiates an RPC at startup to discover a list of -// listeners. Updates are delivered via streaming from the LDS server and -// consist of a complete update of all listeners. Existing connections will be -// allowed to drain from listeners that are no longer present. -service ListenerDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.listener.v3.Listener"; - - rpc DeltaListeners(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc StreamListeners(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc FetchListeners(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:listeners"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message LdsDummy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.LdsDummy"; -} diff --git a/src/main/proto/envoy/service/load_stats/v2/lrs.proto b/src/main/proto/envoy/service/load_stats/v2/lrs.proto deleted file mode 100644 index e41a1da..0000000 --- a/src/main/proto/envoy/service/load_stats/v2/lrs.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; - -package envoy.service.load_stats.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/endpoint/load_report.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.load_stats.v2"; -option java_outer_classname = "LrsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v2;load_statsv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Load reporting service] - -service LoadReportingService { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - rpc StreamLoadStats(stream LoadStatsRequest) returns (stream LoadStatsResponse) { - } -} - -// A load report Envoy sends to the management server. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -message LoadStatsRequest { - // Node identifier for Envoy instance. - api.v2.core.Node node = 1; - - // A list of load stats to report. - repeated api.v2.endpoint.ClusterStats cluster_stats = 2; -} - -// The management server sends envoy a LoadStatsResponse with all clusters it -// is interested in learning load stats about. -// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. -message LoadStatsResponse { - // Clusters to report stats for. - // Not populated if *send_all_clusters* is true. - repeated string clusters = 1; - - // If true, the client should send all clusters it knows about. - // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. - bool send_all_clusters = 4; - - // The minimum interval of time to collect stats over. This is only a minimum for two reasons: - // 1. There may be some delay from when the timer fires until stats sampling occurs. - // 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic - // that is observed in between the corresponding previous *LoadStatsRequest* and this - // *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period - // of inobservability that might otherwise exists between the messages. New clusters are not - // subject to this consideration. - google.protobuf.Duration load_reporting_interval = 2; - - // Set to *true* if the management server supports endpoint granularity - // report. - bool report_endpoint_granularity = 3; -} diff --git a/src/main/proto/envoy/service/load_stats/v3/lrs.proto b/src/main/proto/envoy/service/load_stats/v3/lrs.proto deleted file mode 100644 index 3741062..0000000 --- a/src/main/proto/envoy/service/load_stats/v3/lrs.proto +++ /dev/null @@ -1,102 +0,0 @@ -syntax = "proto3"; - -package envoy.service.load_stats.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/config/endpoint/v3/load_report.proto"; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.load_stats.v3"; -option java_outer_classname = "LrsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3;load_statsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Load reporting service (LRS)] - -// Load Reporting Service is an Envoy API to emit load reports. Envoy will initiate a bi-directional -// stream with a management server. Upon connecting, the management server can send a -// :ref:`LoadStatsResponse ` to a node it is -// interested in getting the load reports for. Envoy in this node will start sending -// :ref:`LoadStatsRequest `. This is done periodically -// based on the :ref:`load reporting interval ` -// For details, take a look at the :ref:`Load Reporting Service sandbox example `. - -service LoadReportingService { - // Advanced API to allow for multi-dimensional load balancing by remote - // server. For receiving LB assignments, the steps are: - // 1, The management server is configured with per cluster/zone/load metric - // capacity configuration. The capacity configuration definition is - // outside of the scope of this document. - // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters - // to balance. - // - // Independently, Envoy will initiate a StreamLoadStats bidi stream with a - // management server: - // 1. Once a connection establishes, the management server publishes a - // LoadStatsResponse for all clusters it is interested in learning load - // stats about. - // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts - // based on per-zone weights and/or per-instance weights (if specified) - // based on intra-zone LbPolicy. This information comes from the above - // {Stream,Fetch}Endpoints. - // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. - // 4. Envoy aggregates load reports over the period of time given to it in - // LoadStatsResponse.load_reporting_interval. This includes aggregation - // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as - // well as load metrics from upstream hosts. - // 5. When the timer of load_reporting_interval expires, Envoy sends new - // LoadStatsRequest filled with load reports for each cluster. - // 6. The management server uses the load reports from all reported Envoys - // from around the world, computes global assignment and prepares traffic - // assignment destined for each zone Envoys are located in. Goto 2. - rpc StreamLoadStats(stream LoadStatsRequest) returns (stream LoadStatsResponse) { - } -} - -// A load report Envoy sends to the management server. -message LoadStatsRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.load_stats.v2.LoadStatsRequest"; - - // Node identifier for Envoy instance. - config.core.v3.Node node = 1; - - // A list of load stats to report. - repeated config.endpoint.v3.ClusterStats cluster_stats = 2; -} - -// The management server sends envoy a LoadStatsResponse with all clusters it -// is interested in learning load stats about. -message LoadStatsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.load_stats.v2.LoadStatsResponse"; - - // Clusters to report stats for. - // Not populated if ``send_all_clusters`` is true. - repeated string clusters = 1; - - // If true, the client should send all clusters it knows about. - // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their - // :ref:`client_features` field will honor this field. - bool send_all_clusters = 4; - - // The minimum interval of time to collect stats over. This is only a minimum for two reasons: - // - // 1. There may be some delay from when the timer fires until stats sampling occurs. - // 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic - // that is observed in between the corresponding previous ``LoadStatsRequest`` and this - // ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period - // of inobservability that might otherwise exists between the messages. New clusters are not - // subject to this consideration. - google.protobuf.Duration load_reporting_interval = 2; - - // Set to ``true`` if the management server supports endpoint granularity - // report. - bool report_endpoint_granularity = 3; -} diff --git a/src/main/proto/envoy/service/metrics/v2/metrics_service.proto b/src/main/proto/envoy/service/metrics/v2/metrics_service.proto deleted file mode 100644 index 33c5cd0..0000000 --- a/src/main/proto/envoy/service/metrics/v2/metrics_service.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package envoy.service.metrics.v2; - -import "envoy/api/v2/core/base.proto"; - -import "io/prometheus/client/metrics.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.metrics.v2"; -option java_outer_classname = "MetricsServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v2;metricsv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Metrics service] - -// Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric -// data model as a standard to represent metrics information. -service MetricsService { - // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. - rpc StreamMetrics(stream StreamMetricsMessage) returns (StreamMetricsResponse) { - } -} - -message StreamMetricsResponse { -} - -message StreamMetricsMessage { - message Identifier { - // The node sending metrics over the stream. - api.v2.core.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier identifier = 1; - - // A list of metric entries - repeated io.prometheus.client.MetricFamily envoy_metrics = 2; -} diff --git a/src/main/proto/envoy/service/metrics/v3/metrics_service.proto b/src/main/proto/envoy/service/metrics/v3/metrics_service.proto deleted file mode 100644 index 260c559..0000000 --- a/src/main/proto/envoy/service/metrics/v3/metrics_service.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package envoy.service.metrics.v3; - -import "envoy/config/core/v3/base.proto"; - -import "io/prometheus/client/metrics.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.metrics.v3"; -option java_outer_classname = "MetricsServiceProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v3;metricsv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Metrics service] - -// Service for streaming metrics to server that consumes the metrics data. It uses Prometheus metric -// data model as a standard to represent metrics information. -service MetricsService { - // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. - rpc StreamMetrics(stream StreamMetricsMessage) returns (StreamMetricsResponse) { - } -} - -message StreamMetricsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.metrics.v2.StreamMetricsResponse"; -} - -message StreamMetricsMessage { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.metrics.v2.StreamMetricsMessage"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.metrics.v2.StreamMetricsMessage.Identifier"; - - // The node sending metrics over the stream. - config.core.v3.Node node = 1 [(validate.rules).message = {required: true}]; - } - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier identifier = 1; - - // A list of metric entries - repeated io.prometheus.client.MetricFamily envoy_metrics = 2; -} diff --git a/src/main/proto/envoy/service/network_ext_proc/v3/network_external_processor.proto b/src/main/proto/envoy/service/network_ext_proc/v3/network_external_processor.proto deleted file mode 100644 index c148baf..0000000 --- a/src/main/proto/envoy/service/network_ext_proc/v3/network_external_processor.proto +++ /dev/null @@ -1,160 +0,0 @@ -syntax = "proto3"; - -package envoy.service.network_ext_proc.v3; - -import "envoy/config/core/v3/base.proto"; - -import "google/protobuf/struct.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.network_ext_proc.v3"; -option java_outer_classname = "NetworkExternalProcessorProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/network_ext_proc/v3;network_ext_procv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Network External Processing Service] - -// The Network External Processing filter allows an external service to dynamically -// interact with and modify L4 network traffic passing through Envoy. Unlike the -// HTTP External Processing filter, this service operates at the TCP/UDP level, -// providing access to raw network data. -// -// The filter communicates with an external gRPC service that can: -// -// 1. Inspect network traffic in both directions (client->server and server->client) -// 2. Modify the payload data -// 3. Control connection lifecycle (continue, close gracefully, or reset) -// -// Use cases include: -// -// 1. Custom protocol inspection and modification -// 2. Advanced traffic manipulation -// 3. Security scanning and filtering -// 4. Dynamic connection management -// -// The service uses a bidirectional gRPC stream, maintaining state throughout -// the connection lifetime while allowing asynchronous processing. - -// NetworkExternalProcessor service defines the contract between Envoy and -// external processing servers for L4 network traffic. -service NetworkExternalProcessor { - // Process establishes a bidirectional stream between Envoy and the external - // processing server. Envoy sends ProcessingRequests containing network data - // and the server responds with ProcessingResponses containing processing - // decisions and potentially modified data. - // - // The server should handle processing timeout properly to avoid blocking - // network traffic for extended periods. Any uncaught exceptions will - // be treated as errors and will terminate the stream. - // - // Implementation note: The server should process requests in the order - // they are received to maintain proper sequencing of network traffic. - rpc Process(stream ProcessingRequest) returns (stream ProcessingResponse) { - } -} - -// The payload data from network layer -message Data { - // The raw payload data - bytes data = 1; - - // Indicates whether this is the last data frame in the current direction. - // The external processor should still respond to this message even - // if there is no more data expected in this direction. - bool end_of_stream = 2; -} - -// ProcessingRequest contains data sent from Envoy to the external processing server. -// Each request contains either read data (from client) or write data (to client) -// along with optional metadata. -message ProcessingRequest { - // ReadData contains the network data intercepted in the request path (client to server). - // This is sent to the external processor when data arrives from the downstream client. - // If this is set, write_data should not be set. - Data read_data = 1; - - // WriteData contains the network data intercepted in the response path (server to client). - // This is sent to the external processor when data arrives from the upstream server. - // If this is set, read_data should not be set. - Data write_data = 2; - - // Optional metadata associated with the request. - // This can include connection properties, filter configuration, and any other - // contextual information that might be useful for processing decisions. - // - // The metadata is not automatically propagated from request to response. - // The external processor must include any needed metadata in its response. - config.core.v3.Metadata metadata = 3; -} - -// ProcessingResponse contains the response from the external processing server to Envoy. -// Each response corresponds to a ProcessingRequest and indicates how the network -// traffic should be handled. -// [#next-free-field: 6] -message ProcessingResponse { - // DataProcessedStatus indicates whether the data was modified by the external processor. - enum DataProcessedStatus { - // The data processed status is unknown. - UNKNOWN = 0; - - // The data remains unchanged. Envoy will use the original data. - // This is useful when the processor only wants to inspect but not modify the traffic. - UNMODIFIED = 1; - - // The data has been modified. Envoy will use the modified data provided in the response. - // This allows the processor to transform the network traffic as needed. - MODIFIED = 2; - } - - // ConnectionStatus determines what happens to the connection after processing. - enum ConnectionStatus { - // Continue normal processing of the connection. - // This is the default behavior and allows traffic to flow normally. - CONTINUE = 0; - - // Close the connection with normal TCP FIN. - // This allows for clean connection termination with a normal close sequence. - // Any buffered data will be sent before closing. - CLOSE = 1; - - // Immediately reset the connection with TCP RST. - // This forcibly terminates the connection without a clean shutdown, - // discarding any buffered data. Use this for security-critical situations - // or when immediate termination is required. - CLOSE_RST = 2; - } - - // The processed ReadData containing potentially modified data for the request path. - // This should be sent in response to a ProcessingRequest with read_data, and the - // previous data in ProcessingRequest will be replaced by the new data in Envoy's data plane. - // If this is set, write_data should not be set. - Data read_data = 1; - - // The processed WriteData containing potentially modified data for the response path. - // This should be sent in response to a ProcessingRequest with write_data, and the - // previous data in ProcessingRequest will be replaced by the new data in Envoy's data plane. - // If this is set, read_data should not be set. - Data write_data = 2; - - // Indicates whether the data was modified or not. - // This is mandatory and tells Envoy whether to use the original or modified data. - DataProcessedStatus data_processing_status = 3; - - // Optional: Determines the connection behavior after processing. - // If not specified, CONTINUE is assumed, and the connection proceeds normally. - // Use CLOSE or CLOSE_RST to terminate the connection based on processing results. - ConnectionStatus connection_status = 4; - - // Optional metadata associated with the request. - // This can include connection properties, filter configuration, and any other - // contextual information that might be useful for processing decisions. - // - // The metadata is not automatically propagated from request to response. - // The external processor must include any needed metadata in its response. - google.protobuf.Struct dynamic_metadata = 5; -} diff --git a/src/main/proto/envoy/service/rate_limit_quota/v3/rlqs.proto b/src/main/proto/envoy/service/rate_limit_quota/v3/rlqs.proto deleted file mode 100644 index b8fa2cd..0000000 --- a/src/main/proto/envoy/service/rate_limit_quota/v3/rlqs.proto +++ /dev/null @@ -1,258 +0,0 @@ -syntax = "proto3"; - -package envoy.service.rate_limit_quota.v3; - -import "envoy/type/v3/ratelimit_strategy.proto"; - -import "google/protobuf/duration.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.rate_limit_quota.v3"; -option java_outer_classname = "RlqsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/rate_limit_quota/v3;rate_limit_quotav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Rate Limit Quota Service (RLQS)] - -// The Rate Limit Quota Service (RLQS) is a Envoy global rate limiting service that allows to -// delegate rate limit decisions to a remote service. The service will aggregate the usage reports -// from multiple data plane instances, and distribute Rate Limit Assignments to each instance -// based on its business logic. The logic is outside of the scope of the protocol API. -// -// The protocol is designed as a streaming-first API. It utilizes watch-like subscription model. -// The data plane groups requests into Quota Buckets as directed by the filter config, -// and periodically reports them to the RLQS server along with the Bucket identifier, :ref:`BucketId -// `. Once RLQS server has collected enough -// reports to make a decision, it'll send back the assignment with the rate limiting instructions. -// -// The first report sent by the data plane is interpreted by the RLQS server as a "watch" request, -// indicating that the data plane instance is interested in receiving further updates for the -// ``BucketId``. From then on, RLQS server may push assignments to this instance at will, even if -// the instance is not sending usage reports. It's the responsibility of the RLQS server -// to determine when the data plane instance didn't send ``BucketId`` reports for too long, -// and to respond with the :ref:`AbandonAction -// `, -// indicating that the server has now stopped sending quota assignments for the ``BucketId`` bucket, -// and the data plane instance should :ref:`abandon -// ` -// it. -// -// If for any reason the RLQS client doesn't receive the initial assignment for the reported bucket, -// in order to prevent memory exhaustion, the data plane will limit the time such bucket -// is retained. The exact time to wait for the initial assignment is chosen by the filter, -// and may vary based on the implementation. -// Once the duration ends, the data plane will stop reporting bucket usage, reject any enqueued -// requests, and purge the bucket from the memory. Subsequent requests matched into the bucket -// will re-initialize the bucket in the "no assignment" state, restarting the reports. -// -// Refer to Rate Limit Quota :ref:`configuration overview ` -// for further details. - -// Defines the Rate Limit Quota Service (RLQS). -service RateLimitQuotaService { - // Main communication channel: the data plane sends usage reports to the RLQS server, - // and the server asynchronously responding with the assignments. - rpc StreamRateLimitQuotas(stream RateLimitQuotaUsageReports) - returns (stream RateLimitQuotaResponse) { - } -} - -message RateLimitQuotaUsageReports { - // The usage report for a bucket. - // - // .. note:: - // Note that the first report sent for a ``BucketId`` indicates to the RLQS server that - // the RLQS client is subscribing for the future assignments for this ``BucketId``. - message BucketQuotaUsage { - // ``BucketId`` for which request quota usage is reported. - BucketId bucket_id = 1 [(validate.rules).message = {required: true}]; - - // Time elapsed since the last report. - google.protobuf.Duration time_elapsed = 2 [(validate.rules).duration = { - required: true - gt {} - }]; - - // Requests the data plane has allowed through. - uint64 num_requests_allowed = 3; - - // Requests throttled. - uint64 num_requests_denied = 4; - } - - // All quota requests must specify the domain. This enables sharing the quota - // server between different applications without fear of overlap. - // E.g., "envoy". - // - // Should only be provided in the first report, all subsequent messages on the same - // stream are considered to be in the same domain. In case the domain needs to be - // changes, close the stream, and reopen a new one with the different domain. - string domain = 1 [(validate.rules).string = {min_len: 1}]; - - // A list of quota usage reports. The list is processed by the RLQS server in the same order - // it's provided by the client. - repeated BucketQuotaUsage bucket_quota_usages = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -message RateLimitQuotaResponse { - // Commands the data plane to apply one of the actions to the bucket with the - // :ref:`bucket_id `. - message BucketAction { - // Quota assignment for the bucket. Configures the rate limiting strategy and the duration - // for the given :ref:`bucket_id - // `. - // - // **Applying the first assignment to the bucket** - // - // Once the data plane receives the ``QuotaAssignmentAction``, it must send the current usage - // report for the bucket, and start rate limiting requests matched into the bucket - // using the strategy configured in the :ref:`rate_limit_strategy - // ` - // field. The assignment becomes bucket's ``active`` assignment. - // - // **Expiring the assignment** - // - // The duration of the assignment defined in the :ref:`assignment_time_to_live - // ` - // field. When the duration runs off, the assignment is ``expired``, and no longer ``active``. - // The data plane should stop applying the rate limiting strategy to the bucket, and transition - // the bucket to the "expired assignment" state. This activates the behavior configured in the - // :ref:`expired_assignment_behavior ` - // field. - // - // **Replacing the assignment** - // - // * If the rate limiting strategy is different from bucket's ``active`` assignment, or - // the current bucket assignment is ``expired``, the data plane must immediately - // end the current assignment, report the bucket usage, and apply the new assignment. - // The new assignment becomes bucket's ``active`` assignment. - // * If the rate limiting strategy is the same as the bucket's ``active`` (not ``expired``) - // assignment, the data plane should extend the duration of the ``active`` assignment - // for the duration of the new assignment provided in the :ref:`assignment_time_to_live - // ` - // field. The ``active`` assignment is considered unchanged. - message QuotaAssignmentAction { - // A duration after which the assignment is be considered ``expired``. The process of the - // expiration is described :ref:`above - // `. - // - // * If unset, the assignment has no expiration date. - // * If set to ``0``, the assignment expires immediately, forcing the client into the - // :ref:`"expired assignment" - // ` - // state. This may be used by the RLQS server in cases when it needs clients to proactively - // fall back to the pre-configured :ref:`ExpiredAssignmentBehavior - // `, - // f.e. before the server going into restart. - // - // .. attention:: - // Note that :ref:`expiring - // ` - // the assignment is not the same as :ref:`abandoning - // ` - // the assignment. While expiring the assignment just transitions the bucket to - // the "expired assignment" state; abandoning the assignment completely erases - // the bucket from the data plane memory, and stops the usage reports. - google.protobuf.Duration assignment_time_to_live = 2 [(validate.rules).duration = {gte {}}]; - - // Configures the local rate limiter for the request matched to the bucket. - // If not set, allow all requests. - type.v3.RateLimitStrategy rate_limit_strategy = 3; - } - - // Abandon action for the bucket. Indicates that the RLQS server will no longer be - // sending updates for the given :ref:`bucket_id - // `. - // - // If no requests are reported for a bucket, after some time the server considers the bucket - // inactive. The server stops tracking the bucket, and instructs the the data plane to abandon - // the bucket via this message. - // - // **Abandoning the assignment** - // - // The data plane is to erase the bucket (including its usage data) from the memory. - // It should stop tracking the bucket, and stop reporting its usage. This effectively resets - // the data plane to the state prior to matching the first request into the bucket. - // - // **Restarting the subscription** - // - // If a new request is matched into a bucket previously abandoned, the data plane must behave - // as if it has never tracked the bucket, and it's the first request matched into it: - // - // 1. The process of :ref:`subscription and reporting - // ` - // starts from the beginning. - // - // 2. The bucket transitions to the :ref:`"no assignment" - // ` - // state. - // - // 3. Once the new assignment is received, it's applied per - // "Applying the first assignment to the bucket" section of the :ref:`QuotaAssignmentAction - // `. - message AbandonAction { - } - - // ``BucketId`` for which request the action is applied. - BucketId bucket_id = 1 [(validate.rules).message = {required: true}]; - - oneof bucket_action { - option (validate.required) = true; - - // Apply the quota assignment to the bucket. - // - // Commands the data plane to apply a rate limiting strategy to the bucket. - // The process of applying and expiring the rate limiting strategy is detailed in the - // :ref:`QuotaAssignmentAction - // ` - // message. - QuotaAssignmentAction quota_assignment_action = 2; - - // Abandon the bucket. - // - // Commands the data plane to abandon the bucket. - // The process of abandoning the bucket is described in the :ref:`AbandonAction - // ` - // message. - AbandonAction abandon_action = 3; - } - } - - // An ordered list of actions to be applied to the buckets. The actions are applied in the - // given order, from top to bottom. - repeated BucketAction bucket_action = 1 [(validate.rules).repeated = {min_items: 1}]; -} - -// The identifier for the bucket. Used to match the bucket between the control plane (RLQS server), -// and the data plane (RLQS client), f.e.: -// -// * the data plane sends a usage report for requests matched into the bucket with ``BucketId`` -// to the control plane -// * the control plane sends an assignment for the bucket with ``BucketId`` to the data plane -// Bucket ID. -// -// Example: -// -// .. validated-code-block:: yaml -// :type-name: envoy.service.rate_limit_quota.v3.BucketId -// -// bucket: -// name: my_bucket -// env: staging -// -// .. note:: -// The order of ``BucketId`` keys do not matter. Buckets ``{ a: 'A', b: 'B' }`` and -// ``{ b: 'B', a: 'A' }`` are identical. -message BucketId { - map bucket = 1 [(validate.rules).map = { - min_pairs: 1 - keys {string {min_len: 1}} - values {string {min_len: 1}} - }]; -} diff --git a/src/main/proto/envoy/service/ratelimit/v2/rls.proto b/src/main/proto/envoy/service/ratelimit/v2/rls.proto deleted file mode 100644 index 3d928e1..0000000 --- a/src/main/proto/envoy/service/ratelimit/v2/rls.proto +++ /dev/null @@ -1,115 +0,0 @@ -syntax = "proto3"; - -package envoy.service.ratelimit.v2; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/ratelimit/ratelimit.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.ratelimit.v2"; -option java_outer_classname = "RlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v2;ratelimitv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Rate Limit Service (RLS)] - -service RateLimitService { - // Determine whether rate limiting should take place. - rpc ShouldRateLimit(RateLimitRequest) returns (RateLimitResponse) { - } -} - -// Main message for a rate limit request. The rate limit service is designed to be fully generic -// in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded -// configuration will parse the request and find the most specific limit to apply. In addition, -// a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors -// are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any -// of them are over limit. This enables more complex application level rate limiting scenarios -// if desired. -message RateLimitRequest { - // All rate limit requests must specify a domain. This enables the configuration to be per - // application without fear of overlap. E.g., "envoy". - string domain = 1; - - // All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is - // processed by the service (see below). If any of the descriptors are over limit, the entire - // request is considered to be over limit. - repeated api.v2.ratelimit.RateLimitDescriptor descriptors = 2; - - // Rate limit requests can optionally specify the number of hits a request adds to the matched - // limit. If the value is not set in the message, a request increases the matched limit by 1. - uint32 hits_addend = 3; -} - -// A response from a ShouldRateLimit call. -message RateLimitResponse { - enum Code { - // The response code is not known. - UNKNOWN = 0; - - // The response code to notify that the number of requests are under limit. - OK = 1; - - // The response code to notify that the number of requests are over limit. - OVER_LIMIT = 2; - } - - // Defines an actual rate limit in terms of requests per unit of time and the unit itself. - message RateLimit { - enum Unit { - // The time unit is not known. - UNKNOWN = 0; - - // The time unit representing a second. - SECOND = 1; - - // The time unit representing a minute. - MINUTE = 2; - - // The time unit representing an hour. - HOUR = 3; - - // The time unit representing a day. - DAY = 4; - } - - // A name or description of this limit. - string name = 3; - - // The number of requests per unit of time. - uint32 requests_per_unit = 1; - - // The unit of time. - Unit unit = 2; - } - - message DescriptorStatus { - // The response code for an individual descriptor. - Code code = 1; - - // The current limit as configured by the server. Useful for debugging, etc. - RateLimit current_limit = 2; - - // The limit remaining in the current time unit. - uint32 limit_remaining = 3; - } - - // The overall response code which takes into account all of the descriptors that were passed - // in the RateLimitRequest message. - Code overall_code = 1; - - // A list of DescriptorStatus messages which matches the length of the descriptor list passed - // in the RateLimitRequest. This can be used by the caller to determine which individual - // descriptors failed and/or what the currently configured limits are for all of them. - repeated DescriptorStatus statuses = 2; - - // A list of headers to add to the response - repeated api.v2.core.HeaderValue headers = 3 - [(udpa.annotations.field_migrate).rename = "response_headers_to_add"]; - - // A list of headers to add to the request when forwarded - repeated api.v2.core.HeaderValue request_headers_to_add = 4; -} diff --git a/src/main/proto/envoy/service/ratelimit/v3/rls.proto b/src/main/proto/envoy/service/ratelimit/v3/rls.proto deleted file mode 100644 index 63f2477..0000000 --- a/src/main/proto/envoy/service/ratelimit/v3/rls.proto +++ /dev/null @@ -1,229 +0,0 @@ -syntax = "proto3"; - -package envoy.service.ratelimit.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/extensions/common/ratelimit/v3/ratelimit.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.ratelimit.v3"; -option java_outer_classname = "RlsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v3;ratelimitv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Rate limit service (RLS)] - -service RateLimitService { - // Determine whether rate limiting should take place. - rpc ShouldRateLimit(RateLimitRequest) returns (RateLimitResponse) { - } -} - -// Main message for a rate limit request. The rate limit service is designed to be fully generic -// in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded -// configuration will parse the request and find the most specific limit to apply. In addition, -// a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors -// are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any -// of them are over limit. This enables more complex application level rate limiting scenarios -// if desired. -message RateLimitRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.ratelimit.v2.RateLimitRequest"; - - // All rate limit requests must specify a domain. This enables the configuration to be per - // application without fear of overlap. E.g., "envoy". - string domain = 1; - - // All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is - // processed by the service (see below). If any of the descriptors are over limit, the entire - // request is considered to be over limit. - repeated envoy.extensions.common.ratelimit.v3.RateLimitDescriptor descriptors = 2; - - // Rate limit requests can optionally specify the number of hits a request adds to the matched - // limit. If the value is not set in the message, a request increases the matched limit by 1. - // This value can be overridden by setting filter state value ``envoy.ratelimit.hits_addend`` - // to the desired number. Invalid number (< 0) or number will be ignored. - uint32 hits_addend = 3; -} - -// A response from a ShouldRateLimit call. -// [#next-free-field: 8] -message RateLimitResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.ratelimit.v2.RateLimitResponse"; - - enum Code { - // The response code is not known. - UNKNOWN = 0; - - // The response code to notify that the number of requests are under limit. - OK = 1; - - // The response code to notify that the number of requests are over limit. - OVER_LIMIT = 2; - } - - // Defines an actual rate limit in terms of requests per unit of time and the unit itself. - message RateLimit { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.ratelimit.v2.RateLimitResponse.RateLimit"; - - // Identifies the unit of of time for rate limit. - // [#comment: replace by envoy/type/v3/ratelimit_unit.proto in v4] - enum Unit { - // The time unit is not known. - UNKNOWN = 0; - - // The time unit representing a second. - SECOND = 1; - - // The time unit representing a minute. - MINUTE = 2; - - // The time unit representing an hour. - HOUR = 3; - - // The time unit representing a day. - DAY = 4; - - // The time unit representing a week. - WEEK = 7; - - // The time unit representing a month. - MONTH = 5; - - // The time unit representing a year. - YEAR = 6; - } - - // A name or description of this limit. - string name = 3; - - // The number of requests per unit of time. - uint32 requests_per_unit = 1; - - // The unit of time. - Unit unit = 2; - } - - // Cacheable quota for responses. - // Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set. - // This is a certain number of requests over a period of time. - // The client may cache this result and apply the effective RateLimitResponse to future matching - // requests without querying rate limit service. - // - // When quota expires due to timeout, a new RLS request will also be made. - // The implementation may choose to preemptively query the rate limit server for more quota on or - // before expiration or before the available quota runs out. - // [#not-implemented-hide:] - message Quota { - // Number of matching requests granted in quota. Must be 1 or more. - uint32 requests = 1 [(validate.rules).uint32 = {gt: 0}]; - - oneof expiration_specifier { - // Point in time at which the quota expires. - google.protobuf.Timestamp valid_until = 2; - } - - // The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level. - // - // For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"), - // the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same. - // Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.) - // - // If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`. - string id = 3; - } - - // [#next-free-field: 6] - message DescriptorStatus { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus"; - - // The response code for an individual descriptor. - Code code = 1; - - // The current limit as configured by the server. Useful for debugging, etc. - RateLimit current_limit = 2; - - // The limit remaining in the current time unit. - uint32 limit_remaining = 3; - - // Duration until reset of the current limit window. - google.protobuf.Duration duration_until_reset = 4; - - // Quota is available for a request if its descriptor set has cached quota available for all - // descriptors. - // This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota. - // - // If quota is available, a RLS request will not be made and the quota will be reduced by 1 for - // all matching descriptors. - // - // If there is not sufficient quota, there are three cases: - // 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired. - // In this case, the request will be treated as OVER_LIMIT. - // 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors - // have no cached entry. This will trigger a new RLS request. - // When the result is returned, a single unit will be consumed from the quota for all - // matching descriptors. - // If the server did not provide a quota, such as the quota message is empty for some of - // the descriptors, then the request admission is determined by the - // :ref:`overall_code `. - // 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request, - // When the result is returned, a single unit will be consumed from the quota for all - // matching descriptors. - // If the server did not provide a quota, such as the quota message is empty for some of - // the descriptors, then the request admission is determined by the - // :ref:`overall_code `. - // [#not-implemented-hide:] - Quota quota = 5; - } - - // The overall response code which takes into account all of the descriptors that were passed - // in the RateLimitRequest message. - Code overall_code = 1; - - // A list of DescriptorStatus messages which matches the length of the descriptor list passed - // in the RateLimitRequest. This can be used by the caller to determine which individual - // descriptors failed and/or what the currently configured limits are for all of them. - repeated DescriptorStatus statuses = 2; - - // A list of headers to add to the response - repeated config.core.v3.HeaderValue response_headers_to_add = 3; - - // A list of headers to add to the request when forwarded - repeated config.core.v3.HeaderValue request_headers_to_add = 4; - - // A response body to send to the downstream client when the response code is not OK. - bytes raw_body = 5; - - // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next - // filter. This metadata lives in a namespace specified by the canonical name of extension filter - // that requires it: - // - // - :ref:`envoy.filters.http.ratelimit ` for HTTP filter. - // - :ref:`envoy.filters.network.ratelimit ` for network filter. - // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. - google.protobuf.Struct dynamic_metadata = 6; - - // Quota is available for a request if its entire descriptor set has cached quota available. - // This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response. - // - // If quota is available, a RLS request will not be made and the quota will be reduced by 1. - // If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered. - // If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the - // :ref:`overall_code `. - // - // If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired, - // the request will be treated as OVER_LIMIT. - // [#not-implemented-hide:] - Quota quota = 7; -} diff --git a/src/main/proto/envoy/service/redis_auth/v3/redis_external_auth.proto b/src/main/proto/envoy/service/redis_auth/v3/redis_external_auth.proto deleted file mode 100644 index 52bc3bc..0000000 --- a/src/main/proto/envoy/service/redis_auth/v3/redis_external_auth.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.service.redis_auth.v3; - -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.redis_auth.v3"; -option java_outer_classname = "RedisExternalAuthProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/redis_auth/v3;redis_authv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Redis external authentication service] - -// The messages used by the redis_proxy filter when performing external authentication. - -// A generic interface for performing external password authentication on incoming AUTH commands. -service RedisProxyExternalAuth { - // Performs authentication check based on the data sent with the AUTH request. - // Returns either an OK status or an error status. - rpc Authenticate(RedisProxyExternalAuthRequest) returns (RedisProxyExternalAuthResponse) { - } -} - -message RedisProxyExternalAuthRequest { - // Username, if applicable. Otherwise, empty. - string username = 1; - - // Password sent with the AUTH command. - string password = 2; -} - -message RedisProxyExternalAuthResponse { - // Status of the authentication check. - google.rpc.Status status = 1; - - // Optional expiration time for the authentication. - // If set, the authentication will be valid until this time. - // If not set, the authentication will be valid indefinitely. - google.protobuf.Timestamp expiration = 2; - - // Optional message to be sent back to the client. - string message = 3; -} diff --git a/src/main/proto/envoy/service/route/v3/rds.proto b/src/main/proto/envoy/service/route/v3/rds.proto deleted file mode 100644 index dc50cf4..0000000 --- a/src/main/proto/envoy/service/route/v3/rds.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.service.route.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.route.v3"; -option java_outer_classname = "RdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/route/v3;routev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: RDS] - -// The resource_names field in DiscoveryRequest specifies a route configuration. -// This allows an Envoy configuration with multiple HTTP listeners (and -// associated HTTP connection manager filters) to use different route -// configurations. Each listener will bind its HTTP connection manager filter to -// a route table via this identifier. -service RouteDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.route.v3.RouteConfiguration"; - - rpc StreamRoutes(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc DeltaRoutes(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc FetchRoutes(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:routes"; - option (google.api.http).body = "*"; - } -} - -// Virtual Host Discovery Service (VHDS) is used to dynamically update the list of virtual hosts for -// a given RouteConfiguration. If VHDS is configured a virtual host list update will be triggered -// during the processing of an HTTP request if a route for the request cannot be resolved. The -// :ref:`resource_names_subscribe ` -// field contains a list of virtual host names or aliases to track. The contents of an alias would -// be the contents of a ``host`` or ``authority`` header used to make an http request. An xDS server -// will match an alias to a virtual host based on the content of :ref:`domains' -// ` field. The ``resource_names_unsubscribe`` field -// contains a list of virtual host names that have been :ref:`unsubscribed -// ` from the routing table associated with the RouteConfiguration. -service VirtualHostDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.route.v3.VirtualHost"; - - rpc DeltaVirtualHosts(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message RdsDummy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RdsDummy"; -} diff --git a/src/main/proto/envoy/service/route/v3/srds.proto b/src/main/proto/envoy/service/route/v3/srds.proto deleted file mode 100644 index f0ad41b..0000000 --- a/src/main/proto/envoy/service/route/v3/srds.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package envoy.service.route.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.route.v3"; -option java_outer_classname = "SrdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/route/v3;routev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: SRDS] -// * Routing :ref:`architecture overview ` - -// The Scoped Routes Discovery Service (SRDS) API distributes -// :ref:`ScopedRouteConfiguration` -// resources. Each ScopedRouteConfiguration resource represents a "routing -// scope" containing a mapping that allows the HTTP connection manager to -// dynamically assign a routing table (specified via a -// :ref:`RouteConfiguration` message) to each -// HTTP request. -service ScopedRoutesDiscoveryService { - option (envoy.annotations.resource).type = "envoy.config.route.v3.ScopedRouteConfiguration"; - - rpc StreamScopedRoutes(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc DeltaScopedRoutes(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc FetchScopedRoutes(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:scoped-routes"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. -message SrdsDummy { - option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.SrdsDummy"; -} diff --git a/src/main/proto/envoy/service/runtime/v3/rtds.proto b/src/main/proto/envoy/service/runtime/v3/rtds.proto deleted file mode 100644 index 62e106b..0000000 --- a/src/main/proto/envoy/service/runtime/v3/rtds.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.service.runtime.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.runtime.v3"; -option java_outer_classname = "RtdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/runtime/v3;runtimev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Runtime discovery service (RTDS)] -// RTDS :ref:`configuration overview ` - -// Discovery service for Runtime resources. -service RuntimeDiscoveryService { - option (envoy.annotations.resource).type = "envoy.service.runtime.v3.Runtime"; - - rpc StreamRuntime(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc DeltaRuntime(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc FetchRuntime(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:runtime"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message RtdsDummy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.RtdsDummy"; -} - -// RTDS resource type. This describes a layer in the runtime virtual filesystem. -message Runtime { - option (udpa.annotations.versioning).previous_message_type = "envoy.service.discovery.v2.Runtime"; - - // Runtime resource name. This makes the Runtime a self-describing xDS - // resource. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - google.protobuf.Struct layer = 2; -} diff --git a/src/main/proto/envoy/service/secret/v3/sds.proto b/src/main/proto/envoy/service/secret/v3/sds.proto deleted file mode 100644 index 9636f2c..0000000 --- a/src/main/proto/envoy/service/secret/v3/sds.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.service.secret.v3; - -import "envoy/service/discovery/v3/discovery.proto"; - -import "google/api/annotations.proto"; - -import "envoy/annotations/resource.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.secret.v3"; -option java_outer_classname = "SdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/secret/v3;secretv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Secret Discovery Service (SDS)] - -service SecretDiscoveryService { - option (envoy.annotations.resource).type = "envoy.extensions.transport_sockets.tls.v3.Secret"; - - rpc DeltaSecrets(stream discovery.v3.DeltaDiscoveryRequest) - returns (stream discovery.v3.DeltaDiscoveryResponse) { - } - - rpc StreamSecrets(stream discovery.v3.DiscoveryRequest) - returns (stream discovery.v3.DiscoveryResponse) { - } - - rpc FetchSecrets(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { - option (google.api.http).post = "/v3/discovery:secrets"; - option (google.api.http).body = "*"; - } -} - -// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing -// services: https://github.com/google/protobuf/issues/4221 -message SdsDummy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.discovery.v2.SdsDummy"; -} diff --git a/src/main/proto/envoy/service/status/v2/csds.proto b/src/main/proto/envoy/service/status/v2/csds.proto deleted file mode 100644 index 1e3e629..0000000 --- a/src/main/proto/envoy/service/status/v2/csds.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; - -package envoy.service.status.v2; - -import "envoy/admin/v2alpha/config_dump.proto"; -import "envoy/api/v2/core/base.proto"; -import "envoy/type/matcher/node.proto"; - -import "google/api/annotations.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.service.status.v2"; -option java_outer_classname = "CsdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/status/v2;statusv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Client Status Discovery Service (CSDS)] - -// CSDS is Client Status Discovery Service. It can be used to get the status of -// an xDS-compliant client from the management server's point of view. In the -// future, it can potentially be used as an interface to get the current -// state directly from the client. -service ClientStatusDiscoveryService { - rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) { - } - - rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) { - option (google.api.http).post = "/v2/discovery:client_status"; - option (google.api.http).body = "*"; - } -} - -// Status of a config. -enum ConfigStatus { - // Status info is not available/unknown. - UNKNOWN = 0; - - // Management server has sent the config to client and received ACK. - SYNCED = 1; - - // Config is not sent. - NOT_SENT = 2; - - // Management server has sent the config to client but hasn’t received - // ACK/NACK. - STALE = 3; - - // Management server has sent the config to client but received NACK. - ERROR = 4; -} - -// Request for client status of clients identified by a list of NodeMatchers. -message ClientStatusRequest { - // Management server can use these match criteria to identify clients. - // The match follows OR semantics. - repeated type.matcher.NodeMatcher node_matchers = 1; -} - -// Detailed config (per xDS) with status. -// [#next-free-field: 6] -message PerXdsConfig { - ConfigStatus status = 1; - - oneof per_xds_config { - admin.v2alpha.ListenersConfigDump listener_config = 2; - - admin.v2alpha.ClustersConfigDump cluster_config = 3; - - admin.v2alpha.RoutesConfigDump route_config = 4; - - admin.v2alpha.ScopedRoutesConfigDump scoped_route_config = 5; - } -} - -// All xds configs for a particular client. -message ClientConfig { - // Node for a particular client. - api.v2.core.Node node = 1; - - repeated PerXdsConfig xds_config = 2; -} - -message ClientStatusResponse { - // Client configs for the clients specified in the ClientStatusRequest. - repeated ClientConfig config = 1; -} diff --git a/src/main/proto/envoy/service/status/v3/csds.proto b/src/main/proto/envoy/service/status/v3/csds.proto deleted file mode 100644 index de62fbf..0000000 --- a/src/main/proto/envoy/service/status/v3/csds.proto +++ /dev/null @@ -1,206 +0,0 @@ -syntax = "proto3"; - -package envoy.service.status.v3; - -import "envoy/admin/v3/config_dump_shared.proto"; -import "envoy/config/core/v3/base.proto"; -import "envoy/type/matcher/v3/node.proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.service.status.v3"; -option java_outer_classname = "CsdsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/status/v3;statusv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Client status discovery service (CSDS)] - -// CSDS is Client Status Discovery Service. It can be used to get the status of -// an xDS-compliant client from the management server's point of view. It can -// also be used to get the current xDS states directly from the client. -service ClientStatusDiscoveryService { - rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) { - } - - rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) { - option (google.api.http).post = "/v3/discovery:client_status"; - option (google.api.http).body = "*"; - } -} - -// Status of a config from a management server view. -enum ConfigStatus { - // Status info is not available/unknown. - UNKNOWN = 0; - - // Management server has sent the config to client and received ACK. - SYNCED = 1; - - // Config is not sent. - NOT_SENT = 2; - - // Management server has sent the config to client but hasn’t received - // ACK/NACK. - STALE = 3; - - // Management server has sent the config to client but received NACK. The - // attached config dump will be the latest config (the rejected one), since - // it is the persisted version in the management server. - ERROR = 4; -} - -// Config status from a client-side view. -enum ClientConfigStatus { - // Config status is not available/unknown. - CLIENT_UNKNOWN = 0; - - // Client requested the config but hasn't received any config from management - // server yet. - CLIENT_REQUESTED = 1; - - // Client received the config and replied with ACK. - CLIENT_ACKED = 2; - - // Client received the config and replied with NACK. Notably, the attached - // config dump is not the NACKed version, but the most recent accepted one. If - // no config is accepted yet, the attached config dump will be empty. - CLIENT_NACKED = 3; - - // Client received an error from the control plane. The attached config - // dump is the most recent accepted one. If no config is accepted yet, - // the attached config dump will be empty. - CLIENT_RECEIVED_ERROR = 4; -} - -// Request for client status of clients identified by a list of NodeMatchers. -message ClientStatusRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v2.ClientStatusRequest"; - - // Management server can use these match criteria to identify clients. - // The match follows OR semantics. - repeated type.matcher.v3.NodeMatcher node_matchers = 1; - - // The node making the csds request. - config.core.v3.Node node = 2; - - // If true, the server will not include the resource contents in the response - // (i.e., the generic_xds_configs.xds_config field will not be populated). - // [#not-implemented-hide:] - bool exclude_resource_contents = 3; -} - -// Detailed config (per xDS) with status. -// [#next-free-field: 8] -message PerXdsConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v2.PerXdsConfig"; - - // Config status generated by management servers. Will not be present if the - // CSDS server is an xDS client. - ConfigStatus status = 1; - - // Client config status is populated by xDS clients. Will not be present if - // the CSDS server is an xDS server. No matter what the client config status - // is, xDS clients should always dump the most recent accepted xDS config. - // - // .. attention:: - // This field is deprecated. Use :ref:`ClientResourceStatus - // ` for per-resource - // config status instead. - ClientConfigStatus client_status = 7 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - oneof per_xds_config { - admin.v3.ListenersConfigDump listener_config = 2; - - admin.v3.ClustersConfigDump cluster_config = 3; - - admin.v3.RoutesConfigDump route_config = 4; - - admin.v3.ScopedRoutesConfigDump scoped_route_config = 5; - - admin.v3.EndpointsConfigDump endpoint_config = 6; - } -} - -// All xds configs for a particular client. -message ClientConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v2.ClientConfig"; - - // GenericXdsConfig is used to specify the config status and the dump - // of any xDS resource identified by their type URL. It is the generalized - // version of the now deprecated ListenersConfigDump, ClustersConfigDump etc - // [#next-free-field: 10] - message GenericXdsConfig { - // Type_url represents the fully qualified name of xDS resource type - // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc. - string type_url = 1; - - // Name of the xDS resource - string name = 2; - - // This is the :ref:`version_info ` - // in the last processed xDS discovery response. If there are only - // static bootstrap listeners, this field will be "" - string version_info = 3; - - // The xDS resource config. Actual content depends on the type - google.protobuf.Any xds_config = 4; - - // Timestamp when the xDS resource was last updated - google.protobuf.Timestamp last_updated = 5; - - // Per xDS resource config status. It is generated by management servers. - // It will not be present if the CSDS server is an xDS client. - ConfigStatus config_status = 6; - - // Per xDS resource status from the view of a xDS client - admin.v3.ClientResourceStatus client_status = 7; - - // Set if the last update failed, cleared after the next successful - // update. The *error_state* field contains the rejected version of - // this particular resource along with the reason and timestamp. For - // successfully updated or acknowledged resource, this field should - // be empty. - // [#not-implemented-hide:] - admin.v3.UpdateFailureState error_state = 8; - - // Is static resource is true if it is specified in the config supplied - // through the file at the startup. - bool is_static_resource = 9; - } - - // Node for a particular client. - config.core.v3.Node node = 1; - - // This field is deprecated in favor of generic_xds_configs which is - // much simpler and uniform in structure. - repeated PerXdsConfig xds_config = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - - // Represents generic xDS config and the exact config structure depends on - // the type URL (like Cluster if it is CDS) - repeated GenericXdsConfig generic_xds_configs = 3; - - // For xDS clients, the scope in which the data is used. - // For example, gRPC indicates the data plane target or that the data is - // associated with gRPC server(s). - string client_scope = 4; -} - -message ClientStatusResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.status.v2.ClientStatusResponse"; - - // Client configs for the clients specified in the ClientStatusRequest. - repeated ClientConfig config = 1; -} diff --git a/src/main/proto/envoy/service/tap/v2alpha/common.proto b/src/main/proto/envoy/service/tap/v2alpha/common.proto deleted file mode 100644 index b06039f..0000000 --- a/src/main/proto/envoy/service/tap/v2alpha/common.proto +++ /dev/null @@ -1,206 +0,0 @@ -syntax = "proto3"; - -package envoy.service.tap.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/api/v2/core/grpc_service.proto"; -import "envoy/api/v2/route/route_components.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; -option java_outer_classname = "CommonProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/tap/v2alpha"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.config.tap.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Common tap configuration] - -// Tap configuration. -message TapConfig { - // [#comment:TODO(mattklein123): Rate limiting] - - // The match configuration. If the configuration matches the data source being tapped, a tap will - // occur, with the result written to the configured output. - MatchPredicate match_config = 1 [(validate.rules).message = {required: true}]; - - // The tap output configuration. If a match configuration matches a data source being tapped, - // a tap will occur and the data will be written to the configured output. - OutputConfig output_config = 2 [(validate.rules).message = {required: true}]; - - // [#not-implemented-hide:] Specify if Tap matching is enabled. The % of requests\connections for - // which the tap matching is enabled. When not enabled, the request\connection will not be - // recorded. - // - // .. note:: - // - // This field defaults to 100/:ref:`HUNDRED - // `. - api.v2.core.RuntimeFractionalPercent tap_enabled = 3; -} - -// Tap match configuration. This is a recursive structure which allows complex nested match -// configurations to be built using various logical operators. -// [#next-free-field: 9] -message MatchPredicate { - // A set of match configurations used for logical operations. - message MatchSet { - // The list of rules that make up the set. - repeated MatchPredicate rules = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof rule { - option (validate.required) = true; - - // A set that describes a logical OR. If any member of the set matches, the match configuration - // matches. - MatchSet or_match = 1; - - // A set that describes a logical AND. If all members of the set match, the match configuration - // matches. - MatchSet and_match = 2; - - // A negation match. The match configuration will match if the negated match condition matches. - MatchPredicate not_match = 3; - - // The match configuration will always match. - bool any_match = 4 [(validate.rules).bool = {const: true}]; - - // HTTP request headers match configuration. - HttpHeadersMatch http_request_headers_match = 5; - - // HTTP request trailers match configuration. - HttpHeadersMatch http_request_trailers_match = 6; - - // HTTP response headers match configuration. - HttpHeadersMatch http_response_headers_match = 7; - - // HTTP response trailers match configuration. - HttpHeadersMatch http_response_trailers_match = 8; - } -} - -// HTTP headers match configuration. -message HttpHeadersMatch { - // HTTP headers to match. - repeated api.v2.route.HeaderMatcher headers = 1; -} - -// Tap output configuration. -message OutputConfig { - // Output sinks for tap data. Currently a single sink is allowed in the list. Once multiple - // sink types are supported this constraint will be relaxed. - repeated OutputSink sinks = 1 [(validate.rules).repeated = {min_items: 1 max_items: 1}]; - - // For buffered tapping, the maximum amount of received body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - google.protobuf.UInt32Value max_buffered_rx_bytes = 2; - - // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to - // truncation. If truncation occurs, the :ref:`truncated - // ` field will be set. If not specified, the - // default is 1KiB. - google.protobuf.UInt32Value max_buffered_tx_bytes = 3; - - // Indicates whether taps produce a single buffered message per tap, or multiple streamed - // messages per tap in the emitted :ref:`TraceWrapper - // ` messages. Note that streamed tapping does not - // mean that no buffering takes place. Buffering may be required if data is processed before a - // match can be determined. See the HTTP tap filter :ref:`streaming - // ` documentation for more information. - bool streaming = 4; -} - -// Tap output sink configuration. -message OutputSink { - // Output format. All output is in the form of one or more :ref:`TraceWrapper - // ` messages. This enumeration indicates - // how those messages are written. Note that not all sinks support all output formats. See - // individual sink documentation for more information. - enum Format { - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_bytes - // ` field. This means that body data will be - // base64 encoded as per the `proto3 JSON mappings - // `_. - JSON_BODY_AS_BYTES = 0; - - // Each message will be written as JSON. Any :ref:`body ` - // data will be present in the :ref:`as_string - // ` field. This means that body data will be - // string encoded as per the `proto3 JSON mappings - // `_. This format type is - // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the - // user wishes to view it directly without being forced to base64 decode the body. - JSON_BODY_AS_STRING = 1; - - // Binary proto format. Note that binary proto is not self-delimiting. If a sink writes - // multiple binary messages without any length information the data stream will not be - // useful. However, for certain sinks that are self-delimiting (e.g., one message per file) - // this output format makes consumption simpler. - PROTO_BINARY = 2; - - // Messages are written as a sequence tuples, where each tuple is the message length encoded - // as a `protobuf 32-bit varint - // `_ - // followed by the binary message. The messages can be read back using the language specific - // protobuf coded stream implementation to obtain the message length and the message. - PROTO_BINARY_LENGTH_DELIMITED = 3; - - // Text proto format. - PROTO_TEXT = 4; - } - - // Sink output format. - Format format = 1 [(validate.rules).enum = {defined_only: true}]; - - oneof output_sink_type { - option (validate.required) = true; - - // Tap output will be streamed out the :http:post:`/tap` admin endpoint. - // - // .. attention:: - // - // It is only allowed to specify the streaming admin output sink if the tap is being - // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has - // been configured to receive tap configuration from some other source (e.g., static - // file, XDS, etc.) configuring the streaming admin output type will fail. - StreamingAdminSink streaming_admin = 2; - - // Tap output will be written to a file per tap sink. - FilePerTapSink file_per_tap = 3; - - // [#not-implemented-hide:] - // GrpcService to stream data to. The format argument must be PROTO_BINARY. - StreamingGrpcSink streaming_grpc = 4; - } -} - -// Streaming admin sink configuration. -message StreamingAdminSink { -} - -// The file per tap sink outputs a discrete file for every tapped stream. -message FilePerTapSink { - // Path prefix. The output file will be of the form _.pb, where is an - // identifier distinguishing the recorded trace for stream instances (the Envoy - // connection ID, HTTP stream ID, etc.). - string path_prefix = 1 [(validate.rules).string = {min_bytes: 1}]; -} - -// [#not-implemented-hide:] Streaming gRPC sink configuration sends the taps to an external gRPC -// server. -message StreamingGrpcSink { - // Opaque identifier, that will be sent back to the streaming grpc server. - string tap_id = 1; - - // The gRPC server that hosts the Tap Sink Service. - api.v2.core.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/service/tap/v2alpha/tap.proto b/src/main/proto/envoy/service/tap/v2alpha/tap.proto deleted file mode 100644 index f58d126..0000000 --- a/src/main/proto/envoy/service/tap/v2alpha/tap.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package envoy.service.tap.v2alpha; - -import "envoy/api/v2/core/base.proto"; -import "envoy/data/tap/v2alpha/wrapper.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.tap.v2alpha"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/tap/v2alpha"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Tap Sink Service] - -// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call -// StreamTaps to deliver captured taps to the server -service TapSinkService { - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { - } -} - -// [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server -// and stream taps without ever expecting a response. -message StreamTapsRequest { - message Identifier { - // The node sending taps over the stream. - api.v2.core.Node node = 1 [(validate.rules).message = {required: true}]; - - // The opaque identifier that was set in the :ref:`output config - // `. - string tap_id = 2; - } - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier identifier = 1; - - // The trace id. this can be used to merge together a streaming trace. Note that the trace_id - // is not guaranteed to be spatially or temporally unique. - uint64 trace_id = 2; - - // The trace data. - data.tap.v2alpha.TraceWrapper trace = 3; -} - -// [#not-implemented-hide:] -message StreamTapsResponse { -} diff --git a/src/main/proto/envoy/service/tap/v3/tap.proto b/src/main/proto/envoy/service/tap/v3/tap.proto deleted file mode 100644 index ea57fc4..0000000 --- a/src/main/proto/envoy/service/tap/v3/tap.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto3"; - -package envoy.service.tap.v3; - -import "envoy/config/core/v3/base.proto"; -import "envoy/data/tap/v3/wrapper.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.service.tap.v3"; -option java_outer_classname = "TapProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/tap/v3;tapv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Tap sink service] - -// [#not-implemented-hide:] A tap service to receive incoming taps. Envoy will call -// StreamTaps to deliver captured taps to the server -service TapSinkService { - // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any - // response to be sent as nothing would be done in the case of failure. The server should - // disconnect if it expects Envoy to reconnect. - rpc StreamTaps(stream StreamTapsRequest) returns (StreamTapsResponse) { - } -} - -// [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server -// and stream taps without ever expecting a response. -message StreamTapsRequest { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.StreamTapsRequest"; - - message Identifier { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.StreamTapsRequest.Identifier"; - - // The node sending taps over the stream. - config.core.v3.Node node = 1 [(validate.rules).message = {required: true}]; - - // The opaque identifier that was set in the :ref:`output config - // `. - string tap_id = 2; - } - - // Identifier data effectively is a structured metadata. As a performance optimization this will - // only be sent in the first message on the stream. - Identifier identifier = 1; - - // The trace id. this can be used to merge together a streaming trace. Note that the trace_id - // is not guaranteed to be spatially or temporally unique. - uint64 trace_id = 2; - - // The trace data. - data.tap.v3.TraceWrapper trace = 3; -} - -// [#not-implemented-hide:] -message StreamTapsResponse { - option (udpa.annotations.versioning).previous_message_type = - "envoy.service.tap.v2alpha.StreamTapsResponse"; -} diff --git a/src/main/proto/envoy/type/hash_policy.proto b/src/main/proto/envoy/type/hash_policy.proto deleted file mode 100644 index f022f09..0000000 --- a/src/main/proto/envoy/type/hash_policy.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "HashPolicyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Hash Policy] - -// Specifies the hash policy -message HashPolicy { - // The source IP will be used to compute the hash used by hash-based load balancing - // algorithms. - message SourceIp { - } - - oneof policy_specifier { - option (validate.required) = true; - - SourceIp source_ip = 1; - } -} diff --git a/src/main/proto/envoy/type/http.proto b/src/main/proto/envoy/type/http.proto deleted file mode 100644 index 51768f1..0000000 --- a/src/main/proto/envoy/type/http.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "HttpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP] - -enum CodecClientType { - HTTP1 = 0; - - HTTP2 = 1; - - // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with - // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient - // to distinguish HTTP1 and HTTP2 traffic. - HTTP3 = 2; -} diff --git a/src/main/proto/envoy/type/http/v3/cookie.proto b/src/main/proto/envoy/type/http/v3/cookie.proto deleted file mode 100644 index a7e7e9c..0000000 --- a/src/main/proto/envoy/type/http/v3/cookie.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package envoy.type.http.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.http.v3"; -option java_outer_classname = "CookieProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/http/v3;httpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP cookie API] - -// Cookie defines an API for obtaining or generating HTTP cookie. -message Cookie { - // The name that will be used to obtain cookie value from downstream HTTP request or generate - // new cookie for downstream. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // Duration of cookie. This will be used to set the expiry time of a new cookie when it is - // generated. Set this to 0s to use a session cookie and disable cookie expiration. - google.protobuf.Duration ttl = 2 [(validate.rules).duration = {gte {}}]; - - // Path of cookie. This will be used to set the path of a new cookie when it is generated. - // If no path is specified here, no path will be set for the cookie. - string path = 3; - - // Additional attributes for the cookie. They will be used when generating a new cookie. - repeated CookieAttribute attributes = 4; -} - -// CookieAttribute defines an API for adding additional attributes for a HTTP cookie. -message CookieAttribute { - // The name of the cookie attribute. - string name = 1 - [(validate.rules).string = - {min_len: 1 max_bytes: 16384 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // The optional value of the cookie attribute. - string value = 2 [ - (validate.rules).string = {max_bytes: 16384 well_known_regex: HTTP_HEADER_VALUE strict: false} - ]; -} diff --git a/src/main/proto/envoy/type/http/v3/path_transformation.proto b/src/main/proto/envoy/type/http/v3/path_transformation.proto deleted file mode 100644 index 2e974ca..0000000 --- a/src/main/proto/envoy/type/http/v3/path_transformation.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package envoy.type.http.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.http.v3"; -option java_outer_classname = "PathTransformationProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/http/v3;httpv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Path Transformations API] - -// PathTransformation defines an API to apply a sequence of operations that can be used to alter -// text before it is used for matching or routing. Multiple actions can be applied in the same -// Transformation, forming a sequential pipeline. The transformations will be performed in the order -// that they appear. -// -// This API is a work in progress. - -message PathTransformation { - // A type of operation to alter text. - message Operation { - // Should text be normalized according to RFC 3986? This typically is used for path headers - // before any processing of requests by HTTP filters or routing. This applies percent-encoded - // normalization and path segment normalization. Fails on characters disallowed in URLs - // (e.g. NULLs). See `Normalization and Comparison - // `_ for details of normalization. Note that - // this options does not perform `case normalization - // `_ - message NormalizePathRFC3986 { - } - - // Determines if adjacent slashes are merged into one. A common use case is for a request path - // header. Using this option in ``:ref: PathNormalizationOptions - // `` - // will allow incoming requests with path ``//dir///file`` to match against route with ``prefix`` - // match set to ``/dir``. When using for header transformations, note that slash merging is not - // part of `HTTP spec `_ and is provided for convenience. - message MergeSlashes { - } - - oneof operation_specifier { - option (validate.required) = true; - - // Enable path normalization per RFC 3986. - NormalizePathRFC3986 normalize_path_rfc_3986 = 2; - - // Enable merging adjacent slashes. - MergeSlashes merge_slashes = 3; - } - } - - // A list of operations to apply. Transformations will be performed in the order that they appear. - repeated Operation operations = 1; -} diff --git a/src/main/proto/envoy/type/http_status.proto b/src/main/proto/envoy/type/http_status.proto deleted file mode 100644 index 0d22234..0000000 --- a/src/main/proto/envoy/type/http_status.proto +++ /dev/null @@ -1,140 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "HttpStatusProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: HTTP status codes] - -// HTTP response codes supported in Envoy. -// For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml -enum StatusCode { - // Empty - This code not part of the HTTP status code specification, but it is needed for proto - // `enum` type. - Empty = 0; - - Continue = 100; - - OK = 200; - - Created = 201; - - Accepted = 202; - - NonAuthoritativeInformation = 203; - - NoContent = 204; - - ResetContent = 205; - - PartialContent = 206; - - MultiStatus = 207; - - AlreadyReported = 208; - - IMUsed = 226; - - MultipleChoices = 300; - - MovedPermanently = 301; - - Found = 302; - - SeeOther = 303; - - NotModified = 304; - - UseProxy = 305; - - TemporaryRedirect = 307; - - PermanentRedirect = 308; - - BadRequest = 400; - - Unauthorized = 401; - - PaymentRequired = 402; - - Forbidden = 403; - - NotFound = 404; - - MethodNotAllowed = 405; - - NotAcceptable = 406; - - ProxyAuthenticationRequired = 407; - - RequestTimeout = 408; - - Conflict = 409; - - Gone = 410; - - LengthRequired = 411; - - PreconditionFailed = 412; - - PayloadTooLarge = 413; - - URITooLong = 414; - - UnsupportedMediaType = 415; - - RangeNotSatisfiable = 416; - - ExpectationFailed = 417; - - MisdirectedRequest = 421; - - UnprocessableEntity = 422; - - Locked = 423; - - FailedDependency = 424; - - UpgradeRequired = 426; - - PreconditionRequired = 428; - - TooManyRequests = 429; - - RequestHeaderFieldsTooLarge = 431; - - InternalServerError = 500; - - NotImplemented = 501; - - BadGateway = 502; - - ServiceUnavailable = 503; - - GatewayTimeout = 504; - - HTTPVersionNotSupported = 505; - - VariantAlsoNegotiates = 506; - - InsufficientStorage = 507; - - LoopDetected = 508; - - NotExtended = 510; - - NetworkAuthenticationRequired = 511; -} - -// HTTP status. -message HttpStatus { - // Supplies HTTP response code. - StatusCode code = 1 [(validate.rules).enum = {defined_only: true not_in: 0}]; -} diff --git a/src/main/proto/envoy/type/matcher/metadata.proto b/src/main/proto/envoy/type/matcher/metadata.proto deleted file mode 100644 index 20da230..0000000 --- a/src/main/proto/envoy/type/matcher/metadata.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/matcher/value.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Metadata matcher] - -// MetadataMatcher provides a general interface to check if a given value is matched in -// :ref:`Metadata `. It uses `filter` and `path` to retrieve the value -// from the Metadata and then check if it's matched to the specified value. -// -// For example, for the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.filters.http.rbac: -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// filter: envoy.filters.http.rbac -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following MetadataMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// filter: envoy.filters.http.rbac -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of MetadataMatcher is specifying additional metadata in envoy.filters.http.rbac to -// enforce access control based on dynamic metadata in a request. See :ref:`Permission -// ` and :ref:`Principal -// `. - -// [#next-major-version: MetadataMatcher should use StructMatcher] -message MetadataMatcher { - // Specifies the segment in a path to retrieve value from Metadata. - // Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that - // if the segment key refers to a list, it has to be the last segment in a path. - message PathSegment { - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The filter name to retrieve the Struct from the Metadata. - string filter = 1 [(validate.rules).string = {min_len: 1}]; - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The MetadataMatcher is matched if the value retrieved by path is matched to this value. - ValueMatcher value = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/type/matcher/node.proto b/src/main/proto/envoy/type/matcher/node.proto deleted file mode 100644 index 5dcf1e6..0000000 --- a/src/main/proto/envoy/type/matcher/node.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/matcher/string.proto"; -import "envoy/type/matcher/struct.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "NodeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Node matcher] - -// Specifies the way to match a Node. -// The match follows AND semantics. -message NodeMatcher { - // Specifies match criteria on the node id. - StringMatcher node_id = 1; - - // Specifies match criteria on the node metadata. - repeated StructMatcher node_metadatas = 2; -} diff --git a/src/main/proto/envoy/type/matcher/number.proto b/src/main/proto/envoy/type/matcher/number.proto deleted file mode 100644 index 4c5b4db..0000000 --- a/src/main/proto/envoy/type/matcher/number.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/range.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "NumberProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Number matcher] - -// Specifies the way to match a double value. -message DoubleMatcher { - oneof match_pattern { - option (validate.required) = true; - - // If specified, the input double value must be in the range specified here. - // Note: The range is using half-open interval semantics [start, end). - DoubleRange range = 1; - - // If specified, the input double value must be equal to the value specified here. - double exact = 2; - } -} diff --git a/src/main/proto/envoy/type/matcher/path.proto b/src/main/proto/envoy/type/matcher/path.proto deleted file mode 100644 index 1a97bbc..0000000 --- a/src/main/proto/envoy/type/matcher/path.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/matcher/string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "PathProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Path matcher] - -// Specifies the way to match a path on HTTP request. -message PathMatcher { - oneof rule { - option (validate.required) = true; - - // The `path` must match the URL path portion of the :path header. The query and fragment - // string (if present) are removed in the URL path portion. - // For example, the path */data* will match the *:path* header */data#fragment?param=value*. - StringMatcher path = 1 [(validate.rules).message = {required: true}]; - } -} diff --git a/src/main/proto/envoy/type/matcher/regex.proto b/src/main/proto/envoy/type/matcher/regex.proto deleted file mode 100644 index e009a5a..0000000 --- a/src/main/proto/envoy/type/matcher/regex.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "RegexProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Regex matcher] - -// A regex matcher designed for safety when used with untrusted input. -message RegexMatcher { - // Google's `RE2 `_ regex engine. The regex string must adhere to - // the documented `syntax `_. The engine is designed - // to complete execution in linear time as well as limit the amount of memory used. - // - // Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` - // and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or - // complexity that a compiled regex can have before an exception is thrown or a warning is - // logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and - // ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). - // - // Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, - // which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented - // each time the program size exceeds the warn level threshold. - message GoogleRE2 { - // This field controls the RE2 "program size" which is a rough estimate of how complex a - // compiled regex is to evaluate. A regex that has a program size greater than the configured - // value will fail to compile. In this case, the configured max program size can be increased - // or the regex can be simplified. If not specified, the default is 100. - // - // This field is deprecated; regexp validation should be performed on the management server - // instead of being done by each individual client. - google.protobuf.UInt32Value max_program_size = 1 [deprecated = true]; - } - - oneof engine_type { - option (validate.required) = true; - - // Google's RE2 regex engine. - GoogleRE2 google_re2 = 1 [(validate.rules).message = {required: true}]; - } - - // The regex match string. The string must be supported by the configured engine. - string regex = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Describes how to match a string and then produce a new string using a regular -// expression and a substitution string. -message RegexMatchAndSubstitute { - // The regular expression used to find portions of a string (hereafter called - // the "subject string") that should be replaced. When a new string is - // produced during the substitution operation, the new string is initially - // the same as the subject string, but then all matches in the subject string - // are replaced by the substitution string. If replacing all matches isn't - // desired, regular expression anchors can be used to ensure a single match, - // so as to replace just one occurrence of a pattern. Capture groups can be - // used in the pattern to extract portions of the subject string, and then - // referenced in the substitution string. - RegexMatcher pattern = 1; - - // The string that should be substituted into matching portions of the - // subject string during a substitution operation to produce a new string. - // Capture groups in the pattern can be referenced in the substitution - // string. Note, however, that the syntax for referring to capture groups is - // defined by the chosen regular expression engine. Google's `RE2 - // `_ regular expression engine uses a - // backslash followed by the capture group number to denote a numbered - // capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers - // to capture group 2. - string substitution = 2; -} diff --git a/src/main/proto/envoy/type/matcher/string.proto b/src/main/proto/envoy/type/matcher/string.proto deleted file mode 100644 index b4571ce..0000000 --- a/src/main/proto/envoy/type/matcher/string.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/matcher/regex.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "StringProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: String matcher] - -// Specifies the way to match a string. -// [#next-free-field: 7] -message StringMatcher { - oneof match_pattern { - option (validate.required) = true; - - // The input string must match exactly the string specified here. - // - // Examples: - // - // * *abc* only matches the value *abc*. - string exact = 1; - - // The input string must have the prefix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *abc.xyz* - string prefix = 2 [(validate.rules).string = {min_len: 1}]; - - // The input string must have the suffix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc* - string suffix = 3 [(validate.rules).string = {min_len: 1}]; - - // The input string must match the regular expression specified here. - // The regex grammar is defined `here - // `_. - // - // Examples: - // - // * The regex ``\d{3}`` matches the value *123* - // * The regex ``\d{3}`` does not match the value *1234* - // * The regex ``\d{3}`` does not match the value *123.456* - // - // .. attention:: - // This field has been deprecated in favor of `safe_regex` as it is not safe for use with - // untrusted input in all cases. - string regex = 4 [ - deprecated = true, - (validate.rules).string = {max_bytes: 1024}, - (envoy.annotations.disallowed_by_default) = true - ]; - - // The input string must match the regular expression specified here. - RegexMatcher safe_regex = 5 [(validate.rules).message = {required: true}]; - } - - // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no - // effect for the safe_regex match. - // For example, the matcher *data* will match both input string *Data* and *data* if set to true. - bool ignore_case = 6; -} - -// Specifies a list of ways to match a string. -message ListStringMatcher { - repeated StringMatcher patterns = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/type/matcher/struct.proto b/src/main/proto/envoy/type/matcher/struct.proto deleted file mode 100644 index f08bf79..0000000 --- a/src/main/proto/envoy/type/matcher/struct.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/matcher/value.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "StructProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Struct matcher] - -// StructMatcher provides a general interface to check if a given value is matched in -// google.protobuf.Struct. It uses `path` to retrieve the value -// from the struct and then check if it's matched to the specified value. -// -// For example, for the following Struct: -// -// .. code-block:: yaml -// -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following StructMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. -message StructMatcher { - // Specifies the segment in a path to retrieve value from Struct. - message PathSegment { - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The StructMatcher is matched if the value retrieved by path is matched to this value. - ValueMatcher value = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/type/matcher/v3/address.proto b/src/main/proto/envoy/type/matcher/v3/address.proto deleted file mode 100644 index 8a03a53..0000000 --- a/src/main/proto/envoy/type/matcher/v3/address.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "xds/core/v3/cidr.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "AddressProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Address Matcher] - -// Match an IP against a repeated CIDR range. This matcher is intended to be -// used in other matchers, for example in the filter state matcher to match a -// filter state object as an IP. -message AddressMatcher { - repeated xds.core.v3.CidrRange ranges = 1; -} diff --git a/src/main/proto/envoy/type/matcher/v3/filter_state.proto b/src/main/proto/envoy/type/matcher/v3/filter_state.proto deleted file mode 100644 index 8c38a51..0000000 --- a/src/main/proto/envoy/type/matcher/v3/filter_state.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/address.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "FilterStateProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Filter state matcher] - -// FilterStateMatcher provides a general interface for matching the filter state objects. -message FilterStateMatcher { - // The filter state key to retrieve the object. - string key = 1 [(validate.rules).string = {min_len: 1}]; - - oneof matcher { - option (validate.required) = true; - - // Matches the filter state object as a string value. - StringMatcher string_match = 2; - - // Matches the filter state object as a ip Instance. - AddressMatcher address_match = 3; - } -} diff --git a/src/main/proto/envoy/type/matcher/v3/http_inputs.proto b/src/main/proto/envoy/type/matcher/v3/http_inputs.proto deleted file mode 100644 index c90199e..0000000 --- a/src/main/proto/envoy/type/matcher/v3/http_inputs.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "HttpInputsProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common HTTP inputs] - -// Match input indicates that matching should be done on a specific request header. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.request_headers] -message HttpRequestHeaderMatchInput { - // The request header to match on. - string header_name = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} - -// Match input indicates that matching should be done on a specific request trailer. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.request_trailers] -message HttpRequestTrailerMatchInput { - // The request trailer to match on. - string header_name = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} - -// Match input indicating that matching should be done on a specific response header. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the response contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.response_headers] -message HttpResponseHeaderMatchInput { - // The response header to match on. - string header_name = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} - -// Match input indicates that matching should be done on a specific response trailer. -// The resulting input string will be all headers for the given key joined by a comma, -// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input -// string will be 'bar,baz'. -// [#comment:TODO(snowp): Link to unified matching docs.] -// [#extension: envoy.matching.inputs.response_trailers] -message HttpResponseTrailerMatchInput { - // The response trailer to match on. - string header_name = 1 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}]; -} - -// Match input indicates that matching should be done on a specific query parameter. -// The resulting input string will be the first query parameter for the value -// 'query_param'. -// [#extension: envoy.matching.inputs.query_params] -message HttpRequestQueryParamMatchInput { - // The query parameter to match on. - string query_param = 1 [(validate.rules).string = {min_len: 1}]; -} diff --git a/src/main/proto/envoy/type/matcher/v3/metadata.proto b/src/main/proto/envoy/type/matcher/v3/metadata.proto deleted file mode 100644 index 30abde9..0000000 --- a/src/main/proto/envoy/type/matcher/v3/metadata.proto +++ /dev/null @@ -1,110 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/value.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Metadata matcher] - -// ``MetadataMatcher`` provides a general interface to check if a given value is matched in -// :ref:`Metadata `. It uses ``filter`` and ``path`` to retrieve the value -// from the ``Metadata`` and then check if it's matched to the specified value. -// -// For example, for the following ``Metadata``: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.filters.http.rbac: -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following ``MetadataMatcher`` is matched as the path ``[a, b, c]`` will retrieve a string value ``pro`` -// from the ``Metadata`` which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// filter: envoy.filters.http.rbac -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following ``MetadataMatcher`` is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// filter: envoy.filters.http.rbac -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of ``MetadataMatcher`` is specifying additional metadata in ``envoy.filters.http.rbac`` to -// enforce access control based on dynamic metadata in a request. See :ref:`Permission -// ` and :ref:`Principal -// `. - -// [#next-major-version: MetadataMatcher should use StructMatcher] -message MetadataMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.MetadataMatcher"; - - // Specifies the segment in a path to retrieve value from ``Metadata``. - // - // .. note:: - // Currently it's not supported to retrieve a value from a list in ``Metadata``. This means that - // if the segment key refers to a list, it has to be the last segment in a path. - message PathSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.MetadataMatcher.PathSegment"; - - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a ``Struct``. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The filter name to retrieve the ``Struct`` from the ``Metadata``. - string filter = 1 [(validate.rules).string = {min_len: 1}]; - - // The path to retrieve the ``Value`` from the ``Struct``. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The ``MetadataMatcher`` is matched if the value retrieved by path is matched to this value. - ValueMatcher value = 3 [(validate.rules).message = {required: true}]; - - // If true, the match result will be inverted. - bool invert = 4; -} diff --git a/src/main/proto/envoy/type/matcher/v3/node.proto b/src/main/proto/envoy/type/matcher/v3/node.proto deleted file mode 100644 index baa92fb..0000000 --- a/src/main/proto/envoy/type/matcher/v3/node.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/string.proto"; -import "envoy/type/matcher/v3/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "NodeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Node matcher] - -// Specifies the way to match a Node. -// The match follows AND semantics. -message NodeMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.NodeMatcher"; - - // Specifies match criteria on the node id. - StringMatcher node_id = 1; - - // Specifies match criteria on the node metadata. - repeated StructMatcher node_metadatas = 2; -} diff --git a/src/main/proto/envoy/type/matcher/v3/number.proto b/src/main/proto/envoy/type/matcher/v3/number.proto deleted file mode 100644 index 99681c9..0000000 --- a/src/main/proto/envoy/type/matcher/v3/number.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/v3/range.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "NumberProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Number matcher] - -// Specifies the way to match a double value. -message DoubleMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.DoubleMatcher"; - - oneof match_pattern { - option (validate.required) = true; - - // If specified, the input double value must be in the range specified here. - // Note: The range is using half-open interval semantics [start, end). - type.v3.DoubleRange range = 1; - - // If specified, the input double value must be equal to the value specified here. - double exact = 2; - } -} diff --git a/src/main/proto/envoy/type/matcher/v3/path.proto b/src/main/proto/envoy/type/matcher/v3/path.proto deleted file mode 100644 index 46b758e..0000000 --- a/src/main/proto/envoy/type/matcher/v3/path.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "PathProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Path matcher] - -// Specifies the way to match a path on HTTP request. -message PathMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.PathMatcher"; - - oneof rule { - option (validate.required) = true; - - // The ``path`` must match the URL path portion of the :path header. The query and fragment - // string (if present) are removed in the URL path portion. - // For example, the path ``/data`` will match the ``:path`` header ``/data#fragment?param=value``. - StringMatcher path = 1 [(validate.rules).message = {required: true}]; - } -} diff --git a/src/main/proto/envoy/type/matcher/v3/regex.proto b/src/main/proto/envoy/type/matcher/v3/regex.proto deleted file mode 100644 index 10b3970..0000000 --- a/src/main/proto/envoy/type/matcher/v3/regex.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "google/protobuf/wrappers.proto"; - -import "envoy/annotations/deprecation.proto"; -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "RegexProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Regex matcher] - -// A regex matcher designed for safety when used with untrusted input. -message RegexMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.RegexMatcher"; - - // Google's `RE2 `_ regex engine. The regex string must adhere to - // the documented `syntax `_. The engine is designed - // to complete execution in linear time as well as limit the amount of memory used. - // - // Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` - // and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or - // complexity that a compiled regex can have before an exception is thrown or a warning is - // logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and - // ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). - // - // Envoy emits two stats for tracking the program size of regexes: the histogram ``re2.program_size``, - // which records the program size, and the counter ``re2.exceeded_warn_level``, which is incremented - // each time the program size exceeds the warn level threshold. - message GoogleRE2 { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.RegexMatcher.GoogleRE2"; - - // This field controls the RE2 "program size" which is a rough estimate of how complex a - // compiled regex is to evaluate. A regex that has a program size greater than the configured - // value will fail to compile. In this case, the configured max program size can be increased - // or the regex can be simplified. If not specified, the default is 100. - // - // This field is deprecated; regexp validation should be performed on the management server - // instead of being done by each individual client. - // - // .. note:: - // - // Although this field is deprecated, the program size will still be checked against the - // global ``re2.max_program_size.error_level`` runtime value. - // - google.protobuf.UInt32Value max_program_size = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - } - - oneof engine_type { - // Google's RE2 regex engine. - GoogleRE2 google_re2 = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; - } - - // The regex match string. The string must be supported by the configured engine. The regex is matched - // against the full string, not as a partial match. - string regex = 2 [(validate.rules).string = {min_len: 1}]; -} - -// Describes how to match a string and then produce a new string using a regular -// expression and a substitution string. -message RegexMatchAndSubstitute { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.RegexMatchAndSubstitute"; - - // The regular expression used to find portions of a string (hereafter called - // the "subject string") that should be replaced. When a new string is - // produced during the substitution operation, the new string is initially - // the same as the subject string, but then all matches in the subject string - // are replaced by the substitution string. If replacing all matches isn't - // desired, regular expression anchors can be used to ensure a single match, - // so as to replace just one occurrence of a pattern. Capture groups can be - // used in the pattern to extract portions of the subject string, and then - // referenced in the substitution string. - RegexMatcher pattern = 1 [(validate.rules).message = {required: true}]; - - // The string that should be substituted into matching portions of the - // subject string during a substitution operation to produce a new string. - // Capture groups in the pattern can be referenced in the substitution - // string. Note, however, that the syntax for referring to capture groups is - // defined by the chosen regular expression engine. Google's `RE2 - // `_ regular expression engine uses a - // backslash followed by the capture group number to denote a numbered - // capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers - // to capture group 2. - string substitution = 2 - [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; -} diff --git a/src/main/proto/envoy/type/matcher/v3/status_code_input.proto b/src/main/proto/envoy/type/matcher/v3/status_code_input.proto deleted file mode 100644 index 2242aea..0000000 --- a/src/main/proto/envoy/type/matcher/v3/status_code_input.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "StatusCodeInputProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Common HTTP Inputs] - -// Match input indicates that matching should be done on the response status -// code. -message HttpResponseStatusCodeMatchInput { -} - -// Match input indicates that the matching should be done on the class of the -// response status code. For eg: 1xx, 2xx, 3xx, 4xx or 5xx. -message HttpResponseStatusCodeClassMatchInput { -} diff --git a/src/main/proto/envoy/type/matcher/v3/string.proto b/src/main/proto/envoy/type/matcher/v3/string.proto deleted file mode 100644 index 56d3956..0000000 --- a/src/main/proto/envoy/type/matcher/v3/string.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/regex.proto"; - -import "xds/core/v3/extension.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "StringProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: String matcher] - -// Specifies the way to match a string. -// [#next-free-field: 9] -message StringMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.StringMatcher"; - - reserved 4; - - reserved "regex"; - - oneof match_pattern { - option (validate.required) = true; - - // The input string must match exactly the string specified here. - // - // Examples: - // - // * ``abc`` only matches the value ``abc``. - string exact = 1; - - // The input string must have the prefix specified here. - // - // .. note:: - // - // Empty prefix match is not allowed, please use ``safe_regex`` instead. - // - // Examples: - // - // * ``abc`` matches the value ``abc.xyz`` - string prefix = 2 [(validate.rules).string = {min_len: 1}]; - - // The input string must have the suffix specified here. - // - // .. note:: - // - // Empty suffix match is not allowed, please use ``safe_regex`` instead. - // - // Examples: - // - // * ``abc`` matches the value ``xyz.abc`` - string suffix = 3 [(validate.rules).string = {min_len: 1}]; - - // The input string must match the regular expression specified here. - RegexMatcher safe_regex = 5 [(validate.rules).message = {required: true}]; - - // The input string must have the substring specified here. - // - // .. note:: - // - // Empty contains match is not allowed, please use ``safe_regex`` instead. - // - // Examples: - // - // * ``abc`` matches the value ``xyz.abc.def`` - string contains = 7 [(validate.rules).string = {min_len: 1}]; - - // Use an extension as the matcher type. - // [#extension-category: envoy.string_matcher] - xds.core.v3.TypedExtensionConfig custom = 8; - } - - // If ``true``, indicates the exact/prefix/suffix/contains matching should be case insensitive. This - // has no effect for the ``safe_regex`` match. - // For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if this option - // is set to ``true``. - bool ignore_case = 6; -} - -// Specifies a list of ways to match a string. -message ListStringMatcher { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.ListStringMatcher"; - - repeated StringMatcher patterns = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/envoy/type/matcher/v3/struct.proto b/src/main/proto/envoy/type/matcher/v3/struct.proto deleted file mode 100644 index 1b96334..0000000 --- a/src/main/proto/envoy/type/matcher/v3/struct.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/value.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "StructProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Struct matcher] - -// StructMatcher provides a general interface to check if a given value is matched in -// google.protobuf.Struct. It uses ``path`` to retrieve the value -// from the struct and then check if it's matched to the specified value. -// -// For example, for the following Struct: -// -// .. code-block:: yaml -// -// fields: -// a: -// struct_value: -// fields: -// b: -// struct_value: -// fields: -// c: -// string_value: pro -// t: -// list_value: -// values: -// - string_value: m -// - string_value: n -// -// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" -// from the Metadata which is matched to the specified prefix match. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: b -// - key: c -// value: -// string_match: -// prefix: pr -// -// The following StructMatcher is matched as the code will match one of the string values in the -// list at the path [a, t]. -// -// .. code-block:: yaml -// -// path: -// - key: a -// - key: t -// value: -// list_match: -// one_of: -// string_match: -// exact: m -// -// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. -message StructMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.StructMatcher"; - - // Specifies the segment in a path to retrieve value from Struct. - message PathSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.StructMatcher.PathSegment"; - - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The path to retrieve the Value from the Struct. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; - - // The StructMatcher is matched if the value retrieved by path is matched to this value. - ValueMatcher value = 3 [(validate.rules).message = {required: true}]; -} diff --git a/src/main/proto/envoy/type/matcher/v3/value.proto b/src/main/proto/envoy/type/matcher/v3/value.proto deleted file mode 100644 index 8d65c45..0000000 --- a/src/main/proto/envoy/type/matcher/v3/value.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher.v3; - -import "envoy/type/matcher/v3/number.proto"; -import "envoy/type/matcher/v3/string.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher.v3"; -option java_outer_classname = "ValueProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3;matcherv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Value matcher] - -// Specifies the way to match a Protobuf::Value. Primitive values and ListValue are supported. -// StructValue is not supported and is always not matched. -// [#next-free-field: 8] -message ValueMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.ValueMatcher"; - - // NullMatch is an empty message to specify a null value. - message NullMatch { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.matcher.ValueMatcher.NullMatch"; - } - - // Specifies how to match a value. - oneof match_pattern { - option (validate.required) = true; - - // If specified, a match occurs if and only if the target value is a NullValue. - NullMatch null_match = 1; - - // If specified, a match occurs if and only if the target value is a double value and is - // matched to this field. - DoubleMatcher double_match = 2; - - // If specified, a match occurs if and only if the target value is a string value and is - // matched to this field. - StringMatcher string_match = 3; - - // If specified, a match occurs if and only if the target value is a bool value and is equal - // to this field. - bool bool_match = 4; - - // If specified, value match will be performed based on whether the path is referring to a - // valid primitive value in the metadata. If the path is referring to a non-primitive value, - // the result is always not matched. - bool present_match = 5; - - // If specified, a match occurs if and only if the target value is a list value and - // is matched to this field. - ListMatcher list_match = 6; - - // If specified, a match occurs if and only if any of the alternatives in the match accept the value. - OrMatcher or_match = 7; - } -} - -// Specifies the way to match a list value. -message ListMatcher { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.matcher.ListMatcher"; - - oneof match_pattern { - option (validate.required) = true; - - // If specified, at least one of the values in the list must match the value specified. - ValueMatcher one_of = 1; - } -} - -// Specifies a list of alternatives for the match. -message OrMatcher { - repeated ValueMatcher value_matchers = 1 [(validate.rules).repeated = {min_items: 2}]; -} diff --git a/src/main/proto/envoy/type/matcher/value.proto b/src/main/proto/envoy/type/matcher/value.proto deleted file mode 100644 index 6452fce..0000000 --- a/src/main/proto/envoy/type/matcher/value.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package envoy.type.matcher; - -import "envoy/type/matcher/number.proto"; -import "envoy/type/matcher/string.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.matcher"; -option java_outer_classname = "ValueProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/matcher"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Value matcher] - -// Specifies the way to match a Protobuf::Value. Primitive values and ListValue are supported. -// StructValue is not supported and is always not matched. -// [#next-free-field: 7] -message ValueMatcher { - // NullMatch is an empty message to specify a null value. - message NullMatch { - } - - // Specifies how to match a value. - oneof match_pattern { - option (validate.required) = true; - - // If specified, a match occurs if and only if the target value is a NullValue. - NullMatch null_match = 1; - - // If specified, a match occurs if and only if the target value is a double value and is - // matched to this field. - DoubleMatcher double_match = 2; - - // If specified, a match occurs if and only if the target value is a string value and is - // matched to this field. - StringMatcher string_match = 3; - - // If specified, a match occurs if and only if the target value is a bool value and is equal - // to this field. - bool bool_match = 4; - - // If specified, value match will be performed based on whether the path is referring to a - // valid primitive value in the metadata. If the path is referring to a non-primitive value, - // the result is always not matched. - bool present_match = 5; - - // If specified, a match occurs if and only if the target value is a list value and - // is matched to this field. - ListMatcher list_match = 6; - } -} - -// Specifies the way to match a list value. -message ListMatcher { - oneof match_pattern { - option (validate.required) = true; - - // If specified, at least one of the values in the list must match the value specified. - ValueMatcher one_of = 1; - } -} diff --git a/src/main/proto/envoy/type/metadata/v2/metadata.proto b/src/main/proto/envoy/type/metadata/v2/metadata.proto deleted file mode 100644 index 75f0250..0000000 --- a/src/main/proto/envoy/type/metadata/v2/metadata.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package envoy.type.metadata.v2; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.metadata.v2"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v2;metadatav2"; -option (udpa.annotations.file_migrate).move_to_package = "envoy.type.metadata.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Metadata] - -// MetadataKey provides a general interface using `key` and `path` to retrieve value from -// :ref:`Metadata `. -// -// For example, for the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.xxx: -// prop: -// foo: bar -// xyz: -// hello: envoy -// -// The following MetadataKey will retrieve a string value "bar" from the Metadata. -// -// .. code-block:: yaml -// -// key: envoy.xxx -// path: -// - key: prop -// - key: foo -// -message MetadataKey { - // Specifies the segment in a path to retrieve value from Metadata. - // Currently it is only supported to specify the key, i.e. field name, as one segment of a path. - message PathSegment { - oneof segment { - option (validate.required) = true; - - // If specified, use the key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_bytes: 1}]; - } - } - - // The key name of Metadata to retrieve the Struct from the metadata. - // Typically, it represents a builtin subsystem or custom extension. - string key = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The path to retrieve the Value from the Struct. It can be a prefix or a full path, - // e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example, - // which depends on the particular scenario. - // - // Note: Due to that only the key type segment is supported, the path can not specify a list - // unless the list is the last segment. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Describes what kind of metadata. -message MetadataKind { - // Represents dynamic metadata associated with the request. - message Request { - } - - // Represents metadata from :ref:`the route`. - message Route { - } - - // Represents metadata from :ref:`the upstream cluster`. - message Cluster { - } - - // Represents metadata from :ref:`the upstream - // host`. - message Host { - } - - oneof kind { - option (validate.required) = true; - - // Request kind of metadata. - Request request = 1; - - // Route kind of metadata. - Route route = 2; - - // Cluster kind of metadata. - Cluster cluster = 3; - - // Host kind of metadata. - Host host = 4; - } -} diff --git a/src/main/proto/envoy/type/metadata/v3/metadata.proto b/src/main/proto/envoy/type/metadata/v3/metadata.proto deleted file mode 100644 index d131635..0000000 --- a/src/main/proto/envoy/type/metadata/v3/metadata.proto +++ /dev/null @@ -1,117 +0,0 @@ -syntax = "proto3"; - -package envoy.type.metadata.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.metadata.v3"; -option java_outer_classname = "MetadataProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3;metadatav3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Metadata] - -// MetadataKey provides a way to retrieve values from -// :ref:`Metadata ` using a ``key`` and a ``path``. -// -// For example, consider the following Metadata: -// -// .. code-block:: yaml -// -// filter_metadata: -// envoy.xxx: -// prop: -// foo: bar -// xyz: -// hello: envoy -// -// The following MetadataKey would retrieve the string value "bar" from the Metadata: -// -// .. code-block:: yaml -// -// key: envoy.xxx -// path: -// - key: prop -// - key: foo -// -message MetadataKey { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.metadata.v2.MetadataKey"; - - // Specifies a segment in a path for retrieving values from Metadata. - // Currently, only key-based segments (field names) are supported. - message PathSegment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.metadata.v2.MetadataKey.PathSegment"; - - oneof segment { - option (validate.required) = true; - - // If specified, use this key to retrieve the value in a Struct. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - } - - // The key name of the Metadata from which to retrieve the Struct. - // This typically represents a builtin subsystem or custom extension. - string key = 1 [(validate.rules).string = {min_len: 1}]; - - // The path used to retrieve a specific Value from the Struct. - // This can be either a prefix or a full path, depending on the use case. - // For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string - // in the example above. - // - // .. note:: - // Since only key-type segments are supported, a path cannot specify a list - // unless the list is the last segment. - repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}]; -} - -// Describes different types of metadata sources. -message MetadataKind { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.metadata.v2.MetadataKind"; - - // Represents dynamic metadata associated with the request. - message Request { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.metadata.v2.MetadataKind.Request"; - } - - // Represents metadata from :ref:`the route`. - message Route { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.metadata.v2.MetadataKind.Route"; - } - - // Represents metadata from :ref:`the upstream cluster`. - message Cluster { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.metadata.v2.MetadataKind.Cluster"; - } - - // Represents metadata from :ref:`the upstream - // host`. - message Host { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.metadata.v2.MetadataKind.Host"; - } - - oneof kind { - option (validate.required) = true; - - // Request kind of metadata. - Request request = 1; - - // Route kind of metadata. - Route route = 2; - - // Cluster kind of metadata. - Cluster cluster = 3; - - // Host kind of metadata. - Host host = 4; - } -} diff --git a/src/main/proto/envoy/type/percent.proto b/src/main/proto/envoy/type/percent.proto deleted file mode 100644 index 6457e2a..0000000 --- a/src/main/proto/envoy/type/percent.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "PercentProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Percent] - -// Identifies a percentage, in the range [0.0, 100.0]. -message Percent { - double value = 1 [(validate.rules).double = {lte: 100.0 gte: 0.0}]; -} - -// A fractional percentage is used in cases in which for performance reasons performing floating -// point to integer conversions during randomness calculations is undesirable. The message includes -// both a numerator and denominator that together determine the final fractional value. -// -// * **Example**: 1/100 = 1%. -// * **Example**: 3/10000 = 0.03%. -message FractionalPercent { - // Fraction percentages support several fixed denominator values. - enum DenominatorType { - // 100. - // - // **Example**: 1/100 = 1%. - HUNDRED = 0; - - // 10,000. - // - // **Example**: 1/10000 = 0.01%. - TEN_THOUSAND = 1; - - // 1,000,000. - // - // **Example**: 1/1000000 = 0.0001%. - MILLION = 2; - } - - // Specifies the numerator. Defaults to 0. - uint32 numerator = 1; - - // Specifies the denominator. If the denominator specified is less than the numerator, the final - // fractional percentage is capped at 1 (100%). - DenominatorType denominator = 2 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/type/range.proto b/src/main/proto/envoy/type/range.proto deleted file mode 100644 index 9e66e6f..0000000 --- a/src/main/proto/envoy/type/range.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "RangeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Range] - -// Specifies the int64 start and end of the range using half-open interval semantics [start, -// end). -message Int64Range { - // start of the range (inclusive) - int64 start = 1; - - // end of the range (exclusive) - int64 end = 2; -} - -// Specifies the int32 start and end of the range using half-open interval semantics [start, -// end). -message Int32Range { - // start of the range (inclusive) - int32 start = 1; - - // end of the range (exclusive) - int32 end = 2; -} - -// Specifies the double start and end of the range using half-open interval semantics [start, -// end). -message DoubleRange { - // start of the range (inclusive) - double start = 1; - - // end of the range (exclusive) - double end = 2; -} diff --git a/src/main/proto/envoy/type/semantic_version.proto b/src/main/proto/envoy/type/semantic_version.proto deleted file mode 100644 index f6a508c..0000000 --- a/src/main/proto/envoy/type/semantic_version.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "SemanticVersionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Semantic Version] - -// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate -// expected behaviors and APIs, the patch version field is used only -// for security fixes and can be generally ignored. -message SemanticVersion { - uint32 major_number = 1; - - uint32 minor_number = 2; - - uint32 patch = 3; -} diff --git a/src/main/proto/envoy/type/token_bucket.proto b/src/main/proto/envoy/type/token_bucket.proto deleted file mode 100644 index 7419ebc..0000000 --- a/src/main/proto/envoy/type/token_bucket.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package envoy.type; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type"; -option java_outer_classname = "TokenBucketProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Token bucket] - -// Configures a token bucket, typically used for rate limiting. -message TokenBucket { - // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket - // initially contains. - uint32 max_tokens = 1 [(validate.rules).uint32 = {gt: 0}]; - - // The number of tokens added to the bucket during each fill interval. If not specified, defaults - // to a single token. - google.protobuf.UInt32Value tokens_per_fill = 2 [(validate.rules).uint32 = {gt: 0}]; - - // The fill interval that tokens are added to the bucket. During each fill interval - // `tokens_per_fill` are added to the bucket. The bucket will never contain more than - // `max_tokens` tokens. - google.protobuf.Duration fill_interval = 3 [(validate.rules).duration = { - required: true - gt {} - }]; -} diff --git a/src/main/proto/envoy/type/tracing/v2/custom_tag.proto b/src/main/proto/envoy/type/tracing/v2/custom_tag.proto deleted file mode 100644 index c37b662..0000000 --- a/src/main/proto/envoy/type/tracing/v2/custom_tag.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; - -package envoy.type.tracing.v2; - -import "envoy/type/metadata/v2/metadata.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.tracing.v2"; -option java_outer_classname = "CustomTagProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v2;tracingv2"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Custom Tag] - -// Describes custom tags for the active span. -// [#next-free-field: 6] -message CustomTag { - // Literal type custom tag with static value for the tag value. - message Literal { - // Static literal value to populate the tag value. - string value = 1 [(validate.rules).string = {min_bytes: 1}]; - } - - // Environment type custom tag with environment name and default value. - message Environment { - // Environment variable name to obtain the value to populate the tag value. - string name = 1 [(validate.rules).string = {min_bytes: 1}]; - - // When the environment variable is not found, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - string default_value = 2; - } - - // Header type custom tag with header name and default value. - message Header { - // Header name to obtain the value to populate the tag value. - string name = 1 - [(validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // When the header does not exist, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - string default_value = 2; - } - - // Metadata type custom tag using - // :ref:`MetadataKey ` to retrieve the protobuf value - // from :ref:`Metadata `, and populate the tag value with - // `the canonical JSON `_ - // representation of it. - message Metadata { - // Specify what kind of metadata to obtain tag value from. - metadata.v2.MetadataKind kind = 1; - - // Metadata key to define the path to retrieve the tag value. - metadata.v2.MetadataKey metadata_key = 2; - - // When no valid metadata is found, - // the tag value would be populated with this default value if specified, - // otherwise no tag would be populated. - string default_value = 3; - } - - // Used to populate the tag name. - string tag = 1 [(validate.rules).string = {min_bytes: 1}]; - - // Used to specify what kind of custom tag. - oneof type { - option (validate.required) = true; - - // A literal custom tag. - Literal literal = 2; - - // An environment custom tag. - Environment environment = 3; - - // A request header custom tag. - Header request_header = 4; - - // A custom tag to obtain tag value from the metadata. - Metadata metadata = 5; - } -} diff --git a/src/main/proto/envoy/type/tracing/v3/custom_tag.proto b/src/main/proto/envoy/type/tracing/v3/custom_tag.proto deleted file mode 100644 index cdb42a4..0000000 --- a/src/main/proto/envoy/type/tracing/v3/custom_tag.proto +++ /dev/null @@ -1,109 +0,0 @@ -syntax = "proto3"; - -package envoy.type.tracing.v3; - -import "envoy/type/metadata/v3/metadata.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.tracing.v3"; -option java_outer_classname = "CustomTagProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3;tracingv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Custom Tag] - -// Describes custom tags for the active span. -// [#next-free-field: 7] -message CustomTag { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.tracing.v2.CustomTag"; - - // Literal type custom tag with static value for the tag value. - message Literal { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.tracing.v2.CustomTag.Literal"; - - // Static literal value to populate the tag value. - string value = 1 [(validate.rules).string = {min_len: 1}]; - } - - // Environment type custom tag with environment name and default value. - message Environment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.tracing.v2.CustomTag.Environment"; - - // Environment variable name to obtain the value to populate the tag value. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // When the environment variable is not found, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - string default_value = 2; - } - - // Header type custom tag with header name and default value. - message Header { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.tracing.v2.CustomTag.Header"; - - // Header name to obtain the value to populate the tag value. - string name = 1 - [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}]; - - // When the header does not exist, - // the tag value will be populated with this default value if specified, - // otherwise no tag will be populated. - string default_value = 2; - } - - // Metadata type custom tag using - // :ref:`MetadataKey ` to retrieve the protobuf value - // from :ref:`Metadata `, and populate the tag value with - // `the canonical JSON `_ - // representation of it. - message Metadata { - option (udpa.annotations.versioning).previous_message_type = - "envoy.type.tracing.v2.CustomTag.Metadata"; - - // Specify what kind of metadata to obtain tag value from. - metadata.v3.MetadataKind kind = 1; - - // Metadata key to define the path to retrieve the tag value. - metadata.v3.MetadataKey metadata_key = 2; - - // When no valid metadata is found, - // the tag value would be populated with this default value if specified, - // otherwise no tag would be populated. - string default_value = 3; - } - - // Used to populate the tag name. - string tag = 1 [(validate.rules).string = {min_len: 1}]; - - // Used to specify what kind of custom tag. - oneof type { - option (validate.required) = true; - - // A literal custom tag. - Literal literal = 2; - - // An environment custom tag. - Environment environment = 3; - - // A request header custom tag. - Header request_header = 4; - - // A custom tag to obtain tag value from the metadata. - Metadata metadata = 5; - - // Custom tag value. - // - // The same :ref:`format specifier ` as used for - // :ref:`HTTP access logging ` applies here, however - // unknown specifier values are replaced with the empty string instead of ``-``. - string value = 6; - } -} diff --git a/src/main/proto/envoy/type/v3/hash_policy.proto b/src/main/proto/envoy/type/v3/hash_policy.proto deleted file mode 100644 index 69452ca..0000000 --- a/src/main/proto/envoy/type/v3/hash_policy.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "HashPolicyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Hash Policy] - -// Specifies the hash policy -message HashPolicy { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.HashPolicy"; - - // The source IP will be used to compute the hash used by hash-based load balancing - // algorithms. - message SourceIp { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.HashPolicy.SourceIp"; - } - - // An Object in the :ref:`filterState ` will be used - // to compute the hash used by hash-based load balancing algorithms. - message FilterState { - // The name of the Object in the filterState, which is an Envoy::Hashable object. If there is no - // data associated with the key, or the stored object is not Envoy::Hashable, no hash will be - // produced. - string key = 1 [(validate.rules).string = {min_len: 1}]; - } - - oneof policy_specifier { - option (validate.required) = true; - - SourceIp source_ip = 1; - - FilterState filter_state = 2; - } -} diff --git a/src/main/proto/envoy/type/v3/http.proto b/src/main/proto/envoy/type/v3/http.proto deleted file mode 100644 index a1a5a04..0000000 --- a/src/main/proto/envoy/type/v3/http.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "HttpProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP] - -enum CodecClientType { - HTTP1 = 0; - - HTTP2 = 1; - - // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with - // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient - // to distinguish HTTP1 and HTTP2 traffic. - HTTP3 = 2; -} diff --git a/src/main/proto/envoy/type/v3/http_status.proto b/src/main/proto/envoy/type/v3/http_status.proto deleted file mode 100644 index 40d697b..0000000 --- a/src/main/proto/envoy/type/v3/http_status.proto +++ /dev/null @@ -1,199 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "HttpStatusProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: HTTP status codes] - -// HTTP response codes supported in Envoy. -// For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml -enum StatusCode { - // Empty - This code not part of the HTTP status code specification, but it is needed for proto - // `enum` type. - Empty = 0; - - // Continue - ``100`` status code. - Continue = 100; - - // OK - ``200`` status code. - OK = 200; - - // Created - ``201`` status code. - Created = 201; - - // Accepted - ``202`` status code. - Accepted = 202; - - // NonAuthoritativeInformation - ``203`` status code. - NonAuthoritativeInformation = 203; - - // NoContent - ``204`` status code. - NoContent = 204; - - // ResetContent - ``205`` status code. - ResetContent = 205; - - // PartialContent - ``206`` status code. - PartialContent = 206; - - // MultiStatus - ``207`` status code. - MultiStatus = 207; - - // AlreadyReported - ``208`` status code. - AlreadyReported = 208; - - // IMUsed - ``226`` status code. - IMUsed = 226; - - // MultipleChoices - ``300`` status code. - MultipleChoices = 300; - - // MovedPermanently - ``301`` status code. - MovedPermanently = 301; - - // Found - ``302`` status code. - Found = 302; - - // SeeOther - ``303`` status code. - SeeOther = 303; - - // NotModified - ``304`` status code. - NotModified = 304; - - // UseProxy - ``305`` status code. - UseProxy = 305; - - // TemporaryRedirect - ``307`` status code. - TemporaryRedirect = 307; - - // PermanentRedirect - ``308`` status code. - PermanentRedirect = 308; - - // BadRequest - ``400`` status code. - BadRequest = 400; - - // Unauthorized - ``401`` status code. - Unauthorized = 401; - - // PaymentRequired - ``402`` status code. - PaymentRequired = 402; - - // Forbidden - ``403`` status code. - Forbidden = 403; - - // NotFound - ``404`` status code. - NotFound = 404; - - // MethodNotAllowed - ``405`` status code. - MethodNotAllowed = 405; - - // NotAcceptable - ``406`` status code. - NotAcceptable = 406; - - // ProxyAuthenticationRequired - ``407`` status code. - ProxyAuthenticationRequired = 407; - - // RequestTimeout - ``408`` status code. - RequestTimeout = 408; - - // Conflict - ``409`` status code. - Conflict = 409; - - // Gone - ``410`` status code. - Gone = 410; - - // LengthRequired - ``411`` status code. - LengthRequired = 411; - - // PreconditionFailed - ``412`` status code. - PreconditionFailed = 412; - - // PayloadTooLarge - ``413`` status code. - PayloadTooLarge = 413; - - // URITooLong - ``414`` status code. - URITooLong = 414; - - // UnsupportedMediaType - ``415`` status code. - UnsupportedMediaType = 415; - - // RangeNotSatisfiable - ``416`` status code. - RangeNotSatisfiable = 416; - - // ExpectationFailed - ``417`` status code. - ExpectationFailed = 417; - - // MisdirectedRequest - ``421`` status code. - MisdirectedRequest = 421; - - // UnprocessableEntity - ``422`` status code. - UnprocessableEntity = 422; - - // Locked - ``423`` status code. - Locked = 423; - - // FailedDependency - ``424`` status code. - FailedDependency = 424; - - // UpgradeRequired - ``426`` status code. - UpgradeRequired = 426; - - // PreconditionRequired - ``428`` status code. - PreconditionRequired = 428; - - // TooManyRequests - ``429`` status code. - TooManyRequests = 429; - - // RequestHeaderFieldsTooLarge - ``431`` status code. - RequestHeaderFieldsTooLarge = 431; - - // InternalServerError - ``500`` status code. - InternalServerError = 500; - - // NotImplemented - ``501`` status code. - NotImplemented = 501; - - // BadGateway - ``502`` status code. - BadGateway = 502; - - // ServiceUnavailable - ``503`` status code. - ServiceUnavailable = 503; - - // GatewayTimeout - ``504`` status code. - GatewayTimeout = 504; - - // HTTPVersionNotSupported - ``505`` status code. - HTTPVersionNotSupported = 505; - - // VariantAlsoNegotiates - ``506`` status code. - VariantAlsoNegotiates = 506; - - // InsufficientStorage - ``507`` status code. - InsufficientStorage = 507; - - // LoopDetected - ``508`` status code. - LoopDetected = 508; - - // NotExtended - ``510`` status code. - NotExtended = 510; - - // NetworkAuthenticationRequired - ``511`` status code. - NetworkAuthenticationRequired = 511; -} - -// HTTP status. -message HttpStatus { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.HttpStatus"; - - // Supplies HTTP response code. - StatusCode code = 1 [(validate.rules).enum = {defined_only: true not_in: 0}]; -} diff --git a/src/main/proto/envoy/type/v3/percent.proto b/src/main/proto/envoy/type/v3/percent.proto deleted file mode 100644 index e041ecd..0000000 --- a/src/main/proto/envoy/type/v3/percent.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "PercentProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Percent] - -// Identifies a percentage, in the range [0.0, 100.0]. -message Percent { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.Percent"; - - double value = 1 [(validate.rules).double = {lte: 100.0 gte: 0.0}]; -} - -// A fractional percentage is used in cases in which for performance reasons performing floating -// point to integer conversions during randomness calculations is undesirable. The message includes -// both a numerator and denominator that together determine the final fractional value. -// -// * **Example**: 1/100 = 1%. -// * **Example**: 3/10000 = 0.03%. -message FractionalPercent { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.FractionalPercent"; - - // Fraction percentages support several fixed denominator values. - enum DenominatorType { - // 100. - // - // **Example**: 1/100 = 1%. - HUNDRED = 0; - - // 10,000. - // - // **Example**: 1/10000 = 0.01%. - TEN_THOUSAND = 1; - - // 1,000,000. - // - // **Example**: 1/1000000 = 0.0001%. - MILLION = 2; - } - - // Specifies the numerator. Defaults to 0. - uint32 numerator = 1; - - // Specifies the denominator. If the denominator specified is less than the numerator, the final - // fractional percentage is capped at 1 (100%). - DenominatorType denominator = 2 [(validate.rules).enum = {defined_only: true}]; -} diff --git a/src/main/proto/envoy/type/v3/range.proto b/src/main/proto/envoy/type/v3/range.proto deleted file mode 100644 index 3b1af81..0000000 --- a/src/main/proto/envoy/type/v3/range.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "RangeProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Range] - -// Specifies the int64 start and end of the range using half-open interval semantics [start, -// end). -message Int64Range { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.Int64Range"; - - // start of the range (inclusive) - int64 start = 1; - - // end of the range (exclusive) - int64 end = 2; -} - -// Specifies the int32 start and end of the range using half-open interval semantics [start, -// end). -message Int32Range { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.Int32Range"; - - // start of the range (inclusive) - int32 start = 1; - - // end of the range (exclusive) - int32 end = 2; -} - -// Specifies the double start and end of the range using half-open interval semantics [start, -// end). -message DoubleRange { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.DoubleRange"; - - // start of the range (inclusive) - double start = 1; - - // end of the range (exclusive) - double end = 2; -} diff --git a/src/main/proto/envoy/type/v3/ratelimit_strategy.proto b/src/main/proto/envoy/type/v3/ratelimit_strategy.proto deleted file mode 100644 index a86da55..0000000 --- a/src/main/proto/envoy/type/v3/ratelimit_strategy.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "envoy/type/v3/ratelimit_unit.proto"; -import "envoy/type/v3/token_bucket.proto"; - -import "xds/annotations/v3/status.proto"; - -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "RatelimitStrategyProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Rate Limit Strategies] - -message RateLimitStrategy { - // Choose between allow all and deny all. - enum BlanketRule { - ALLOW_ALL = 0; - DENY_ALL = 1; - } - - // Best-effort limit of the number of requests per time unit. - // - // Allows to specify the desired requests per second (RPS, QPS), requests per minute (QPM, RPM), - // etc., without specifying a rate limiting algorithm implementation. - // - // ``RequestsPerTimeUnit`` strategy does not demand any specific rate limiting algorithm to be - // used (in contrast to the :ref:`TokenBucket `, - // for example). It implies that the implementation details of rate limiting algorithm are - // irrelevant as long as the configured number of "requests per time unit" is achieved. - // - // Note that the ``TokenBucket`` is still a valid implementation of the ``RequestsPerTimeUnit`` - // strategy, and may be chosen to enforce the rate limit. However, there's no guarantee it will be - // the ``TokenBucket`` in particular, and not the Leaky Bucket, the Sliding Window, or any other - // rate limiting algorithm that fulfills the requirements. - message RequestsPerTimeUnit { - // The desired number of requests per :ref:`time_unit - // ` to allow. - // If set to ``0``, deny all (equivalent to ``BlanketRule.DENY_ALL``). - // - // .. note:: - // Note that the algorithm implementation determines the course of action for the requests - // over the limit. As long as the ``requests_per_time_unit`` converges on the desired value, - // it's allowed to treat this field as a soft-limit: allow bursts, redistribute the allowance - // over time, etc. - // - uint64 requests_per_time_unit = 1; - - // The unit of time. Ignored when :ref:`requests_per_time_unit - // ` - // is ``0`` (deny all). - RateLimitUnit time_unit = 2 [(validate.rules).enum = {defined_only: true}]; - } - - oneof strategy { - option (validate.required) = true; - - // Allow or Deny the requests. - // If unset, allow all. - BlanketRule blanket_rule = 1 [(validate.rules).enum = {defined_only: true}]; - - // Best-effort limit of the number of requests per time unit, f.e. requests per second. - // Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit - // ` for details. - RequestsPerTimeUnit requests_per_time_unit = 2; - - // Limit the requests by consuming tokens from the Token Bucket. - // Allow the same number of requests as the number of tokens available in - // the token bucket. - TokenBucket token_bucket = 3; - } -} diff --git a/src/main/proto/envoy/type/v3/ratelimit_unit.proto b/src/main/proto/envoy/type/v3/ratelimit_unit.proto deleted file mode 100644 index 1a96497..0000000 --- a/src/main/proto/envoy/type/v3/ratelimit_unit.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "RatelimitUnitProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Ratelimit Time Unit] - -// Identifies the unit of of time for rate limit. -enum RateLimitUnit { - // The time unit is not known. - UNKNOWN = 0; - - // The time unit representing a second. - SECOND = 1; - - // The time unit representing a minute. - MINUTE = 2; - - // The time unit representing an hour. - HOUR = 3; - - // The time unit representing a day. - DAY = 4; - - // The time unit representing a month. - MONTH = 5; - - // The time unit representing a year. - YEAR = 6; -} diff --git a/src/main/proto/envoy/type/v3/semantic_version.proto b/src/main/proto/envoy/type/v3/semantic_version.proto deleted file mode 100644 index e032b4c..0000000 --- a/src/main/proto/envoy/type/v3/semantic_version.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "SemanticVersionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Semantic version] - -// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate -// expected behaviors and APIs, the patch version field is used only -// for security fixes and can be generally ignored. -message SemanticVersion { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.SemanticVersion"; - - uint32 major_number = 1; - - uint32 minor_number = 2; - - uint32 patch = 3; -} diff --git a/src/main/proto/envoy/type/v3/token_bucket.proto b/src/main/proto/envoy/type/v3/token_bucket.proto deleted file mode 100644 index 157a271..0000000 --- a/src/main/proto/envoy/type/v3/token_bucket.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package envoy.type.v3; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.type.v3"; -option java_outer_classname = "TokenBucketProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/v3;typev3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Token bucket] - -// Configures a token bucket, typically used for rate limiting. -message TokenBucket { - option (udpa.annotations.versioning).previous_message_type = "envoy.type.TokenBucket"; - - // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket - // initially contains. - uint32 max_tokens = 1 [(validate.rules).uint32 = {gt: 0}]; - - // The number of tokens added to the bucket during each fill interval. If not specified, defaults - // to a single token. - google.protobuf.UInt32Value tokens_per_fill = 2 [(validate.rules).uint32 = {gt: 0}]; - - // The fill interval that tokens are added to the bucket. During each fill interval - // ``tokens_per_fill`` are added to the bucket. The bucket will never contain more than - // ``max_tokens`` tokens. - google.protobuf.Duration fill_interval = 3 [(validate.rules).duration = { - required: true - gt {} - }]; -} diff --git a/src/main/proto/envoy/watchdog/v3/abort_action.proto b/src/main/proto/envoy/watchdog/v3/abort_action.proto deleted file mode 100644 index 9f3e3b0..0000000 --- a/src/main/proto/envoy/watchdog/v3/abort_action.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package envoy.watchdog.v3; - -import "google/protobuf/duration.proto"; - -import "udpa/annotations/status.proto"; - -option java_package = "io.envoyproxy.envoy.watchdog.v3"; -option java_outer_classname = "AbortActionProto"; -option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/watchdog/v3;watchdogv3"; -option (udpa.annotations.file_status).package_version_status = ACTIVE; - -// [#protodoc-title: Watchdog Action that kills a stuck thread to kill the process.] - -// A GuardDogAction that will terminate the process by killing the -// stuck thread. This would allow easier access to the call stack of the stuck -// thread since we would run signal handlers on that thread. By default -// this will be registered to run as the last watchdog action on KILL and -// MULTIKILL events if those are enabled. -message AbortActionConfig { - // How long to wait for the thread to respond to the thread kill function - // before killing the process from this action. This is a blocking action. - // By default this is 5 seconds. - google.protobuf.Duration wait_duration = 1; -} diff --git a/src/main/proto/google/api/annotations.proto b/src/main/proto/google/api/annotations.proto deleted file mode 100644 index 84c4816..0000000 --- a/src/main/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/src/main/proto/google/api/expr/v1alpha1/checked.proto b/src/main/proto/google/api/expr/v1alpha1/checked.proto deleted file mode 100644 index c684934..0000000 --- a/src/main/proto/google/api/expr/v1alpha1/checked.proto +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api.expr.v1alpha1; - -import "google/api/expr/v1alpha1/syntax.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/struct.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; -option java_multiple_files = true; -option java_outer_classname = "DeclProto"; -option java_package = "com.google.api.expr.v1alpha1"; - -// Protos for representing CEL declarations and typed checked expressions. - -// A CEL expression which has been successfully type checked. -message CheckedExpr { - // A map from expression ids to resolved references. - // - // The following entries are in this table: - // - // - An Ident or Select expression is represented here if it resolves to a - // declaration. For instance, if `a.b.c` is represented by - // `select(select(id(a), b), c)`, and `a.b` resolves to a declaration, - // while `c` is a field selection, then the reference is attached to the - // nested select expression (but not to the id or or the outer select). - // In turn, if `a` resolves to a declaration and `b.c` are field selections, - // the reference is attached to the ident expression. - // - Every Call expression has an entry here, identifying the function being - // called. - // - Every CreateStruct expression for a message has an entry, identifying - // the message. - map reference_map = 2; - - // A map from expression ids to types. - // - // Every expression node which has a type different than DYN has a mapping - // here. If an expression has type DYN, it is omitted from this map to save - // space. - map type_map = 3; - - // The source info derived from input that generated the parsed `expr` and - // any optimizations made during the type-checking pass. - SourceInfo source_info = 5; - - // The expr version indicates the major / minor version number of the `expr` - // representation. - // - // The most common reason for a version change will be to indicate to the CEL - // runtimes that transformations have been performed on the expr during static - // analysis. In some cases, this will save the runtime the work of applying - // the same or similar transformations prior to evaluation. - string expr_version = 6; - - // The checked expression. Semantically equivalent to the parsed `expr`, but - // may have structural differences. - Expr expr = 4; -} - -// Represents a CEL type. -message Type { - // List type with typed elements, e.g. `list`. - message ListType { - // The element type. - Type elem_type = 1; - } - - // Map type with parameterized key and value types, e.g. `map`. - message MapType { - // The type of the key. - Type key_type = 1; - - // The type of the value. - Type value_type = 2; - } - - // Function type with result and arg types. - message FunctionType { - // Result type of the function. - Type result_type = 1; - - // Argument types of the function. - repeated Type arg_types = 2; - } - - // Application defined abstract type. - message AbstractType { - // The fully qualified name of this abstract type. - string name = 1; - - // Parameter types for this abstract type. - repeated Type parameter_types = 2; - } - - // CEL primitive types. - enum PrimitiveType { - // Unspecified type. - PRIMITIVE_TYPE_UNSPECIFIED = 0; - - // Boolean type. - BOOL = 1; - - // Int64 type. - // - // Proto-based integer values are widened to int64. - INT64 = 2; - - // Uint64 type. - // - // Proto-based unsigned integer values are widened to uint64. - UINT64 = 3; - - // Double type. - // - // Proto-based float values are widened to double values. - DOUBLE = 4; - - // String type. - STRING = 5; - - // Bytes type. - BYTES = 6; - } - - // Well-known protobuf types treated with first-class support in CEL. - enum WellKnownType { - // Unspecified type. - WELL_KNOWN_TYPE_UNSPECIFIED = 0; - - // Well-known protobuf.Any type. - // - // Any types are a polymorphic message type. During type-checking they are - // treated like `DYN` types, but at runtime they are resolved to a specific - // message type specified at evaluation time. - ANY = 1; - - // Well-known protobuf.Timestamp type, internally referenced as `timestamp`. - TIMESTAMP = 2; - - // Well-known protobuf.Duration type, internally referenced as `duration`. - DURATION = 3; - } - - // The kind of type. - oneof type_kind { - // Dynamic type. - google.protobuf.Empty dyn = 1; - - // Null value. - google.protobuf.NullValue null = 2; - - // Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`. - PrimitiveType primitive = 3; - - // Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`. - PrimitiveType wrapper = 4; - - // Well-known protobuf type such as `google.protobuf.Timestamp`. - WellKnownType well_known = 5; - - // Parameterized list with elements of `list_type`, e.g. `list`. - ListType list_type = 6; - - // Parameterized map with typed keys and values. - MapType map_type = 7; - - // Function type. - FunctionType function = 8; - - // Protocol buffer message type. - // - // The `message_type` string specifies the qualified message type name. For - // example, `google.plus.Profile`. - string message_type = 9; - - // Type param type. - // - // The `type_param` string specifies the type parameter name, e.g. `list` - // would be a `list_type` whose element type was a `type_param` type - // named `E`. - string type_param = 10; - - // Type type. - // - // The `type` value specifies the target type. e.g. int is type with a - // target type of `Primitive.INT`. - Type type = 11; - - // Error type. - // - // During type-checking if an expression is an error, its type is propagated - // as the `ERROR` type. This permits the type-checker to discover other - // errors present in the expression. - google.protobuf.Empty error = 12; - - // Abstract, application defined type. - AbstractType abstract_type = 14; - } -} - -// Represents a declaration of a named value or function. -// -// A declaration is part of the contract between the expression, the agent -// evaluating that expression, and the caller requesting evaluation. -message Decl { - // Identifier declaration which specifies its type and optional `Expr` value. - // - // An identifier without a value is a declaration that must be provided at - // evaluation time. An identifier with a value should resolve to a constant, - // but may be used in conjunction with other identifiers bound at evaluation - // time. - message IdentDecl { - // Required. The type of the identifier. - Type type = 1; - - // The constant value of the identifier. If not specified, the identifier - // must be supplied at evaluation time. - Constant value = 2; - - // Documentation string for the identifier. - string doc = 3; - } - - // Function declaration specifies one or more overloads which indicate the - // function's parameter types and return type. - // - // Functions have no observable side-effects (there may be side-effects like - // logging which are not observable from CEL). - message FunctionDecl { - // An overload indicates a function's parameter types and return type, and - // may optionally include a function body described in terms of - // [Expr][google.api.expr.v1alpha1.Expr] values. - // - // Functions overloads are declared in either a function or method - // call-style. For methods, the `params[0]` is the expected type of the - // target receiver. - // - // Overloads must have non-overlapping argument types after erasure of all - // parameterized type variables (similar as type erasure in Java). - message Overload { - // Required. Globally unique overload name of the function which reflects - // the function name and argument types. - // - // This will be used by a [Reference][google.api.expr.v1alpha1.Reference] - // to indicate the `overload_id` that was resolved for the function - // `name`. - string overload_id = 1; - - // List of function parameter [Type][google.api.expr.v1alpha1.Type] - // values. - // - // Param types are disjoint after generic type parameters have been - // replaced with the type `DYN`. Since the `DYN` type is compatible with - // any other type, this means that if `A` is a type parameter, the - // function types `int` and `int` are not disjoint. Likewise, - // `map` is not disjoint from `map`. - // - // When the `result_type` of a function is a generic type param, the - // type param name also appears as the `type` of on at least one params. - repeated Type params = 2; - - // The type param names associated with the function declaration. - // - // For example, `function ex(K key, map map) : V` would yield - // the type params of `K, V`. - repeated string type_params = 3; - - // Required. The result type of the function. For example, the operator - // `string.isEmpty()` would have `result_type` of `kind: BOOL`. - Type result_type = 4; - - // Whether the function is to be used in a method call-style `x.f(...)` - // or a function call-style `f(x, ...)`. - // - // For methods, the first parameter declaration, `params[0]` is the - // expected type of the target receiver. - bool is_instance_function = 5; - - // Documentation string for the overload. - string doc = 6; - } - - // Required. List of function overloads, must contain at least one overload. - repeated Overload overloads = 1; - } - - // The fully qualified name of the declaration. - // - // Declarations are organized in containers and this represents the full path - // to the declaration in its container, as in `google.api.expr.Decl`. - // - // Declarations used as - // [FunctionDecl.Overload][google.api.expr.v1alpha1.Decl.FunctionDecl.Overload] - // parameters may or may not have a name depending on whether the overload is - // function declaration or a function definition containing a result - // [Expr][google.api.expr.v1alpha1.Expr]. - string name = 1; - - // Required. The declaration kind. - oneof decl_kind { - // Identifier declaration. - IdentDecl ident = 2; - - // Function declaration. - FunctionDecl function = 3; - } -} - -// Describes a resolved reference to a declaration. -message Reference { - // The fully qualified name of the declaration. - string name = 1; - - // For references to functions, this is a list of `Overload.overload_id` - // values which match according to typing rules. - // - // If the list has more than one element, overload resolution among the - // presented candidates must happen at runtime because of dynamic types. The - // type checker attempts to narrow down this list as much as possible. - // - // Empty if this is not a reference to a - // [Decl.FunctionDecl][google.api.expr.v1alpha1.Decl.FunctionDecl]. - repeated string overload_id = 3; - - // For references to constants, this may contain the value of the - // constant if known at compile time. - Constant value = 4; -} diff --git a/src/main/proto/google/api/expr/v1alpha1/syntax.proto b/src/main/proto/google/api/expr/v1alpha1/syntax.proto deleted file mode 100644 index 7b6668d..0000000 --- a/src/main/proto/google/api/expr/v1alpha1/syntax.proto +++ /dev/null @@ -1,438 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api.expr.v1alpha1; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/expr/v1alpha1;expr"; -option java_multiple_files = true; -option java_outer_classname = "SyntaxProto"; -option java_package = "com.google.api.expr.v1alpha1"; - -// A representation of the abstract syntax of the Common Expression Language. - -// An expression together with source information as returned by the parser. -message ParsedExpr { - // The parsed expression. - Expr expr = 2; - - // The source info derived from input that generated the parsed `expr`. - SourceInfo source_info = 3; -} - -// An abstract representation of a common expression. -// -// Expressions are abstractly represented as a collection of identifiers, -// select statements, function calls, literals, and comprehensions. All -// operators with the exception of the '.' operator are modelled as function -// calls. This makes it easy to represent new operators into the existing AST. -// -// All references within expressions must resolve to a -// [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an -// expression to be valid. A reference may either be a bare identifier `name` or -// a qualified identifier `google.api.name`. References may either refer to a -// value or a function declaration. -// -// For example, the expression `google.api.name.startsWith('expr')` references -// the declaration `google.api.name` within a -// [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the -// function declaration `startsWith`. -message Expr { - // An identifier expression. e.g. `request`. - message Ident { - // Required. Holds a single, unqualified identifier, possibly preceded by a - // '.'. - // - // Qualified names are represented by the - // [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression. - string name = 1; - } - - // A field selection expression. e.g. `request.auth`. - message Select { - // Required. The target of the selection expression. - // - // For example, in the select expression `request.auth`, the `request` - // portion of the expression is the `operand`. - Expr operand = 1; - - // Required. The name of the field to select. - // - // For example, in the select expression `request.auth`, the `auth` portion - // of the expression would be the `field`. - string field = 2; - - // Whether the select is to be interpreted as a field presence test. - // - // This results from the macro `has(request.auth)`. - bool test_only = 3; - } - - // A call expression, including calls to predefined functions and operators. - // - // For example, `value == 10`, `size(map_value)`. - message Call { - // The target of an method call-style expression. For example, `x` in - // `x.f()`. - Expr target = 1; - - // Required. The name of the function or method being called. - string function = 2; - - // The arguments. - repeated Expr args = 3; - } - - // A list creation expression. - // - // Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g. - // `dyn([1, 'hello', 2.0])` - message CreateList { - // The elements part of the list. - repeated Expr elements = 1; - - // The indices within the elements list which are marked as optional - // elements. - // - // When an optional-typed value is present, the value it contains - // is included in the list. If the optional-typed value is absent, the list - // element is omitted from the CreateList result. - repeated int32 optional_indices = 2; - } - - // A map or message creation expression. - // - // Maps are constructed as `{'key_name': 'value'}`. Message construction is - // similar, but prefixed with a type name and composed of field ids: - // `types.MyType{field_id: 'value'}`. - message CreateStruct { - // Represents an entry. - message Entry { - // Required. An id assigned to this node by the parser which is unique - // in a given expression tree. This is used to associate type - // information and other attributes to the node. - int64 id = 1; - - // The `Entry` key kinds. - oneof key_kind { - // The field key for a message creator statement. - string field_key = 2; - - // The key expression for a map creation statement. - Expr map_key = 3; - } - - // Required. The value assigned to the key. - // - // If the optional_entry field is true, the expression must resolve to an - // optional-typed value. If the optional value is present, the key will be - // set; however, if the optional value is absent, the key will be unset. - Expr value = 4; - - // Whether the key-value pair is optional. - bool optional_entry = 5; - } - - // The type name of the message to be created, empty when creating map - // literals. - string message_name = 1; - - // The entries in the creation expression. - repeated Entry entries = 2; - } - - // A comprehension expression applied to a list or map. - // - // Comprehensions are not part of the core syntax, but enabled with macros. - // A macro matches a specific call signature within a parsed AST and replaces - // the call with an alternate AST block. Macro expansion happens at parse - // time. - // - // The following macros are supported within CEL: - // - // Aggregate type macros may be applied to all elements in a list or all keys - // in a map: - // - // * `all`, `exists`, `exists_one` - test a predicate expression against - // the inputs and return `true` if the predicate is satisfied for all, - // any, or only one value `list.all(x, x < 10)`. - // * `filter` - test a predicate expression against the inputs and return - // the subset of elements which satisfy the predicate: - // `payments.filter(p, p > 1000)`. - // * `map` - apply an expression to all elements in the input and return the - // output aggregate type: `[1, 2, 3].map(i, i * i)`. - // - // The `has(m.x)` macro tests whether the property `x` is present in struct - // `m`. The semantics of this macro depend on the type of `m`. For proto2 - // messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the - // macro tests whether the property is set to its default. For map and struct - // types, the macro tests whether the property `x` is defined on `m`. - // - // Comprehensions for the standard environment macros evaluation can be best - // visualized as the following pseudocode: - // - // ``` - // let `accu_var` = `accu_init` - // for (let `iter_var` in `iter_range`) { - // if (!`loop_condition`) { - // break - // } - // `accu_var` = `loop_step` - // } - // return `result` - // ``` - // - // Comprehensions for the optional V2 macros which support map-to-map - // translation differ slightly from the standard environment macros in that - // they expose both the key or index in addition to the value for each list - // or map entry: - // - // ``` - // let `accu_var` = `accu_init` - // for (let `iter_var`, `iter_var2` in `iter_range`) { - // if (!`loop_condition`) { - // break - // } - // `accu_var` = `loop_step` - // } - // return `result` - // ``` - message Comprehension { - // The name of the first iteration variable. - // When the iter_range is a list, this variable is the list element. - // When the iter_range is a map, this variable is the map entry key. - string iter_var = 1; - - // The name of the second iteration variable, empty if not set. - // When the iter_range is a list, this variable is the integer index. - // When the iter_range is a map, this variable is the map entry value. - // This field is only set for comprehension v2 macros. - string iter_var2 = 8; - - // The range over which the comprehension iterates. - Expr iter_range = 2; - - // The name of the variable used for accumulation of the result. - string accu_var = 3; - - // The initial value of the accumulator. - Expr accu_init = 4; - - // An expression which can contain iter_var, iter_var2, and accu_var. - // - // Returns false when the result has been computed and may be used as - // a hint to short-circuit the remainder of the comprehension. - Expr loop_condition = 5; - - // An expression which can contain iter_var, iter_var2, and accu_var. - // - // Computes the next value of accu_var. - Expr loop_step = 6; - - // An expression which can contain accu_var. - // - // Computes the result. - Expr result = 7; - } - - // Required. An id assigned to this node by the parser which is unique in a - // given expression tree. This is used to associate type information and other - // attributes to a node in the parse tree. - int64 id = 2; - - // Required. Variants of expressions. - oneof expr_kind { - // A literal expression. - Constant const_expr = 3; - - // An identifier expression. - Ident ident_expr = 4; - - // A field selection expression, e.g. `request.auth`. - Select select_expr = 5; - - // A call expression, including calls to predefined functions and operators. - Call call_expr = 6; - - // A list creation expression. - CreateList list_expr = 7; - - // A map or message creation expression. - CreateStruct struct_expr = 8; - - // A comprehension expression. - Comprehension comprehension_expr = 9; - } -} - -// Represents a primitive literal. -// -// Named 'Constant' here for backwards compatibility. -// -// This is similar as the primitives supported in the well-known type -// `google.protobuf.Value`, but richer so it can represent CEL's full range of -// primitives. -// -// Lists and structs are not included as constants as these aggregate types may -// contain [Expr][google.api.expr.v1alpha1.Expr] elements which require -// evaluation and are thus not constant. -// -// Examples of literals include: `"hello"`, `b'bytes'`, `1u`, `4.2`, `-2`, -// `true`, `null`. -message Constant { - // Required. The valid constant kinds. - oneof constant_kind { - // null value. - google.protobuf.NullValue null_value = 1; - - // boolean value. - bool bool_value = 2; - - // int64 value. - int64 int64_value = 3; - - // uint64 value. - uint64 uint64_value = 4; - - // double value. - double double_value = 5; - - // string value. - string string_value = 6; - - // bytes value. - bytes bytes_value = 7; - - // protobuf.Duration value. - // - // Deprecated: duration is no longer considered a builtin cel type. - google.protobuf.Duration duration_value = 8 [deprecated = true]; - - // protobuf.Timestamp value. - // - // Deprecated: timestamp is no longer considered a builtin cel type. - google.protobuf.Timestamp timestamp_value = 9 [deprecated = true]; - } -} - -// Source information collected at parse time. -message SourceInfo { - // An extension that was requested for the source expression. - message Extension { - // Version - message Version { - // Major version changes indicate different required support level from - // the required components. - int64 major = 1; - - // Minor version changes must not change the observed behavior from - // existing implementations, but may be provided informationally. - int64 minor = 2; - } - - // CEL component specifier. - enum Component { - // Unspecified, default. - COMPONENT_UNSPECIFIED = 0; - - // Parser. Converts a CEL string to an AST. - COMPONENT_PARSER = 1; - - // Type checker. Checks that references in an AST are defined and types - // agree. - COMPONENT_TYPE_CHECKER = 2; - - // Runtime. Evaluates a parsed and optionally checked CEL AST against a - // context. - COMPONENT_RUNTIME = 3; - } - - // Identifier for the extension. Example: constant_folding - string id = 1; - - // If set, the listed components must understand the extension for the - // expression to evaluate correctly. - // - // This field has set semantics, repeated values should be deduplicated. - repeated Component affected_components = 2; - - // Version info. May be skipped if it isn't meaningful for the extension. - // (for example constant_folding might always be v0.0). - Version version = 3; - } - - // The syntax version of the source, e.g. `cel1`. - string syntax_version = 1; - - // The location name. All position information attached to an expression is - // relative to this location. - // - // The location could be a file, UI element, or similar. For example, - // `acme/app/AnvilPolicy.cel`. - string location = 2; - - // Monotonically increasing list of code point offsets where newlines - // `\n` appear. - // - // The line number of a given position is the index `i` where for a given - // `id` the `line_offsets[i] < id_positions[id] < line_offsets[i+1]`. The - // column may be derivd from `id_positions[id] - line_offsets[i]`. - repeated int32 line_offsets = 3; - - // A map from the parse node id (e.g. `Expr.id`) to the code point offset - // within the source. - map positions = 4; - - // A map from the parse node id where a macro replacement was made to the - // call `Expr` that resulted in a macro expansion. - // - // For example, `has(value.field)` is a function call that is replaced by a - // `test_only` field selection in the AST. Likewise, the call - // `list.exists(e, e > 10)` translates to a comprehension expression. The key - // in the map corresponds to the expression id of the expanded macro, and the - // value is the call `Expr` that was replaced. - map macro_calls = 5; - - // A list of tags for extensions that were used while parsing or type checking - // the source expression. For example, optimizations that require special - // runtime support may be specified. - // - // These are used to check feature support between components in separate - // implementations. This can be used to either skip redundant work or - // report an error if the extension is unsupported. - repeated Extension extensions = 6; -} - -// A specific position in source. -message SourcePosition { - // The soucre location name (e.g. file name). - string location = 1; - - // The UTF-8 code unit offset. - int32 offset = 2; - - // The 1-based index of the starting line in the source text - // where the issue occurs, or 0 if unknown. - int32 line = 3; - - // The 0-based index of the starting position within the line of source text - // where the issue occurs. Only meaningful if line is nonzero. - int32 column = 4; -} diff --git a/src/main/proto/google/api/http.proto b/src/main/proto/google/api/http.proto deleted file mode 100644 index e327037..0000000 --- a/src/main/proto/google/api/http.proto +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// - HTTP: `GET /v1/messages/123456` -// - gRPC: `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` -// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: -// SubMessage(subfield: "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` -// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` -// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// - HTTP: `GET /v1/messages/123456` -// - gRPC: `GetMessage(message_id: "123456")` -// -// - HTTP: `GET /v1/users/me/messages/123456` -// - gRPC: `GetMessage(user_id: "me" message_id: "123456")` -// -// Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// The following example selects a gRPC method and applies an `HttpRule` to it: -// -// http: -// rules: -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/src/main/proto/google/rpc/status.proto b/src/main/proto/google/rpc/status.proto deleted file mode 100644 index 90b70dd..0000000 --- a/src/main/proto/google/rpc/status.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.rpc; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/rpc/status;status"; -option java_multiple_files = true; -option java_outer_classname = "StatusProto"; -option java_package = "com.google.rpc"; -option objc_class_prefix = "RPC"; - -// The `Status` type defines a logical error model that is suitable for -// different programming environments, including REST APIs and RPC APIs. It is -// used by [gRPC](https://github.com/grpc). Each `Status` message contains -// three pieces of data: error code, error message, and error details. -// -// You can find out more about this error model and how to work with it in the -// [API Design Guide](https://cloud.google.com/apis/design/errors). -message Status { - // The status code, which should be an enum value of - // [google.rpc.Code][google.rpc.Code]. - int32 code = 1; - - // A developer-facing error message, which should be in English. Any - // user-facing error message should be localized and sent in the - // [google.rpc.Status.details][google.rpc.Status.details] field, or localized - // by the client. - string message = 2; - - // A list of messages that carry the error details. There is a common set of - // message types for APIs to use. - repeated google.protobuf.Any details = 3; -} diff --git a/src/main/proto/io/prometheus/client/metrics.proto b/src/main/proto/io/prometheus/client/metrics.proto deleted file mode 100644 index 3e9168e..0000000 --- a/src/main/proto/io/prometheus/client/metrics.proto +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2013 Prometheus Team -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto2"; - -package io.prometheus.client; -option java_package = "io.prometheus.client"; -option go_package = "github.com/prometheus/client_model/go;io_prometheus_client"; - -import "google/protobuf/timestamp.proto"; - -message LabelPair { - optional string name = 1; - optional string value = 2; -} - -enum MetricType { - // COUNTER must use the Metric field "counter". - COUNTER = 0; - // GAUGE must use the Metric field "gauge". - GAUGE = 1; - // SUMMARY must use the Metric field "summary". - SUMMARY = 2; - // UNTYPED must use the Metric field "untyped". - UNTYPED = 3; - // HISTOGRAM must use the Metric field "histogram". - HISTOGRAM = 4; - // GAUGE_HISTOGRAM must use the Metric field "histogram". - GAUGE_HISTOGRAM = 5; -} - -message Gauge { - optional double value = 1; -} - -message Counter { - optional double value = 1; - optional Exemplar exemplar = 2; - - optional google.protobuf.Timestamp created_timestamp = 3; -} - -message Quantile { - optional double quantile = 1; - optional double value = 2; -} - -message Summary { - optional uint64 sample_count = 1; - optional double sample_sum = 2; - repeated Quantile quantile = 3; - - optional google.protobuf.Timestamp created_timestamp = 4; -} - -message Untyped { - optional double value = 1; -} - -message Histogram { - optional uint64 sample_count = 1; - optional double sample_count_float = 4; // Overrides sample_count if > 0. - optional double sample_sum = 2; - // Buckets for the conventional histogram. - repeated Bucket bucket = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional. - - optional google.protobuf.Timestamp created_timestamp = 15; - - // Everything below here is for native histograms (also known as sparse histograms). - // Native histograms are an experimental feature without stability guarantees. - - // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8. - // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and - // then each power of two is divided into 2^n logarithmic buckets. - // Or in other words, each bucket boundary is the previous boundary times 2^(2^-n). - // In the future, more bucket schemas may be added using numbers < -4 or > 8. - optional sint32 schema = 5; - optional double zero_threshold = 6; // Breadth of the zero bucket. - optional uint64 zero_count = 7; // Count in zero bucket. - optional double zero_count_float = 8; // Overrides sb_zero_count if > 0. - - // Negative buckets for the native histogram. - repeated BucketSpan negative_span = 9; - // Use either "negative_delta" or "negative_count", the former for - // regular histograms with integer counts, the latter for float - // histograms. - repeated sint64 negative_delta = 10; // Count delta of each bucket compared to previous one (or to zero for 1st bucket). - repeated double negative_count = 11; // Absolute count of each bucket. - - // Positive buckets for the native histogram. - // Use a no-op span (offset 0, length 0) for a native histogram without any - // observations yet and with a zero_threshold of 0. Otherwise, it would be - // indistinguishable from a classic histogram. - repeated BucketSpan positive_span = 12; - // Use either "positive_delta" or "positive_count", the former for - // regular histograms with integer counts, the latter for float - // histograms. - repeated sint64 positive_delta = 13; // Count delta of each bucket compared to previous one (or to zero for 1st bucket). - repeated double positive_count = 14; // Absolute count of each bucket. - - // Only used for native histograms. These exemplars MUST have a timestamp. - repeated Exemplar exemplars = 16; -} - -// A Bucket of a conventional histogram, each of which is treated as -// an individual counter-like time series by Prometheus. -message Bucket { - optional uint64 cumulative_count = 1; // Cumulative in increasing order. - optional double cumulative_count_float = 4; // Overrides cumulative_count if > 0. - optional double upper_bound = 2; // Inclusive. - optional Exemplar exemplar = 3; -} - -// A BucketSpan defines a number of consecutive buckets in a native -// histogram with their offset. Logically, it would be more -// straightforward to include the bucket counts in the Span. However, -// the protobuf representation is more compact in the way the data is -// structured here (with all the buckets in a single array separate -// from the Spans). -message BucketSpan { - optional sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative). - optional uint32 length = 2; // Length of consecutive buckets. -} - -message Exemplar { - repeated LabelPair label = 1; - optional double value = 2; - optional google.protobuf.Timestamp timestamp = 3; // OpenMetrics-style. -} - -message Metric { - repeated LabelPair label = 1; - optional Gauge gauge = 2; - optional Counter counter = 3; - optional Summary summary = 4; - optional Untyped untyped = 5; - optional Histogram histogram = 7; - optional int64 timestamp_ms = 6; -} - -message MetricFamily { - optional string name = 1; - optional string help = 2; - optional MetricType type = 3; - repeated Metric metric = 4; - optional string unit = 5; -} diff --git a/src/main/proto/opentelemetry/proto/collector/logs/v1/logs_service.proto b/src/main/proto/opentelemetry/proto/collector/logs/v1/logs_service.proto deleted file mode 100644 index 8be5cf7..0000000 --- a/src/main/proto/opentelemetry/proto/collector/logs/v1/logs_service.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.collector.logs.v1; - -import "opentelemetry/proto/logs/v1/logs.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Collector.Logs.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.collector.logs.v1"; -option java_outer_classname = "LogsServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/logs/v1"; - -// Service that can be used to push logs between one Application instrumented with -// OpenTelemetry and an collector, or between an collector and a central collector (in this -// case logs are sent/received to/from multiple Applications). -service LogsService { - rpc Export(ExportLogsServiceRequest) returns (ExportLogsServiceResponse) {} -} - -message ExportLogsServiceRequest { - // An array of ResourceLogs. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - repeated opentelemetry.proto.logs.v1.ResourceLogs resource_logs = 1; -} - -message ExportLogsServiceResponse { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - ExportLogsPartialSuccess partial_success = 1; -} - -message ExportLogsPartialSuccess { - // The number of rejected log records. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - int64 rejected_log_records = 1; - - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - string error_message = 2; -} diff --git a/src/main/proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto b/src/main/proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto deleted file mode 100644 index bc02428..0000000 --- a/src/main/proto/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.collector.metrics.v1; - -import "opentelemetry/proto/metrics/v1/metrics.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Collector.Metrics.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.collector.metrics.v1"; -option java_outer_classname = "MetricsServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/metrics/v1"; - -// Service that can be used to push metrics between one Application -// instrumented with OpenTelemetry and a collector, or between a collector and a -// central collector. -service MetricsService { - rpc Export(ExportMetricsServiceRequest) returns (ExportMetricsServiceResponse) {} -} - -message ExportMetricsServiceRequest { - // An array of ResourceMetrics. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1; -} - -message ExportMetricsServiceResponse { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - ExportMetricsPartialSuccess partial_success = 1; -} - -message ExportMetricsPartialSuccess { - // The number of rejected data points. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - int64 rejected_data_points = 1; - - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - string error_message = 2; -} diff --git a/src/main/proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto b/src/main/proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto deleted file mode 100644 index 81bb210..0000000 --- a/src/main/proto/opentelemetry/proto/collector/profiles/v1development/profiles_service.proto +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2023, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.collector.profiles.v1development; - -import "opentelemetry/proto/profiles/v1development/profiles.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Collector.Profiles.V1Development"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.collector.profiles.v1development"; -option java_outer_classname = "ProfilesServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/profiles/v1development"; - -// Service that can be used to push profiles between one Application instrumented with -// OpenTelemetry and a collector, or between a collector and a central collector. -service ProfilesService { - rpc Export(ExportProfilesServiceRequest) returns (ExportProfilesServiceResponse) {} -} - -message ExportProfilesServiceRequest { - // An array of ResourceProfiles. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - repeated opentelemetry.proto.profiles.v1development.ResourceProfiles resource_profiles = 1; - - // The reference table containing all data shared by profiles across the message being sent. - opentelemetry.proto.profiles.v1development.ProfilesDictionary dictionary = 2; -} - -message ExportProfilesServiceResponse { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - ExportProfilesPartialSuccess partial_success = 1; -} - -message ExportProfilesPartialSuccess { - // The number of rejected profiles. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - int64 rejected_profiles = 1; - - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - string error_message = 2; -} diff --git a/src/main/proto/opentelemetry/proto/collector/trace/v1/trace_service.proto b/src/main/proto/opentelemetry/proto/collector/trace/v1/trace_service.proto deleted file mode 100644 index efbbedb..0000000 --- a/src/main/proto/opentelemetry/proto/collector/trace/v1/trace_service.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.collector.trace.v1; - -import "opentelemetry/proto/trace/v1/trace.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Collector.Trace.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.collector.trace.v1"; -option java_outer_classname = "TraceServiceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/trace/v1"; - -// Service that can be used to push spans between one Application instrumented with -// OpenTelemetry and a collector, or between a collector and a central collector (in this -// case spans are sent/received to/from multiple Applications). -service TraceService { - rpc Export(ExportTraceServiceRequest) returns (ExportTraceServiceResponse) {} -} - -message ExportTraceServiceRequest { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - repeated opentelemetry.proto.trace.v1.ResourceSpans resource_spans = 1; -} - -message ExportTraceServiceResponse { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - ExportTracePartialSuccess partial_success = 1; -} - -message ExportTracePartialSuccess { - // The number of rejected spans. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - int64 rejected_spans = 1; - - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - string error_message = 2; -} diff --git a/src/main/proto/opentelemetry/proto/common/v1/common.proto b/src/main/proto/opentelemetry/proto/common/v1/common.proto deleted file mode 100644 index 7f9ffab..0000000 --- a/src/main/proto/opentelemetry/proto/common/v1/common.proto +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.common.v1; - -option csharp_namespace = "OpenTelemetry.Proto.Common.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.common.v1"; -option java_outer_classname = "CommonProto"; -option go_package = "go.opentelemetry.io/proto/otlp/common/v1"; - -// Represents any type of attribute value. AnyValue may contain a -// primitive value such as a string or integer or it may contain an arbitrary nested -// object containing arrays, key-value lists and primitives. -message AnyValue { - // The value is one of the listed fields. It is valid for all values to be unspecified - // in which case this AnyValue is considered to be "empty". - oneof value { - string string_value = 1; - bool bool_value = 2; - int64 int_value = 3; - double double_value = 4; - ArrayValue array_value = 5; - KeyValueList kvlist_value = 6; - bytes bytes_value = 7; - } -} - -// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message -// since oneof in AnyValue does not allow repeated fields. -message ArrayValue { - // Array of values. The array may be empty (contain 0 elements). - repeated AnyValue values = 1; -} - -// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message -// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need -// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to -// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches -// are semantically equivalent. -message KeyValueList { - // A collection of key/value pairs of key-value pairs. The list may be empty (may - // contain 0 elements). - // - // The keys MUST be unique (it is not allowed to have more than one - // value with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated KeyValue values = 1; -} - -// Represents a key-value pair that is used to store Span attributes, Link -// attributes, etc. -message KeyValue { - // The key name of the pair. - string key = 1; - - // The value of the pair. - AnyValue value = 2; -} - -// InstrumentationScope is a message representing the instrumentation scope information -// such as the fully qualified name and version. -message InstrumentationScope { - // A name denoting the Instrumentation scope. - // An empty instrumentation scope name means the name is unknown. - string name = 1; - - // Defines the version of the instrumentation scope. - // An empty instrumentation scope version means the version is unknown. - string version = 2; - - // Additional attributes that describe the scope. [Optional]. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated KeyValue attributes = 3; - - // The number of attributes that were discarded. Attributes - // can be discarded because their keys are too long or because there are too many - // attributes. If this value is 0, then no attributes were dropped. - uint32 dropped_attributes_count = 4; -} - -// A reference to an Entity. -// Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs. -// -// Status: [Development] -message EntityRef { - // The Schema URL, if known. This is the identifier of the Schema that the entity data - // is recorded in. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // - // This schema_url applies to the data in this message and to the Resource attributes - // referenced by id_keys and description_keys. - // TODO: discuss if we are happy with this somewhat complicated definition of what - // the schema_url applies to. - // - // This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs. - string schema_url = 1; - - // Defines the type of the entity. MUST not change during the lifetime of the entity. - // For example: "service" or "host". This field is required and MUST not be empty - // for valid entities. - string type = 2; - - // Attribute Keys that identify the entity. - // MUST not change during the lifetime of the entity. The Id must contain at least one attribute. - // These keys MUST exist in the containing {message}.attributes. - repeated string id_keys = 3; - - // Descriptive (non-identifying) attribute keys of the entity. - // MAY change over the lifetime of the entity. MAY be empty. - // These attribute keys are not part of entity's identity. - // These keys MUST exist in the containing {message}.attributes. - repeated string description_keys = 4; -} \ No newline at end of file diff --git a/src/main/proto/opentelemetry/proto/logs/v1/logs.proto b/src/main/proto/opentelemetry/proto/logs/v1/logs.proto deleted file mode 100644 index 842c93c..0000000 --- a/src/main/proto/opentelemetry/proto/logs/v1/logs.proto +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2020, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.logs.v1; - -import "opentelemetry/proto/common/v1/common.proto"; -import "opentelemetry/proto/resource/v1/resource.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Logs.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.logs.v1"; -option java_outer_classname = "LogsProto"; -option go_package = "go.opentelemetry.io/proto/otlp/logs/v1"; - -// LogsData represents the logs data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP logs data but do not -// implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -message LogsData { - // An array of ResourceLogs. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - repeated ResourceLogs resource_logs = 1; -} - -// A collection of ScopeLogs from a Resource. -message ResourceLogs { - reserved 1000; - - // The resource for the logs in this message. - // If this field is not set then resource info is unknown. - opentelemetry.proto.resource.v1.Resource resource = 1; - - // A list of ScopeLogs that originate from a resource. - repeated ScopeLogs scope_logs = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_logs" field which have their own schema_url field. - string schema_url = 3; -} - -// A collection of Logs produced by a Scope. -message ScopeLogs { - // The instrumentation scope information for the logs in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - opentelemetry.proto.common.v1.InstrumentationScope scope = 1; - - // A list of log records. - repeated LogRecord log_records = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the log data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "scope" field and all logs in the - // "log_records" field. - string schema_url = 3; -} - -// Possible values for LogRecord.SeverityNumber. -enum SeverityNumber { - // UNSPECIFIED is the default SeverityNumber, it MUST NOT be used. - SEVERITY_NUMBER_UNSPECIFIED = 0; - SEVERITY_NUMBER_TRACE = 1; - SEVERITY_NUMBER_TRACE2 = 2; - SEVERITY_NUMBER_TRACE3 = 3; - SEVERITY_NUMBER_TRACE4 = 4; - SEVERITY_NUMBER_DEBUG = 5; - SEVERITY_NUMBER_DEBUG2 = 6; - SEVERITY_NUMBER_DEBUG3 = 7; - SEVERITY_NUMBER_DEBUG4 = 8; - SEVERITY_NUMBER_INFO = 9; - SEVERITY_NUMBER_INFO2 = 10; - SEVERITY_NUMBER_INFO3 = 11; - SEVERITY_NUMBER_INFO4 = 12; - SEVERITY_NUMBER_WARN = 13; - SEVERITY_NUMBER_WARN2 = 14; - SEVERITY_NUMBER_WARN3 = 15; - SEVERITY_NUMBER_WARN4 = 16; - SEVERITY_NUMBER_ERROR = 17; - SEVERITY_NUMBER_ERROR2 = 18; - SEVERITY_NUMBER_ERROR3 = 19; - SEVERITY_NUMBER_ERROR4 = 20; - SEVERITY_NUMBER_FATAL = 21; - SEVERITY_NUMBER_FATAL2 = 22; - SEVERITY_NUMBER_FATAL3 = 23; - SEVERITY_NUMBER_FATAL4 = 24; -} - -// LogRecordFlags represents constants used to interpret the -// LogRecord.flags field, which is protobuf 'fixed32' type and is to -// be used as bit-fields. Each non-zero value defined in this enum is -// a bit-mask. To extract the bit-field, for example, use an -// expression like: -// -// (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK) -// -enum LogRecordFlags { - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - LOG_RECORD_FLAGS_DO_NOT_USE = 0; - - // Bits 0-7 are used for trace flags. - LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 0x000000FF; - - // Bits 8-31 are reserved for future use. -} - -// A log record according to OpenTelemetry Log Data Model: -// https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md -message LogRecord { - reserved 4; - - // time_unix_nano is the time when the event occurred. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - fixed64 time_unix_nano = 1; - - // Time when the event was observed by the collection system. - // For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK) - // this timestamp is typically set at the generation time and is equal to Timestamp. - // For events originating externally and collected by OpenTelemetry (e.g. using - // Collector) this is the time when OpenTelemetry's code observed the event measured - // by the clock of the OpenTelemetry code. This field MUST be set once the event is - // observed by OpenTelemetry. - // - // For converting OpenTelemetry log data to formats that support only one timestamp or - // when receiving OpenTelemetry log data by recipients that support only one timestamp - // internally the following logic is recommended: - // - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - fixed64 observed_time_unix_nano = 11; - - // Numerical value of the severity, normalized to values described in Log Data Model. - // [Optional]. - SeverityNumber severity_number = 2; - - // The severity text (also known as log level). The original string representation as - // it is known at the source. [Optional]. - string severity_text = 3; - - // A value containing the body of the log record. Can be for example a human-readable - // string message (including multi-line) describing the event in a free form or it can - // be a structured data composed of arrays and maps of other values. [Optional]. - opentelemetry.proto.common.v1.AnyValue body = 5; - - // Additional attributes that describe the specific event occurrence. [Optional]. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 6; - uint32 dropped_attributes_count = 7; - - // Flags, a bit field. 8 least significant bits are the trace flags as - // defined in W3C Trace Context specification. 24 most significant bits are reserved - // and must be set to 0. Readers must not assume that 24 most significant bits - // will be zero and must correctly mask the bits when reading 8-bit trace flag (use - // flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional]. - fixed32 flags = 8; - - // A unique identifier for a trace. All logs from the same trace share - // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is optional. - // - // The receivers SHOULD assume that the log record is not associated with a - // trace if any of the following is true: - // - the field is not present, - // - the field contains an invalid value. - bytes trace_id = 9; - - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is optional. If the sender specifies a valid span_id then it SHOULD also - // specify a valid trace_id. - // - // The receivers SHOULD assume that the log record is not associated with a - // span if any of the following is true: - // - the field is not present, - // - the field contains an invalid value. - bytes span_id = 10; - - // A unique identifier of event category/type. - // All events with the same event_name are expected to conform to the same - // schema for both their attributes and their body. - // - // Recommended to be fully qualified and short (no longer than 256 characters). - // - // Presence of event_name on the log record identifies this record - // as an event. - // - // [Optional]. - string event_name = 12; -} diff --git a/src/main/proto/opentelemetry/proto/metrics/v1/metrics.proto b/src/main/proto/opentelemetry/proto/metrics/v1/metrics.proto deleted file mode 100644 index a6fab4e..0000000 --- a/src/main/proto/opentelemetry/proto/metrics/v1/metrics.proto +++ /dev/null @@ -1,735 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.metrics.v1; - -import "opentelemetry/proto/common/v1/common.proto"; -import "opentelemetry/proto/resource/v1/resource.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Metrics.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.metrics.v1"; -option java_outer_classname = "MetricsProto"; -option go_package = "go.opentelemetry.io/proto/otlp/metrics/v1"; - -// MetricsData represents the metrics data that can be stored in a persistent -// storage, OR can be embedded by other protocols that transfer OTLP metrics -// data but do not implement the OTLP protocol. -// -// MetricsData -// └─── ResourceMetrics -// ├── Resource -// ├── SchemaURL -// └── ScopeMetrics -// ├── Scope -// ├── SchemaURL -// └── Metric -// ├── Name -// ├── Description -// ├── Unit -// └── data -// ├── Gauge -// ├── Sum -// ├── Histogram -// ├── ExponentialHistogram -// └── Summary -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -message MetricsData { - // An array of ResourceMetrics. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - repeated ResourceMetrics resource_metrics = 1; -} - -// A collection of ScopeMetrics from a Resource. -message ResourceMetrics { - reserved 1000; - - // The resource for the metrics in this message. - // If this field is not set then no resource info is known. - opentelemetry.proto.resource.v1.Resource resource = 1; - - // A list of metrics that originate from a resource. - repeated ScopeMetrics scope_metrics = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_metrics" field which have their own schema_url field. - string schema_url = 3; -} - -// A collection of Metrics produced by an Scope. -message ScopeMetrics { - // The instrumentation scope information for the metrics in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - opentelemetry.proto.common.v1.InstrumentationScope scope = 1; - - // A list of metrics that originate from an instrumentation library. - repeated Metric metrics = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the metric data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "scope" field and all metrics in the - // "metrics" field. - string schema_url = 3; -} - -// Defines a Metric which has one or more timeseries. The following is a -// brief summary of the Metric data model. For more details, see: -// -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md -// -// The data model and relation between entities is shown in the -// diagram below. Here, "DataPoint" is the term used to refer to any -// one of the specific data point value types, and "points" is the term used -// to refer to any one of the lists of points contained in the Metric. -// -// - Metric is composed of a metadata and data. -// - Metadata part contains a name, description, unit. -// - Data is one of the possible types (Sum, Gauge, Histogram, Summary). -// - DataPoint contains timestamps, attributes, and one of the possible value type -// fields. -// -// Metric -// +------------+ -// |name | -// |description | -// |unit | +------------------------------------+ -// |data |---> |Gauge, Sum, Histogram, Summary, ... | -// +------------+ +------------------------------------+ -// -// Data [One of Gauge, Sum, Histogram, Summary, ...] -// +-----------+ -// |... | // Metadata about the Data. -// |points |--+ -// +-----------+ | -// | +---------------------------+ -// | |DataPoint 1 | -// v |+------+------+ +------+ | -// +-----+ ||label |label |...|label | | -// | 1 |-->||value1|value2|...|valueN| | -// +-----+ |+------+------+ +------+ | -// | . | |+-----+ | -// | . | ||value| | -// | . | |+-----+ | -// | . | +---------------------------+ -// | . | . -// | . | . -// | . | . -// | . | +---------------------------+ -// | . | |DataPoint M | -// +-----+ |+------+------+ +------+ | -// | M |-->||label |label |...|label | | -// +-----+ ||value1|value2|...|valueN| | -// |+------+------+ +------+ | -// |+-----+ | -// ||value| | -// |+-----+ | -// +---------------------------+ -// -// Each distinct type of DataPoint represents the output of a specific -// aggregation function, the result of applying the DataPoint's -// associated function of to one or more measurements. -// -// All DataPoint types have three common fields: -// - Attributes includes key-value pairs associated with the data point -// - TimeUnixNano is required, set to the end time of the aggregation -// - StartTimeUnixNano is optional, but strongly encouraged for DataPoints -// having an AggregationTemporality field, as discussed below. -// -// Both TimeUnixNano and StartTimeUnixNano values are expressed as -// UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. -// -// # TimeUnixNano -// -// This field is required, having consistent interpretation across -// DataPoint types. TimeUnixNano is the moment corresponding to when -// the data point's aggregate value was captured. -// -// Data points with the 0 value for TimeUnixNano SHOULD be rejected -// by consumers. -// -// # StartTimeUnixNano -// -// StartTimeUnixNano in general allows detecting when a sequence of -// observations is unbroken. This field indicates to consumers the -// start time for points with cumulative and delta -// AggregationTemporality, and it should be included whenever possible -// to support correct rate calculation. Although it may be omitted -// when the start time is truly unknown, setting StartTimeUnixNano is -// strongly encouraged. -message Metric { - reserved 4, 6, 8; - - // The name of the metric. - string name = 1; - - // A description of the metric, which can be used in documentation. - string description = 2; - - // The unit in which the metric value is reported. Follows the format - // described by https://unitsofmeasure.org/ucum.html. - string unit = 3; - - // Data determines the aggregation type (if any) of the metric, what is the - // reported value type for the data points, as well as the relatationship to - // the time interval over which they are reported. - oneof data { - Gauge gauge = 5; - Sum sum = 7; - Histogram histogram = 9; - ExponentialHistogram exponential_histogram = 10; - Summary summary = 11; - } - - // Additional metadata attributes that describe the metric. [Optional]. - // Attributes are non-identifying. - // Consumers SHOULD NOT need to be aware of these attributes. - // These attributes MAY be used to encode information allowing - // for lossless roundtrip translation to / from another data model. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue metadata = 12; -} - -// Gauge represents the type of a scalar metric that always exports the -// "current value" for every data point. It should be used for an "unknown" -// aggregation. -// -// A Gauge does not support different aggregation temporalities. Given the -// aggregation is unknown, points cannot be combined using the same -// aggregation, regardless of aggregation temporalities. Therefore, -// AggregationTemporality is not included. Consequently, this also means -// "StartTimeUnixNano" is ignored for all data points. -message Gauge { - // The time series data points. - // Note: Multiple time series may be included (same timestamp, different attributes). - repeated NumberDataPoint data_points = 1; -} - -// Sum represents the type of a scalar metric that is calculated as a sum of all -// reported measurements over a time interval. -message Sum { - // The time series data points. - // Note: Multiple time series may be included (same timestamp, different attributes). - repeated NumberDataPoint data_points = 1; - - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality aggregation_temporality = 2; - - // Represents whether the sum is monotonic. - bool is_monotonic = 3; -} - -// Histogram represents the type of a metric that is calculated by aggregating -// as a Histogram of all reported measurements over a time interval. -message Histogram { - // The time series data points. - // Note: Multiple time series may be included (same timestamp, different attributes). - repeated HistogramDataPoint data_points = 1; - - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality aggregation_temporality = 2; -} - -// ExponentialHistogram represents the type of a metric that is calculated by aggregating -// as a ExponentialHistogram of all reported double measurements over a time interval. -message ExponentialHistogram { - // The time series data points. - // Note: Multiple time series may be included (same timestamp, different attributes). - repeated ExponentialHistogramDataPoint data_points = 1; - - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality aggregation_temporality = 2; -} - -// Summary metric data are used to convey quantile summaries, -// a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) -// and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) -// data type. These data points cannot always be merged in a meaningful way. -// While they can be useful in some applications, histogram data points are -// recommended for new applications. -// Summary metrics do not have an aggregation temporality field. This is -// because the count and sum fields of a SummaryDataPoint are assumed to be -// cumulative values. -message Summary { - // The time series data points. - // Note: Multiple time series may be included (same timestamp, different attributes). - repeated SummaryDataPoint data_points = 1; -} - -// AggregationTemporality defines how a metric aggregator reports aggregated -// values. It describes how those values relate to the time interval over -// which they are aggregated. -enum AggregationTemporality { - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; - - // DELTA is an AggregationTemporality for a metric aggregator which reports - // changes since last report time. Successive metrics contain aggregation of - // values from continuous and non-overlapping intervals. - // - // The values for a DELTA metric are based only on the time interval - // associated with one measurement cycle. There is no dependency on - // previous measurements like is the case for CUMULATIVE metrics. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // DELTA metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0+1 to - // t_0+2 with a value of 2. - AGGREGATION_TEMPORALITY_DELTA = 1; - - // CUMULATIVE is an AggregationTemporality for a metric aggregator which - // reports changes since a fixed start time. This means that current values - // of a CUMULATIVE metric depend on all previous measurements since the - // start time. Because of this, the sender is required to retain this state - // in some form. If this state is lost or invalidated, the CUMULATIVE metric - // values MUST be reset and a new fixed start time following the last - // reported measurement time sent MUST be used. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // CUMULATIVE metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+2 with a value of 5. - // 9. The system experiences a fault and loses state. - // 10. The system recovers and resumes receiving at time=t_1. - // 11. A request is received, the system measures 1 request. - // 12. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_1 to - // t_0+1 with a value of 1. - // - // Note: Even though, when reporting changes since last report time, using - // CUMULATIVE is valid, it is not recommended. This may cause problems for - // systems that do not use start_time to determine when the aggregation - // value was reset (e.g. Prometheus). - AGGREGATION_TEMPORALITY_CUMULATIVE = 2; -} - -// DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a -// bit-field representing 32 distinct boolean flags. Each flag defined in this -// enum is a bit-mask. To test the presence of a single flag in the flags of -// a data point, for example, use an expression like: -// -// (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK -// -enum DataPointFlags { - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - DATA_POINT_FLAGS_DO_NOT_USE = 0; - - // This DataPoint is valid but has no recorded value. This value - // SHOULD be used to reflect explicitly missing data in a series, as - // for an equivalent to the Prometheus "staleness marker". - DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1; - - // Bits 2-31 are reserved for future use. -} - -// NumberDataPoint is a single data point in a timeseries that describes the -// time-varying scalar value of a metric. -message NumberDataPoint { - reserved 1; - - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // The value itself. A point is considered invalid when one of the recognized - // value fields is not present inside this oneof. - oneof value { - double as_double = 4; - sfixed64 as_int = 6; - } - - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - repeated Exemplar exemplars = 5; - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 8; -} - -// HistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Histogram. A Histogram contains summary statistics -// for a population of values, it may optionally contain the distribution of -// those values across a set of buckets. -// -// If the histogram contains the distribution of values, then both -// "explicit_bounds" and "bucket counts" fields must be defined. -// If the histogram does not contain the distribution of values, then both -// "explicit_bounds" and "bucket_counts" must be omitted and only "count" and -// "sum" are known. -message HistogramDataPoint { - reserved 1; - - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be non-negative. This - // value must be equal to the sum of the "count" fields in buckets if a - // histogram is provided. - fixed64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram - optional double sum = 5; - - // bucket_counts is an optional field contains the count values of histogram - // for each bucket. - // - // The sum of the bucket_counts must equal the value in the count field. - // - // The number of elements in bucket_counts array must be by one greater than - // the number of elements in explicit_bounds array. The exception to this rule - // is when the length of bucket_counts is 0, then the length of explicit_bounds - // must also be 0. - repeated fixed64 bucket_counts = 6; - - // explicit_bounds specifies buckets with explicitly defined bounds for values. - // - // The boundaries for bucket at index i are: - // - // (-infinity, explicit_bounds[i]] for i == 0 - // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) - // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) - // - // The values in the explicit_bounds array must be strictly increasing. - // - // Histogram buckets are inclusive of their upper boundary, except the last - // bucket where the boundary is at infinity. This format is intentionally - // compatible with the OpenMetrics histogram definition. - // - // If bucket_counts length is 0 then explicit_bounds length must also be 0, - // otherwise the data point is invalid. - repeated double explicit_bounds = 7; - - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - repeated Exemplar exemplars = 8; - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 10; - - // min is the minimum value over (start_time, end_time]. - optional double min = 11; - - // max is the maximum value over (start_time, end_time]. - optional double max = 12; -} - -// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains -// summary statistics for a population of values, it may optionally contain the -// distribution of those values across a set of buckets. -// -message ExponentialHistogramDataPoint { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // The number of values in the population. Must be - // non-negative. This value must be equal to the sum of the "bucket_counts" - // values in the positive and negative Buckets plus the "zero_count" field. - fixed64 count = 4; - - // The sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram - optional double sum = 5; - - // scale describes the resolution of the histogram. Boundaries are - // located at powers of the base, where: - // - // base = (2^(2^-scale)) - // - // The histogram bucket identified by `index`, a signed integer, - // contains values that are greater than (base^index) and - // less than or equal to (base^(index+1)). - // - // The positive and negative ranges of the histogram are expressed - // separately. Negative values are mapped by their absolute value - // into the negative range using the same scale as the positive range. - // - // scale is not restricted by the protocol, as the permissible - // values depend on the range of the data. - sint32 scale = 6; - - // The count of values that are either exactly zero or - // within the region considered zero by the instrumentation at the - // tolerated degree of precision. This bucket stores values that - // cannot be expressed using the standard exponential formula as - // well as values that have been rounded to zero. - // - // Implementations MAY consider the zero bucket to have probability - // mass equal to (zero_count / count). - fixed64 zero_count = 7; - - // positive carries the positive range of exponential bucket counts. - Buckets positive = 8; - - // negative carries the negative range of exponential bucket counts. - Buckets negative = 9; - - // Buckets are a set of bucket counts, encoded in a contiguous array - // of counts. - message Buckets { - // The bucket index of the first entry in the bucket_counts array. - // - // Note: This uses a varint encoding as a simple form of compression. - sint32 offset = 1; - - // An array of count values, where bucket_counts[i] carries - // the count of the bucket at index (offset+i). bucket_counts[i] is the count - // of values greater than base^(offset+i) and less than or equal to - // base^(offset+i+1). - // - // Note: By contrast, the explicit HistogramDataPoint uses - // fixed64. This field is expected to have many buckets, - // especially zeros, so uint64 has been selected to ensure - // varint encoding. - repeated uint64 bucket_counts = 2; - } - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 10; - - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - repeated Exemplar exemplars = 11; - - // The minimum value over (start_time, end_time]. - optional double min = 12; - - // The maximum value over (start_time, end_time]. - optional double max = 13; - - // ZeroThreshold may be optionally set to convey the width of the zero - // region. Where the zero region is defined as the closed interval - // [-ZeroThreshold, ZeroThreshold]. - // When ZeroThreshold is 0, zero count bucket stores values that cannot be - // expressed using the standard exponential formula as well as values that - // have been rounded to zero. - double zero_threshold = 14; -} - -// SummaryDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Summary metric. The count and sum fields represent -// cumulative values. -message SummaryDataPoint { - reserved 1; - - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be non-negative. - fixed64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary - double sum = 5; - - // Represents the value at a given quantile of a distribution. - // - // To record Min and Max values following conventions are used: - // - The 1.0 quantile is equivalent to the maximum value observed. - // - The 0.0 quantile is equivalent to the minimum value observed. - // - // See the following issue for more context: - // https://github.com/open-telemetry/opentelemetry-proto/issues/125 - message ValueAtQuantile { - // The quantile of a distribution. Must be in the interval - // [0.0, 1.0]. - double quantile = 1; - - // The value at the given quantile of a distribution. - // - // Quantile values must NOT be negative. - double value = 2; - } - - // (Optional) list of values at different quantiles of the distribution calculated - // from the current snapshot. The quantiles must be strictly increasing. - repeated ValueAtQuantile quantile_values = 6; - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 8; -} - -// A representation of an exemplar, which is a sample input measurement. -// Exemplars also hold information about the environment when the measurement -// was recorded, for example the span and trace ID of the active span when the -// exemplar was recorded. -message Exemplar { - reserved 1; - - // The set of key/value pairs that were filtered out by the aggregator, but - // recorded alongside the original measurement. Only key/value pairs that were - // filtered out by the aggregator should be included - repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7; - - // time_unix_nano is the exact time when this exemplar was recorded - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 2; - - // The value of the measurement that was recorded. An exemplar is - // considered invalid when one of the recognized value fields is not present - // inside this oneof. - oneof value { - double as_double = 3; - sfixed64 as_int = 6; - } - - // (Optional) Span ID of the exemplar trace. - // span_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - bytes span_id = 4; - - // (Optional) Trace ID of the exemplar trace. - // trace_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - bytes trace_id = 5; -} diff --git a/src/main/proto/opentelemetry/proto/profiles/v1development/profiles.proto b/src/main/proto/opentelemetry/proto/profiles/v1development/profiles.proto deleted file mode 100644 index a6af56d..0000000 --- a/src/main/proto/opentelemetry/proto/profiles/v1development/profiles.proto +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright 2023, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file includes work covered by the following copyright and permission notices: -// -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.profiles.v1development; - -import "opentelemetry/proto/common/v1/common.proto"; -import "opentelemetry/proto/resource/v1/resource.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Profiles.V1Development"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.profiles.v1development"; -option java_outer_classname = "ProfilesProto"; -option go_package = "go.opentelemetry.io/proto/otlp/profiles/v1development"; - -// Relationships Diagram -// -// ┌──────────────────┐ LEGEND -// │ ProfilesData │ ─────┐ -// └──────────────────┘ │ ─────▶ embedded -// │ │ -// │ 1-n │ ─────▷ referenced by index -// ▼ ▼ -// ┌──────────────────┐ ┌────────────────────┐ -// │ ResourceProfiles │ │ ProfilesDictionary │ -// └──────────────────┘ └────────────────────┘ -// │ -// │ 1-n -// ▼ -// ┌──────────────────┐ -// │ ScopeProfiles │ -// └──────────────────┘ -// │ -// │ 1-n -// ▼ -// ┌──────────────────┐ -// │ Profile │ -// └──────────────────┘ -// │ n-1 -// │ 1-n ┌───────────────────────────────────────┐ -// ▼ │ ▽ -// ┌──────────────────┐ 1-n ┌─────────────────┐ ┌──────────┐ -// │ Sample │ ──────▷ │ KeyValueAndUnit │ │ Link │ -// └──────────────────┘ └─────────────────┘ └──────────┘ -// │ △ △ -// │ n-1 │ │ 1-n -// ▽ │ │ -// ┌──────────────────┐ │ │ -// │ Stack │ │ │ -// └──────────────────┘ │ │ -// │ 1-n │ │ -// │ 1-n ┌────────────────┘ │ -// ▽ │ │ -// ┌──────────────────┐ n-1 ┌─────────────┐ -// │ Location │ ──────▷ │ Mapping │ -// └──────────────────┘ └─────────────┘ -// │ -// │ 1-n -// ▼ -// ┌──────────────────┐ -// │ Line │ -// └──────────────────┘ -// │ -// │ 1-1 -// ▽ -// ┌──────────────────┐ -// │ Function │ -// └──────────────────┘ -// - -// ProfilesDictionary represents the profiles data shared across the -// entire message being sent. The following applies to all fields in this -// message: -// -// - A dictionary is an array of dictionary items. Users of the dictionary -// compactly reference the items using the index within the array. -// -// - A dictionary MUST have a zero value encoded as the first element. This -// allows for _index fields pointing into the dictionary to use a 0 pointer -// value to indicate 'null' / 'not set'. Unless otherwise defined, a 'zero -// value' message value is one with all default field values, so as to -// minimize wire encoded size. -// -// - There SHOULD NOT be dupes in a dictionary. The identity of dictionary -// items is based on their value, recursively as needed. If a particular -// implementation does emit duplicated items, it MUST NOT attempt to give them -// meaning based on the index or order. A profile processor may remove -// duplicate items and this MUST NOT have any observable effects for -// consumers. -// -// - There SHOULD NOT be orphaned (unreferenced) items in a dictionary. A -// profile processor may remove ("garbage-collect") orphaned items and this -// MUST NOT have any observable effects for consumers. -// -message ProfilesDictionary { - // Mappings from address ranges to the image/binary/library mapped - // into that address range referenced by locations via Location.mapping_index. - // - // mapping_table[0] must always be zero value (Mapping{}) and present. - repeated Mapping mapping_table = 1; - - // Locations referenced by samples via Stack.location_indices. - // - // location_table[0] must always be zero value (Location{}) and present. - repeated Location location_table = 2; - - // Functions referenced by locations via Line.function_index. - // - // function_table[0] must always be zero value (Function{}) and present. - repeated Function function_table = 3; - - // Links referenced by samples via Sample.link_index. - // - // link_table[0] must always be zero value (Link{}) and present. - repeated Link link_table = 4; - - // A common table for strings referenced by various messages. - // - // string_table[0] must always be "" and present. - repeated string string_table = 5; - - // A common table for attributes referenced by the Profile, Sample, Mapping - // and Location messages below through attribute_indices field. Each entry is - // a key/value pair with an optional unit. Since this is a dictionary table, - // multiple entries with the same key may be present, unlike direct attribute - // tables like Resource.attributes. The referencing attribute_indices fields, - // though, do maintain the key uniqueness requirement. - // - // It's recommended to use attributes for variables with bounded cardinality, - // such as categorical variables - // (https://en.wikipedia.org/wiki/Categorical_variable). Using an attribute of - // a floating point type (e.g., CPU time) in a sample can quickly make every - // attribute value unique, defeating the purpose of the dictionary and - // impractically increasing the profile size. - // - // Examples of attributes: - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "abc.com/myattribute": true - // "allocation_size": 128 bytes - // - // attribute_table[0] must always be zero value (KeyValueAndUnit{}) and present. - repeated KeyValueAndUnit attribute_table = 6; - - // Stacks referenced by samples via Sample.stack_index. - // - // stack_table[0] must always be zero value (Stack{}) and present. - repeated Stack stack_table = 7; -} - -// ProfilesData represents the profiles data that can be stored in persistent storage, -// OR can be embedded by other protocols that transfer OTLP profiles data but do not -// implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -message ProfilesData { - // An array of ResourceProfiles. - // For data coming from an SDK profiler, this array will typically contain one - // element. Host-level profilers will usually create one ResourceProfile per - // container, as well as one additional ResourceProfile grouping all samples - // from non-containerized processes. - // Other resource groupings are possible as well and clarified via - // Resource.attributes and semantic conventions. - // Tools that visualize profiles should prefer displaying - // resources_profiles[0].scope_profiles[0].profiles[0] by default. - repeated ResourceProfiles resource_profiles = 1; - - // One instance of ProfilesDictionary - ProfilesDictionary dictionary = 2; -} - - -// A collection of ScopeProfiles from a Resource. -message ResourceProfiles { - reserved 1000; - - // The resource for the profiles in this message. - // If this field is not set then no resource info is known. - opentelemetry.proto.resource.v1.Resource resource = 1; - - // A list of ScopeProfiles that originate from a resource. - repeated ScopeProfiles scope_profiles = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_profiles" field which have their own schema_url field. - string schema_url = 3; -} - -// A collection of Profiles produced by an InstrumentationScope. -message ScopeProfiles { - // The instrumentation scope information for the profiles in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - opentelemetry.proto.common.v1.InstrumentationScope scope = 1; - - // A list of Profiles that originate from an instrumentation scope. - repeated Profile profiles = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the profile data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "scope" field and all profiles in the - // "profiles" field. - string schema_url = 3; -} - -// Profile is a common stacktrace profile format. -// -// Measurements represented with this format should follow the -// following conventions: -// -// - Consumers should treat unset optional fields as if they had been -// set with their default value. -// -// - When possible, measurements should be stored in "unsampled" form -// that is most useful to humans. There should be enough -// information present to determine the original sampled values. -// -// - The profile is represented as a set of samples, where each sample -// references a stack trace which is a list of locations, each belonging -// to a mapping. -// - There is a N->1 relationship from Stack.location_indices entries to -// locations. For every Stack.location_indices entry there must be a -// unique Location with that index. -// - There is an optional N->1 relationship from locations to -// mappings. For every nonzero Location.mapping_id there must be a -// unique Mapping with that index. - -// Represents a complete profile, including sample types, samples, mappings to -// binaries, stacks, locations, functions, string table, and additional -// metadata. It modifies and annotates pprof Profile with OpenTelemetry -// specific fields. -// -// Note that whilst fields in this message retain the name and field id from pprof in most cases -// for ease of understanding data migration, it is not intended that pprof:Profile and -// OpenTelemetry:Profile encoding be wire compatible. -message Profile { - // The type and unit of all Sample.values in this profile. - // For a cpu or off-cpu profile this might be: - // ["cpu","nanoseconds"] or ["off_cpu","nanoseconds"] - // For a heap profile, this might be: - // ["allocated_objects","count"] or ["allocated_space","bytes"], - ValueType sample_type = 1; - // The set of samples recorded in this profile. - repeated Sample samples = 2; - - // The following fields 3-12 are informational, do not affect - // interpretation of results. - - // Time of collection (UTC) represented as nanoseconds past the epoch. - fixed64 time_unix_nano = 3; - // Duration of the profile, if a duration makes sense. - uint64 duration_nano = 4; - // The kind of events between sampled occurrences. - // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] - ValueType period_type = 5; - // The number of events between sampled occurrences. - int64 period = 6; - - // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with - // all zeroes is considered invalid. It may be used for deduplication and signal - // correlation purposes. It is acceptable to treat two profiles with different values - // in this field as not equal, even if they represented the same object at an earlier - // time. - // This field is optional; an ID may be assigned to an ID-less profile in a later step. - bytes profile_id = 7; - - // The number of attributes that were discarded. Attributes - // can be discarded because their keys are too long or because there are too many - // attributes. If this value is 0, then no attributes were dropped. - uint32 dropped_attributes_count = 8; - - // The original payload format. See also original_payload. Optional, but the - // format and the bytes must be set or unset together. - // - // The allowed values for the format string are defined by the OpenTelemetry - // specification. Some examples are "jfr", "pprof", "linux_perf". - // - // The original payload may be optionally provided when the conversion to the - // OLTP format was done from a different format with some loss of the fidelity - // and the receiver may want to store the original payload to allow future - // lossless export or reinterpretation. Some examples of the original format - // are JFR (Java Flight Recorder), pprof, Linux perf. - // - // Even when the original payload is in a format that is semantically close to - // OTLP, such as pprof, a conversion may still be lossy in some cases (e.g. if - // the pprof file contains custom extensions or conventions). - // - // The original payload can be large in size, so including the original - // payload should be configurable by the profiler or collector options. The - // default behavior should be to not include the original payload. - string original_payload_format = 9; - // The original payload bytes. See also original_payload_format. Optional, but - // format and the bytes must be set or unset together. - bytes original_payload = 10; - - // References to attributes in attribute_table. [optional] - repeated int32 attribute_indices = 11; -} - -// A pointer from a profile Sample to a trace Span. -// Connects a profile sample to a trace span, identified by unique trace and span IDs. -message Link { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - bytes trace_id = 1; - - // A unique identifier for the linked span. The ID is an 8-byte array. - bytes span_id = 2; -} - -// ValueType describes the type and units of a value. -message ValueType { - // Index into ProfilesDictionary.string_table. - int32 type_strindex = 1; - - // Index into ProfilesDictionary.string_table. - int32 unit_strindex = 2; -} - -// Each Sample records values encountered in some program context. The program -// context is typically a stack trace, perhaps augmented with auxiliary -// information like the thread-id, some indicator of a higher level request -// being handled etc. -// -// A Sample MUST have have at least one values or timestamps_unix_nano entry. If -// both fields are populated, they MUST contain the same number of elements, and -// the elements at the same index MUST refer to the same event. -// -// Examples of different ways of representing a sample with the total value of 10: -// -// Report of a stacktrace at 10 timestamps (consumers must assume the value is 1 for each point): -// values: [] -// timestamps_unix_nano: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] -// -// Report of a stacktrace with an aggregated value without timestamps: -// values: [10] -// timestamps_unix_nano: [] -// -// Report of a stacktrace at 4 timestamps where each point records a specific value: -// values: [2, 2, 3, 3] -// timestamps_unix_nano: [1, 2, 3, 4] -message Sample { - // Reference to stack in ProfilesDictionary.stack_table. - int32 stack_index = 1; - // The type and unit of each value is defined by Profile.sample_type. - repeated int64 values = 2; - // References to attributes in ProfilesDictionary.attribute_table. [optional] - repeated int32 attribute_indices = 3; - - // Reference to link in ProfilesDictionary.link_table. [optional] - // It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value. - int32 link_index = 4; - - // Timestamps associated with Sample represented in nanoseconds. These - // timestamps should fall within the Profile's time range. - repeated fixed64 timestamps_unix_nano = 5; -} - -// Describes the mapping of a binary in memory, including its address range, -// file offset, and metadata like build ID -message Mapping { - // Address at which the binary (or DLL) is loaded into memory. - uint64 memory_start = 1; - // The limit of the address range occupied by this mapping. - uint64 memory_limit = 2; - // Offset in the binary that corresponds to the first mapped address. - uint64 file_offset = 3; - // The object this entry is loaded from. This can be a filename on - // disk for the main binary and shared libraries, or virtual - // abstractions like "[vdso]". - int32 filename_strindex = 4; // Index into ProfilesDictionary.string_table. - // References to attributes in ProfilesDictionary.attribute_table. [optional] - repeated int32 attribute_indices = 5; -} - -// A Stack represents a stack trace as a list of locations. -message Stack { - // References to locations in ProfilesDictionary.location_table. - // The first location is the leaf frame. - repeated int32 location_indices = 1; -} - -// Describes function and line table debug information. -message Location { - // Reference to mapping in ProfilesDictionary.mapping_table. - // It can be unset / set to 0 if the mapping is unknown or not applicable for - // this profile type, as mapping_table[0] is always a 'null' default mapping. - int32 mapping_index = 1; - // The instruction address for this location, if available. It - // should be within [Mapping.memory_start...Mapping.memory_limit] - // for the corresponding mapping. A non-leaf address may be in the - // middle of a call instruction. It is up to display tools to find - // the beginning of the instruction if necessary. - uint64 address = 2; - // Multiple line indicates this location has inlined functions, - // where the last entry represents the caller into which the - // preceding entries were inlined. - // - // E.g., if memcpy() is inlined into printf: - // lines[0].function_name == "memcpy" - // lines[1].function_name == "printf" - repeated Line lines = 3; - // References to attributes in ProfilesDictionary.attribute_table. [optional] - repeated int32 attribute_indices = 4; -} - -// Details a specific line in a source code, linked to a function. -message Line { - // Reference to function in ProfilesDictionary.function_table. - int32 function_index = 1; - // Line number in source code. 0 means unset. - int64 line = 2; - // Column number in source code. 0 means unset. - int64 column = 3; -} - -// Describes a function, including its human-readable name, system name, -// source file, and starting line number in the source. -message Function { - // The function name. Empty string if not available. - int32 name_strindex = 1; - // Function name, as identified by the system. For instance, - // it can be a C++ mangled name. Empty string if not available. - int32 system_name_strindex = 2; - // Source file containing the function. Empty string if not available. - int32 filename_strindex = 3; - // Line number in source file. 0 means unset. - int64 start_line = 4; -} - -// A custom 'dictionary native' style of encoding attributes which is more convenient -// for profiles than opentelemetry.proto.common.v1.KeyValue -// Specifically, uses the string table for keys and allows optional unit information. -message KeyValueAndUnit { - // The index into the string table for the attribute's key. - int32 key_strindex = 1; - // The value of the attribute. - opentelemetry.proto.common.v1.AnyValue value = 2; - // The index into the string table for the attribute's unit. - // zero indicates implicit (by semconv) or non-defined unit. - int32 unit_strindex = 3; -} diff --git a/src/main/proto/opentelemetry/proto/resource/v1/resource.proto b/src/main/proto/opentelemetry/proto/resource/v1/resource.proto deleted file mode 100644 index 42c5913..0000000 --- a/src/main/proto/opentelemetry/proto/resource/v1/resource.proto +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.resource.v1; - -import "opentelemetry/proto/common/v1/common.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Resource.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.resource.v1"; -option java_outer_classname = "ResourceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/resource/v1"; - -// Resource information. -message Resource { - // Set of attributes that describe the resource. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; - - // The number of dropped attributes. If the value is 0, then - // no attributes were dropped. - uint32 dropped_attributes_count = 2; - - // Set of entities that participate in this Resource. - // - // Note: keys in the references MUST exist in attributes of this message. - // - // Status: [Development] - repeated opentelemetry.proto.common.v1.EntityRef entity_refs = 3; -} diff --git a/src/main/proto/opentelemetry/proto/trace/v1/trace.proto b/src/main/proto/opentelemetry/proto/trace/v1/trace.proto deleted file mode 100644 index 8a992c1..0000000 --- a/src/main/proto/opentelemetry/proto/trace/v1/trace.proto +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.trace.v1; - -import "opentelemetry/proto/common/v1/common.proto"; -import "opentelemetry/proto/resource/v1/resource.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Trace.V1"; -option java_multiple_files = true; -option java_package = "io.opentelemetry.proto.trace.v1"; -option java_outer_classname = "TraceProto"; -option go_package = "go.opentelemetry.io/proto/otlp/trace/v1"; - -// TracesData represents the traces data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP traces data but do -// not implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -message TracesData { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - repeated ResourceSpans resource_spans = 1; -} - -// A collection of ScopeSpans from a Resource. -message ResourceSpans { - reserved 1000; - - // The resource for the spans in this message. - // If this field is not set then no resource info is known. - opentelemetry.proto.resource.v1.Resource resource = 1; - - // A list of ScopeSpans that originate from a resource. - repeated ScopeSpans scope_spans = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_spans" field which have their own schema_url field. - string schema_url = 3; -} - -// A collection of Spans produced by an InstrumentationScope. -message ScopeSpans { - // The instrumentation scope information for the spans in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - opentelemetry.proto.common.v1.InstrumentationScope scope = 1; - - // A list of Spans that originate from an instrumentation scope. - repeated Span spans = 2; - - // The Schema URL, if known. This is the identifier of the Schema that the span data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "scope" field and all spans and span - // events in the "spans" field. - string schema_url = 3; -} - -// A Span represents a single operation performed by a single component of the system. -// -// The next available field id is 17. -message Span { - // A unique identifier for a trace. All spans from the same trace share - // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - bytes trace_id = 1; - - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - bytes span_id = 2; - - // trace_state conveys information about request position in multiple distributed tracing graphs. - // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header - // See also https://github.com/w3c/distributed-tracing for more details about this field. - string trace_state = 3; - - // The `span_id` of this span's parent span. If this is a root span, then this - // field must be empty. The ID is an 8-byte array. - bytes parent_span_id = 4; - - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether a span's parent - // is remote. The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // When creating span messages, if the message is logically forwarded from another source - // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD - // be copied as-is. If creating from a source that does not have an equivalent flags field - // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST - // be set to zero. - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // - // [Optional]. - fixed32 flags = 16; - - // A description of the span's operation. - // - // For example, the name can be a qualified method name or a file name - // and a line number where the operation is called. A best practice is to use - // the same display name at the same call point in an application. - // This makes it easier to correlate spans in different traces. - // - // This field is semantically required to be set to non-empty string. - // Empty value is equivalent to an unknown span name. - // - // This field is required. - string name = 5; - - // SpanKind is the type of span. Can be used to specify additional relationships between spans - // in addition to a parent/child relationship. - enum SpanKind { - // Unspecified. Do NOT use as default. - // Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. - SPAN_KIND_UNSPECIFIED = 0; - - // Indicates that the span represents an internal operation within an application, - // as opposed to an operation happening at the boundaries. Default value. - SPAN_KIND_INTERNAL = 1; - - // Indicates that the span covers server-side handling of an RPC or other - // remote network request. - SPAN_KIND_SERVER = 2; - - // Indicates that the span describes a request to some remote service. - SPAN_KIND_CLIENT = 3; - - // Indicates that the span describes a producer sending a message to a broker. - // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship - // between producer and consumer spans. A PRODUCER span ends when the message was accepted - // by the broker while the logical processing of the message might span a much longer time. - SPAN_KIND_PRODUCER = 4; - - // Indicates that the span describes consumer receiving a message from a broker. - // Like the PRODUCER kind, there is often no direct critical path latency relationship - // between producer and consumer spans. - SPAN_KIND_CONSUMER = 5; - } - - // Distinguishes between spans generated in a particular context. For example, - // two spans with the same name may be distinguished using `CLIENT` (caller) - // and `SERVER` (callee) to identify queueing latency associated with the span. - SpanKind kind = 6; - - // The start time of the span. On the client side, this is the time - // kept by the local machine where the span execution starts. On the server side, this - // is the time when the server's application handler starts running. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - fixed64 start_time_unix_nano = 7; - - // The end time of the span. On the client side, this is the time - // kept by the local machine where the span execution ends. On the server side, this - // is the time when the server application handler stops running. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - fixed64 end_time_unix_nano = 8; - - // A collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "example.com/myattribute": true - // "example.com/score": 10.239 - // - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; - - // The number of attributes that were discarded. Attributes - // can be discarded because their keys are too long or because there are too many - // attributes. If this value is 0, then no attributes were dropped. - uint32 dropped_attributes_count = 10; - - // Event is a time-stamped annotation of the span, consisting of user-supplied - // text description and key-value pairs. - message Event { - // The time the event occurred. - fixed64 time_unix_nano = 1; - - // The name of the event. - // This field is semantically required to be set to non-empty string. - string name = 2; - - // A collection of attribute key/value pairs on the event. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; - - // The number of dropped attributes. If the value is 0, - // then no attributes were dropped. - uint32 dropped_attributes_count = 4; - } - - // A collection of Event items. - repeated Event events = 11; - - // The number of dropped events. If the value is 0, then no - // events were dropped. - uint32 dropped_events_count = 12; - - // A pointer from the current span to another span in the same trace or in a - // different trace. For example, this can be used in batching operations, - // where a single batch handler processes multiple requests from different - // traces or when the handler receives a request from a different project. - message Link { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - bytes trace_id = 1; - - // A unique identifier for the linked span. The ID is an 8-byte array. - bytes span_id = 2; - - // The trace_state associated with the link. - string trace_state = 3; - - // A collection of attribute key/value pairs on the link. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - // The behavior of software that receives duplicated keys can be unpredictable. - repeated opentelemetry.proto.common.v1.KeyValue attributes = 4; - - // The number of dropped attributes. If the value is 0, - // then no attributes were dropped. - uint32 dropped_attributes_count = 5; - - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether the link is remote. - // The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. - // - // [Optional]. - fixed32 flags = 6; - } - - // A collection of Links, which are references from this span to a span - // in the same or different trace. - repeated Link links = 13; - - // The number of dropped links after the maximum size was - // enforced. If this value is 0, then no links were dropped. - uint32 dropped_links_count = 14; - - // An optional final status for this span. Semantically when Status isn't set, it means - // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). - Status status = 15; -} - -// The Status type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. -message Status { - reserved 1; - - // A developer-facing human readable error message. - string message = 2; - - // For the semantics of status codes see - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status - enum StatusCode { - // The default status. - STATUS_CODE_UNSET = 0; - // The Span has been validated by an Application developer or Operator to - // have completed successfully. - STATUS_CODE_OK = 1; - // The Span contains an error. - STATUS_CODE_ERROR = 2; - }; - - // The status code. - StatusCode code = 3; -} - -// SpanFlags represents constants used to interpret the -// Span.flags field, which is protobuf 'fixed32' type and is to -// be used as bit-fields. Each non-zero value defined in this enum is -// a bit-mask. To extract the bit-field, for example, use an -// expression like: -// -// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) -// -// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. -// -// Note that Span flags were introduced in version 1.1 of the -// OpenTelemetry protocol. Older Span producers do not set this -// field, consequently consumers should not rely on the absence of a -// particular flag bit to indicate the presence of a particular feature. -enum SpanFlags { - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - SPAN_FLAGS_DO_NOT_USE = 0; - - // Bits 0-7 are used for trace flags. - SPAN_FLAGS_TRACE_FLAGS_MASK = 0x000000FF; - - // Bits 8 and 9 are used to indicate that the parent span or link span is remote. - // Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known. - // Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote. - SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 0x00000100; - SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 0x00000200; - - // Bits 10-31 are reserved for future use. -} diff --git a/src/main/proto/udpa/annotations/migrate.proto b/src/main/proto/udpa/annotations/migrate.proto deleted file mode 100644 index 5f5f389..0000000 --- a/src/main/proto/udpa/annotations/migrate.proto +++ /dev/null @@ -1,55 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.annotations; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/udpa/annotations"; - -// Magic number in this file derived from top 28bit of SHA256 digest of -// "udpa.annotation.migrate". - -extend google.protobuf.MessageOptions { - MigrateAnnotation message_migrate = 171962766; -} - -extend google.protobuf.FieldOptions { - FieldMigrateAnnotation field_migrate = 171962766; -} - -extend google.protobuf.EnumOptions { - MigrateAnnotation enum_migrate = 171962766; -} - -extend google.protobuf.EnumValueOptions { - MigrateAnnotation enum_value_migrate = 171962766; -} - -extend google.protobuf.FileOptions { - FileMigrateAnnotation file_migrate = 171962766; -} - -message MigrateAnnotation { - // Rename the message/enum/enum value in next version. - string rename = 1; -} - -message FieldMigrateAnnotation { - // Rename the field in next version. - string rename = 1; - - // Add the field to a named oneof in next version. If this already exists, the - // field will join its siblings under the oneof, otherwise a new oneof will be - // created with the given name. - string oneof_promotion = 2; -} - -message FileMigrateAnnotation { - // Move all types in the file to another package, this implies changing proto - // file path. - string move_to_package = 2; -} diff --git a/src/main/proto/udpa/annotations/security.proto b/src/main/proto/udpa/annotations/security.proto deleted file mode 100644 index 0ef9197..0000000 --- a/src/main/proto/udpa/annotations/security.proto +++ /dev/null @@ -1,34 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.annotations; - -import "udpa/annotations/status.proto"; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/udpa/annotations"; - -// All annotations in this file are experimental and subject to change. Their -// only consumer today is the Envoy APIs and SecuritAnnotationValidator protoc -// plugin in this repository. -option (udpa.annotations.file_status).work_in_progress = true; - -extend google.protobuf.FieldOptions { - // Magic number is the 28 most significant bits in the sha256sum of - // "udpa.annotations.security". - FieldSecurityAnnotation security = 11122993; -} - -// These annotations indicate metadata for the purpose of understanding the -// security significance of fields. -message FieldSecurityAnnotation { - // Field should be set in the presence of untrusted downstreams. - bool configure_for_untrusted_downstream = 1; - - // Field should be set in the presence of untrusted upstreams. - bool configure_for_untrusted_upstream = 2; -} diff --git a/src/main/proto/udpa/annotations/sensitive.proto b/src/main/proto/udpa/annotations/sensitive.proto deleted file mode 100644 index c7d8af6..0000000 --- a/src/main/proto/udpa/annotations/sensitive.proto +++ /dev/null @@ -1,20 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.annotations; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/udpa/annotations"; - -extend google.protobuf.FieldOptions { - // Magic number is the 28 most significant bits in the sha256sum of "udpa.annotations.sensitive". - // When set to true, `sensitive` indicates that this field contains sensitive data, such as - // personally identifiable information, passwords, or private keys, and should be redacted for - // display by tools aware of this annotation. Note that that this has no effect on standard - // Protobuf functions such as `TextFormat::PrintToString`. - bool sensitive = 76569463; -} diff --git a/src/main/proto/udpa/annotations/status.proto b/src/main/proto/udpa/annotations/status.proto deleted file mode 100644 index 5a90bde..0000000 --- a/src/main/proto/udpa/annotations/status.proto +++ /dev/null @@ -1,40 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.annotations; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/udpa/annotations"; - -// Magic number in this file derived from top 28bit of SHA256 digest of -// "udpa.annotation.status". -extend google.protobuf.FileOptions { - StatusAnnotation file_status = 222707719; -} - -enum PackageVersionStatus { - // Unknown package version status. - UNKNOWN = 0; - - // This version of the package is frozen. - FROZEN = 1; - - // This version of the package is the active development version. - ACTIVE = 2; - - // This version of the package is the candidate for the next major version. It - // is typically machine generated from the active development version. - NEXT_MAJOR_VERSION_CANDIDATE = 3; -} - -message StatusAnnotation { - // The entity is work-in-progress and subject to breaking changes. - bool work_in_progress = 1; - - // The entity belongs to a package with the given version status. - PackageVersionStatus package_version_status = 2; -} diff --git a/src/main/proto/udpa/annotations/versioning.proto b/src/main/proto/udpa/annotations/versioning.proto deleted file mode 100644 index 06df78d..0000000 --- a/src/main/proto/udpa/annotations/versioning.proto +++ /dev/null @@ -1,23 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.annotations; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/udpa/annotations"; - -extend google.protobuf.MessageOptions { - // Magic number derived from 0x78 ('x') 0x44 ('D') 0x53 ('S') - VersioningAnnotation versioning = 7881811; -} - -message VersioningAnnotation { - // Track the previous message type. E.g. this message might be - // udpa.foo.v3alpha.Foo and it was previously udpa.bar.v2.Bar. This - // information is consumed by UDPA via proto descriptors. - string previous_message_type = 1; -} diff --git a/src/main/proto/udpa/data/orca/v1/orca_load_report.proto b/src/main/proto/udpa/data/orca/v1/orca_load_report.proto deleted file mode 100644 index 5d36449..0000000 --- a/src/main/proto/udpa/data/orca/v1/orca_load_report.proto +++ /dev/null @@ -1,40 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.data.orca.v1; - -option java_outer_classname = "OrcaLoadReportProto"; -option java_multiple_files = true; -option java_package = "com.github.udpa.udpa.data.orca.v1"; -option go_package = "github.com/cncf/xds/go/udpa/data/orca/v1"; - -import "validate/validate.proto"; - -// See section `ORCA load report format` of the design document in -// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. - -message OrcaLoadReport { - // CPU utilization expressed as a fraction of available CPU resources. This - // should be derived from the latest sample or measurement. - double cpu_utilization = 1 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; - - // Memory utilization expressed as a fraction of available memory - // resources. This should be derived from the latest sample or measurement. - double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; - - // Total RPS being served by an endpoint. This should cover all services that an endpoint is - // responsible for. - uint64 rps = 3; - - // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - // storage) associated with the request. - map request_cost = 4; - - // Resource utilization values. Each value is expressed as a fraction of total resources - // available, derived from the latest sample or measurement. - map utilization = 5 - [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1]; -} diff --git a/src/main/proto/udpa/service/orca/v1/orca.proto b/src/main/proto/udpa/service/orca/v1/orca.proto deleted file mode 100644 index 1ce6761..0000000 --- a/src/main/proto/udpa/service/orca/v1/orca.proto +++ /dev/null @@ -1,40 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.service.orca.v1; - -option java_outer_classname = "OrcaProto"; -option java_multiple_files = true; -option java_package = "com.github.udpa.udpa.service.orca.v1"; -option go_package = "github.com/cncf/xds/go/udpa/service/orca/v1"; - -import "udpa/data/orca/v1/orca_load_report.proto"; - -import "google/protobuf/duration.proto"; - -// See section `Out-of-band (OOB) reporting` of the design document in -// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. - -// Out-of-band (OOB) load reporting service for the additional load reporting -// agent that does not sit in the request path. Reports are periodically sampled -// with sufficient frequency to provide temporal association with requests. -// OOB reporting compensates the limitation of in-band reporting in revealing -// costs for backends that do not provide a steady stream of telemetry such as -// long running stream operations and zero QPS services. This is a server -// streaming service, client needs to terminate current RPC and initiate -// a new call to change backend reporting frequency. -service OpenRcaService { - rpc StreamCoreMetrics(OrcaLoadReportRequest) returns (stream udpa.data.orca.v1.OrcaLoadReport); -} - -message OrcaLoadReportRequest { - // Interval for generating Open RCA core metric responses. - google.protobuf.Duration report_interval = 1; - // Request costs to collect. If this is empty, all known requests costs tracked by - // the load reporting agent will be returned. This provides an opportunity for - // the client to selectively obtain a subset of tracked costs. - repeated string request_cost_names = 2; -} diff --git a/src/main/proto/udpa/type/v1/typed_struct.proto b/src/main/proto/udpa/type/v1/typed_struct.proto deleted file mode 100644 index 10eaef1..0000000 --- a/src/main/proto/udpa/type/v1/typed_struct.proto +++ /dev/null @@ -1,46 +0,0 @@ -// THIS FILE IS DEPRECATED -// Users should instead use the corresponding proto in the xds tree. -// No new changes will be accepted here. - -syntax = "proto3"; - -package udpa.type.v1; - -option java_outer_classname = "TypedStructProto"; -option java_multiple_files = true; -option java_package = "com.github.udpa.udpa.type.v1"; -option go_package = "github.com/cncf/xds/go/udpa/type/v1"; - -import "google/protobuf/struct.proto"; - -// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that -// describes the type of the serialized message. This is very similar to google.protobuf.Any, -// instead of having protocol buffer binary, this employs google.protobuf.Struct as value. -// -// This message is intended to be embedded inside Any, so it shouldn't be directly referred -// from other UDPA messages. -// -// When packing an opaque extension config, packing the expected type into Any is preferred -// wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor -// is not available, for example if: -// - A control plane sends opaque message that is originally from external source in human readable -// format such as JSON or YAML. -// - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot -// serialize the message in protocol buffer binary format. -// - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension -// uses. This has to be indicated in the DPLB capability negotiation. -// -// When a DPLB receives a TypedStruct in Any, it should: -// - Check if the type_url of the TypedStruct matches the type the extension expects. -// - Convert value to the type described in type_url and perform validation. -// TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link -// protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions). -message TypedStruct { - // A URL that uniquely identifies the type of the serialize protocol buffer message. - // This has same semantics and format described in google.protobuf.Any: - // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto - string type_url = 1; - - // A JSON representation of the above specified type. - google.protobuf.Struct value = 2; -} diff --git a/src/main/proto/validate/validate.proto b/src/main/proto/validate/validate.proto deleted file mode 100644 index 5aa9653..0000000 --- a/src/main/proto/validate/validate.proto +++ /dev/null @@ -1,862 +0,0 @@ -syntax = "proto2"; -package validate; - -option go_package = "github.com/envoyproxy/protoc-gen-validate/validate"; -option java_package = "io.envoyproxy.pgv.validate"; - -import "google/protobuf/descriptor.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// Validation rules applied at the message level -extend google.protobuf.MessageOptions { - // Disabled nullifies any validation rules for this message, including any - // message fields associated with it that do support validation. - optional bool disabled = 1071; - // Ignore skips generation of validation methods for this message. - optional bool ignored = 1072; -} - -// Validation rules applied at the oneof level -extend google.protobuf.OneofOptions { - // Required ensures that exactly one the field options in a oneof is set; - // validation fails if no fields in the oneof are set. - optional bool required = 1071; -} - -// Validation rules applied at the field level -extend google.protobuf.FieldOptions { - // Rules specify the validations to be performed on this field. By default, - // no validation is performed against a field. - optional FieldRules rules = 1071; -} - -// FieldRules encapsulates the rules for each type of field. Depending on the -// field, the correct set should be used to ensure proper validations. -message FieldRules { - optional MessageRules message = 17; - oneof type { - // Scalar Field Types - FloatRules float = 1; - DoubleRules double = 2; - Int32Rules int32 = 3; - Int64Rules int64 = 4; - UInt32Rules uint32 = 5; - UInt64Rules uint64 = 6; - SInt32Rules sint32 = 7; - SInt64Rules sint64 = 8; - Fixed32Rules fixed32 = 9; - Fixed64Rules fixed64 = 10; - SFixed32Rules sfixed32 = 11; - SFixed64Rules sfixed64 = 12; - BoolRules bool = 13; - StringRules string = 14; - BytesRules bytes = 15; - - // Complex Field Types - EnumRules enum = 16; - RepeatedRules repeated = 18; - MapRules map = 19; - - // Well-Known Field Types - AnyRules any = 20; - DurationRules duration = 21; - TimestampRules timestamp = 22; - } -} - -// FloatRules describes the constraints applied to `float` values -message FloatRules { - // Const specifies that this field must be exactly the specified value - optional float const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional float lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional float lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional float gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional float gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated float in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated float not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// DoubleRules describes the constraints applied to `double` values -message DoubleRules { - // Const specifies that this field must be exactly the specified value - optional double const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional double lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional double lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional double gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional double gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated double in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated double not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Int32Rules describes the constraints applied to `int32` values -message Int32Rules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Int64Rules describes the constraints applied to `int64` values -message Int64Rules { - // Const specifies that this field must be exactly the specified value - optional int64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional int64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional int64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional int64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional int64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated int64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// UInt32Rules describes the constraints applied to `uint32` values -message UInt32Rules { - // Const specifies that this field must be exactly the specified value - optional uint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// UInt64Rules describes the constraints applied to `uint64` values -message UInt64Rules { - // Const specifies that this field must be exactly the specified value - optional uint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional uint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional uint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional uint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional uint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated uint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated uint64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SInt32Rules describes the constraints applied to `sint32` values -message SInt32Rules { - // Const specifies that this field must be exactly the specified value - optional sint32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SInt64Rules describes the constraints applied to `sint64` values -message SInt64Rules { - // Const specifies that this field must be exactly the specified value - optional sint64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sint64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sint64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sint64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sint64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sint64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sint64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Fixed32Rules describes the constraints applied to `fixed32` values -message Fixed32Rules { - // Const specifies that this field must be exactly the specified value - optional fixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// Fixed64Rules describes the constraints applied to `fixed64` values -message Fixed64Rules { - // Const specifies that this field must be exactly the specified value - optional fixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional fixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional fixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional fixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional fixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated fixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated fixed64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SFixed32Rules describes the constraints applied to `sfixed32` values -message SFixed32Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed32 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed32 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed32 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed32 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed32 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed32 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed32 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// SFixed64Rules describes the constraints applied to `sfixed64` values -message SFixed64Rules { - // Const specifies that this field must be exactly the specified value - optional sfixed64 const = 1; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional sfixed64 lt = 2; - - // Lte specifies that this field must be less than or equal to the - // specified value, inclusive - optional sfixed64 lte = 3; - - // Gt specifies that this field must be greater than the specified value, - // exclusive. If the value of Gt is larger than a specified Lt or Lte, the - // range is reversed. - optional sfixed64 gt = 4; - - // Gte specifies that this field must be greater than or equal to the - // specified value, inclusive. If the value of Gte is larger than a - // specified Lt or Lte, the range is reversed. - optional sfixed64 gte = 5; - - // In specifies that this field must be equal to one of the specified - // values - repeated sfixed64 in = 6; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated sfixed64 not_in = 7; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 8; -} - -// BoolRules describes the constraints applied to `bool` values -message BoolRules { - // Const specifies that this field must be exactly the specified value - optional bool const = 1; -} - -// StringRules describe the constraints applied to `string` values -message StringRules { - // Const specifies that this field must be exactly the specified value - optional string const = 1; - - // Len specifies that this field must be the specified number of - // characters (Unicode code points). Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 len = 19; - - // MinLen specifies that this field must be the specified number of - // characters (Unicode code points) at a minimum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of - // characters (Unicode code points) at a maximum. Note that the number of - // characters may differ from the number of bytes in the string. - optional uint64 max_len = 3; - - // LenBytes specifies that this field must be the specified number of bytes - optional uint64 len_bytes = 20; - - // MinBytes specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_bytes = 4; - - // MaxBytes specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_bytes = 5; - - // Pattern specifies that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 6; - - // Prefix specifies that this field must have the specified substring at - // the beginning of the string. - optional string prefix = 7; - - // Suffix specifies that this field must have the specified substring at - // the end of the string. - optional string suffix = 8; - - // Contains specifies that this field must have the specified substring - // anywhere in the string. - optional string contains = 9; - - // NotContains specifies that this field cannot have the specified substring - // anywhere in the string. - optional string not_contains = 23; - - // In specifies that this field must be equal to one of the specified - // values - repeated string in = 10; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated string not_in = 11; - - // WellKnown rules provide advanced constraints against common string - // patterns - oneof well_known { - // Email specifies that the field must be a valid email address as - // defined by RFC 5322 - bool email = 12; - - // Hostname specifies that the field must be a valid hostname as - // defined by RFC 1034. This constraint does not support - // internationalized domain names (IDNs). - bool hostname = 13; - - // Ip specifies that the field must be a valid IP (v4 or v6) address. - // Valid IPv6 addresses should not include surrounding square brackets. - bool ip = 14; - - // Ipv4 specifies that the field must be a valid IPv4 address. - bool ipv4 = 15; - - // Ipv6 specifies that the field must be a valid IPv6 address. Valid - // IPv6 addresses should not include surrounding square brackets. - bool ipv6 = 16; - - // Uri specifies that the field must be a valid, absolute URI as defined - // by RFC 3986 - bool uri = 17; - - // UriRef specifies that the field must be a valid URI as defined by RFC - // 3986 and may be relative or absolute. - bool uri_ref = 18; - - // Address specifies that the field must be either a valid hostname as - // defined by RFC 1034 (which does not support internationalized domain - // names or IDNs), or it can be a valid IP (v4 or v6). - bool address = 21; - - // Uuid specifies that the field must be a valid UUID as defined by - // RFC 4122 - bool uuid = 22; - - // WellKnownRegex specifies a common well known pattern defined as a regex. - KnownRegex well_known_regex = 24; - } - - // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable - // strict header validation. - // By default, this is true, and HTTP header validations are RFC-compliant. - // Setting to false will enable a looser validations that only disallows - // \r\n\0 characters, which can be used to bypass header matching rules. - optional bool strict = 25 [default = true]; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 26; -} - -// WellKnownRegex contain some well-known patterns. -enum KnownRegex { - UNKNOWN = 0; - - // HTTP header name as defined by RFC 7230. - HTTP_HEADER_NAME = 1; - - // HTTP header value as defined by RFC 7230. - HTTP_HEADER_VALUE = 2; -} - -// BytesRules describe the constraints applied to `bytes` values -message BytesRules { - // Const specifies that this field must be exactly the specified value - optional bytes const = 1; - - // Len specifies that this field must be the specified number of bytes - optional uint64 len = 13; - - // MinLen specifies that this field must be the specified number of bytes - // at a minimum - optional uint64 min_len = 2; - - // MaxLen specifies that this field must be the specified number of bytes - // at a maximum - optional uint64 max_len = 3; - - // Pattern specifies that this field must match against the specified - // regular expression (RE2 syntax). The included expression should elide - // any delimiters. - optional string pattern = 4; - - // Prefix specifies that this field must have the specified bytes at the - // beginning of the string. - optional bytes prefix = 5; - - // Suffix specifies that this field must have the specified bytes at the - // end of the string. - optional bytes suffix = 6; - - // Contains specifies that this field must have the specified bytes - // anywhere in the string. - optional bytes contains = 7; - - // In specifies that this field must be equal to one of the specified - // values - repeated bytes in = 8; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated bytes not_in = 9; - - // WellKnown rules provide advanced constraints against common byte - // patterns - oneof well_known { - // Ip specifies that the field must be a valid IP (v4 or v6) address in - // byte format - bool ip = 10; - - // Ipv4 specifies that the field must be a valid IPv4 address in byte - // format - bool ipv4 = 11; - - // Ipv6 specifies that the field must be a valid IPv6 address in byte - // format - bool ipv6 = 12; - } - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 14; -} - -// EnumRules describe the constraints applied to enum values -message EnumRules { - // Const specifies that this field must be exactly the specified value - optional int32 const = 1; - - // DefinedOnly specifies that this field must be only one of the defined - // values for this enum, failing on any undefined value. - optional bool defined_only = 2; - - // In specifies that this field must be equal to one of the specified - // values - repeated int32 in = 3; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated int32 not_in = 4; -} - -// MessageRules describe the constraints applied to embedded message values. -// For message-type fields, validation is performed recursively. -message MessageRules { - // Skip specifies that the validation rules of this field should not be - // evaluated - optional bool skip = 1; - - // Required specifies that this field must be set - optional bool required = 2; -} - -// RepeatedRules describe the constraints applied to `repeated` values -message RepeatedRules { - // MinItems specifies that this field must have the specified number of - // items at a minimum - optional uint64 min_items = 1; - - // MaxItems specifies that this field must have the specified number of - // items at a maximum - optional uint64 max_items = 2; - - // Unique specifies that all elements in this field must be unique. This - // constraint is only applicable to scalar and enum types (messages are not - // supported). - optional bool unique = 3; - - // Items specifies the constraints to be applied to each item in the field. - // Repeated message fields will still execute validation against each item - // unless skip is specified here. - optional FieldRules items = 4; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 5; -} - -// MapRules describe the constraints applied to `map` values -message MapRules { - // MinPairs specifies that this field must have the specified number of - // KVs at a minimum - optional uint64 min_pairs = 1; - - // MaxPairs specifies that this field must have the specified number of - // KVs at a maximum - optional uint64 max_pairs = 2; - - // NoSparse specifies values in this field cannot be unset. This only - // applies to map's with message value types. - optional bool no_sparse = 3; - - // Keys specifies the constraints to be applied to each key in the field. - optional FieldRules keys = 4; - - // Values specifies the constraints to be applied to the value of each key - // in the field. Message values will still have their validations evaluated - // unless skip is specified here. - optional FieldRules values = 5; - - // IgnoreEmpty specifies that the validation rules of this field should be - // evaluated only if the field is not empty - optional bool ignore_empty = 6; -} - -// AnyRules describe constraints applied exclusively to the -// `google.protobuf.Any` well-known type -message AnyRules { - // Required specifies that this field must be set - optional bool required = 1; - - // In specifies that this field's `type_url` must be equal to one of the - // specified values. - repeated string in = 2; - - // NotIn specifies that this field's `type_url` must not be equal to any of - // the specified values. - repeated string not_in = 3; -} - -// DurationRules describe the constraints applied exclusively to the -// `google.protobuf.Duration` well-known type -message DurationRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Duration const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Duration lt = 3; - - // Lt specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Duration lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Duration gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Duration gte = 6; - - // In specifies that this field must be equal to one of the specified - // values - repeated google.protobuf.Duration in = 7; - - // NotIn specifies that this field cannot be equal to one of the specified - // values - repeated google.protobuf.Duration not_in = 8; -} - -// TimestampRules describe the constraints applied exclusively to the -// `google.protobuf.Timestamp` well-known type -message TimestampRules { - // Required specifies that this field must be set - optional bool required = 1; - - // Const specifies that this field must be exactly the specified value - optional google.protobuf.Timestamp const = 2; - - // Lt specifies that this field must be less than the specified value, - // exclusive - optional google.protobuf.Timestamp lt = 3; - - // Lte specifies that this field must be less than the specified value, - // inclusive - optional google.protobuf.Timestamp lte = 4; - - // Gt specifies that this field must be greater than the specified value, - // exclusive - optional google.protobuf.Timestamp gt = 5; - - // Gte specifies that this field must be greater than the specified value, - // inclusive - optional google.protobuf.Timestamp gte = 6; - - // LtNow specifies that this must be less than the current time. LtNow - // can only be used with the Within rule. - optional bool lt_now = 7; - - // GtNow specifies that this must be greater than the current time. GtNow - // can only be used with the Within rule. - optional bool gt_now = 8; - - // Within specifies that this field must be within this duration of the - // current time. This constraint can be used alone or with the LtNow and - // GtNow rules. - optional google.protobuf.Duration within = 9; -} diff --git a/src/main/proto/xds/annotations/v3/migrate.proto b/src/main/proto/xds/annotations/v3/migrate.proto deleted file mode 100644 index 1385927..0000000 --- a/src/main/proto/xds/annotations/v3/migrate.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package xds.annotations.v3; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; - -// Magic number in this file derived from top 28bit of SHA256 digest of -// "xds.annotation.v3.migrate". -extend google.protobuf.MessageOptions { - MigrateAnnotation message_migrate = 112948430; -} -extend google.protobuf.FieldOptions { - FieldMigrateAnnotation field_migrate = 112948430; -} -extend google.protobuf.EnumOptions { - MigrateAnnotation enum_migrate = 112948430; -} -extend google.protobuf.EnumValueOptions { - MigrateAnnotation enum_value_migrate = 112948430; -} -extend google.protobuf.FileOptions { - FileMigrateAnnotation file_migrate = 112948430; -} - -message MigrateAnnotation { - // Rename the message/enum/enum value in next version. - string rename = 1; -} - -message FieldMigrateAnnotation { - // Rename the field in next version. - string rename = 1; - - // Add the field to a named oneof in next version. If this already exists, the - // field will join its siblings under the oneof, otherwise a new oneof will be - // created with the given name. - string oneof_promotion = 2; -} - -message FileMigrateAnnotation { - // Move all types in the file to another package, this implies changing proto - // file path. - string move_to_package = 2; -} diff --git a/src/main/proto/xds/annotations/v3/security.proto b/src/main/proto/xds/annotations/v3/security.proto deleted file mode 100644 index f1f9f40..0000000 --- a/src/main/proto/xds/annotations/v3/security.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package xds.annotations.v3; - -import "xds/annotations/v3/status.proto"; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; - -// All annotations in this file are experimental and subject to change. Their -// only consumer today is the Envoy APIs and SecuritAnnotationValidator protoc -// plugin in this repository. -option (xds.annotations.v3.file_status).work_in_progress = true; - -extend google.protobuf.FieldOptions { - // Magic number is the 28 most significant bits in the sha256sum of - // "xds.annotations.v3.security". - FieldSecurityAnnotation security = 99044135; -} - -// These annotations indicate metadata for the purpose of understanding the -// security significance of fields. -message FieldSecurityAnnotation { - // Field should be set in the presence of untrusted downstreams. - bool configure_for_untrusted_downstream = 1; - - // Field should be set in the presence of untrusted upstreams. - bool configure_for_untrusted_upstream = 2; -} diff --git a/src/main/proto/xds/annotations/v3/sensitive.proto b/src/main/proto/xds/annotations/v3/sensitive.proto deleted file mode 100644 index e2cc0b7..0000000 --- a/src/main/proto/xds/annotations/v3/sensitive.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package xds.annotations.v3; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; - -extend google.protobuf.FieldOptions { - // Magic number is the 28 most significant bits in the sha256sum of "xds.annotations.v3.sensitive". - // When set to true, `sensitive` indicates that this field contains sensitive data, such as - // personally identifiable information, passwords, or private keys, and should be redacted for - // display by tools aware of this annotation. Note that that this has no effect on standard - // Protobuf functions such as `TextFormat::PrintToString`. - bool sensitive = 61008053; -} diff --git a/src/main/proto/xds/annotations/v3/status.proto b/src/main/proto/xds/annotations/v3/status.proto deleted file mode 100644 index 367e784..0000000 --- a/src/main/proto/xds/annotations/v3/status.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package xds.annotations.v3; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; - -// Magic number in this file derived from top 28bit of SHA256 digest of -// "xds.annotations.v3.status". -extend google.protobuf.FileOptions { - FileStatusAnnotation file_status = 226829418; -} - -extend google.protobuf.MessageOptions { - MessageStatusAnnotation message_status = 226829418; -} - -extend google.protobuf.FieldOptions { - FieldStatusAnnotation field_status = 226829418; -} - -message FileStatusAnnotation { - // The entity is work-in-progress and subject to breaking changes. - bool work_in_progress = 1; -} - -message MessageStatusAnnotation { - // The entity is work-in-progress and subject to breaking changes. - bool work_in_progress = 1; -} - -message FieldStatusAnnotation { - // The entity is work-in-progress and subject to breaking changes. - bool work_in_progress = 1; -} - -enum PackageVersionStatus { - // Unknown package version status. - UNKNOWN = 0; - - // This version of the package is frozen. - FROZEN = 1; - - // This version of the package is the active development version. - ACTIVE = 2; - - // This version of the package is the candidate for the next major version. It - // is typically machine generated from the active development version. - NEXT_MAJOR_VERSION_CANDIDATE = 3; -} - -message StatusAnnotation { - // The entity is work-in-progress and subject to breaking changes. - bool work_in_progress = 1; - - // The entity belongs to a package with the given version status. - PackageVersionStatus package_version_status = 2; -} diff --git a/src/main/proto/xds/annotations/v3/versioning.proto b/src/main/proto/xds/annotations/v3/versioning.proto deleted file mode 100644 index b6440f1..0000000 --- a/src/main/proto/xds/annotations/v3/versioning.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package xds.annotations.v3; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cncf/xds/go/xds/annotations/v3"; - -extend google.protobuf.MessageOptions { - // Magic number is the 28 most significant bits in the sha256sum of - // "xds.annotations.v3.versioning". - VersioningAnnotation versioning = 92389011; -} - -message VersioningAnnotation { - // Track the previous message type. E.g. this message might be - // xds.foo.v3alpha.Foo and it was previously xds.bar.v2.Bar. This - // information is consumed by UDPA via proto descriptors. - string previous_message_type = 1; -} diff --git a/src/main/proto/xds/core/v3/authority.proto b/src/main/proto/xds/core/v3/authority.proto deleted file mode 100644 index d666c38..0000000 --- a/src/main/proto/xds/core/v3/authority.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "xds/annotations/v3/status.proto"; - -import "validate/validate.proto"; - -option java_outer_classname = "AuthorityProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// xDS authority information. -message Authority { - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // .. space reserved for additional authority addressing information, e.g. for - // resource signing, items such as CA trust chain, cert pinning may be added. -} diff --git a/src/main/proto/xds/core/v3/cidr.proto b/src/main/proto/xds/core/v3/cidr.proto deleted file mode 100644 index c40dab2..0000000 --- a/src/main/proto/xds/core/v3/cidr.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "xds/annotations/v3/status.proto"; -import "google/protobuf/wrappers.proto"; - -import "validate/validate.proto"; - -option java_outer_classname = "CidrRangeProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// CidrRange specifies an IP Address and a prefix length to construct -// the subnet mask for a `CIDR `_ range. -message CidrRange { - // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``. - string address_prefix = 1 [(validate.rules).string = {min_len: 1}]; - - // Length of prefix, e.g. 0, 32. Defaults to 0 when unset. - google.protobuf.UInt32Value prefix_len = 2 [(validate.rules).uint32 = {lte: 128}]; -} diff --git a/src/main/proto/xds/core/v3/collection_entry.proto b/src/main/proto/xds/core/v3/collection_entry.proto deleted file mode 100644 index c844d61..0000000 --- a/src/main/proto/xds/core/v3/collection_entry.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "google/protobuf/any.proto"; - -import "xds/annotations/v3/status.proto"; -import "xds/core/v3/resource_locator.proto"; - -import "validate/validate.proto"; - -option java_outer_classname = "CollectionEntryProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// xDS collection resource wrapper. This encapsulates a xDS resource when -// appearing inside a list collection resource. List collection resources are -// regular Resource messages of type: -// -// .. code-block:: proto -// -// message Collection { -// repeated CollectionEntry resources = 1; -// } -// -message CollectionEntry { - // Inlined resource entry. - message InlineEntry { - // Optional name to describe the inlined resource. Resource names must match - // ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once - // finalized, probably should be a RFC3986 pchar). This name allows - // reference via the #entry directive in ResourceLocator. - string name = 1 [(validate.rules).string.pattern = "^[0-9a-zA-Z_\\-\\.~:]+$"]; - - // The resource's logical version. It is illegal to have the same named xDS - // resource name at a given version with different resource payloads. - string version = 2; - - // The resource payload, including type URL. - google.protobuf.Any resource = 3; - } - - oneof resource_specifier { - option (validate.required) = true; - - // A resource locator describing how the member resource is to be located. - ResourceLocator locator = 1; - - // The resource is inlined in the list collection. - InlineEntry inline_entry = 2; - } -} diff --git a/src/main/proto/xds/core/v3/context_params.proto b/src/main/proto/xds/core/v3/context_params.proto deleted file mode 100644 index a42c7a8..0000000 --- a/src/main/proto/xds/core/v3/context_params.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "xds/annotations/v3/status.proto"; - -option java_outer_classname = "ContextParamsProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// Additional parameters that can be used to select resource variants. These include any -// global context parameters, per-resource type client feature capabilities and per-resource -// type functional attributes. All per-resource type attributes will be `xds.resource.` -// prefixed and some of these are documented below: -// -// `xds.resource.listening_address`: The value is "IP:port" (e.g. "10.1.1.3:8080") which is -// the listening address of a Listener. Used in a Listener resource query. -message ContextParams { - map params = 1; -} diff --git a/src/main/proto/xds/core/v3/extension.proto b/src/main/proto/xds/core/v3/extension.proto deleted file mode 100644 index dd489eb..0000000 --- a/src/main/proto/xds/core/v3/extension.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -option java_outer_classname = "ExtensionProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -import "validate/validate.proto"; -import "google/protobuf/any.proto"; - -// Message type for extension configuration. -message TypedExtensionConfig { - // The name of an extension. This is not used to select the extension, instead - // it serves the role of an opaque identifier. - string name = 1 [(validate.rules).string = {min_len: 1}]; - - // The typed config for the extension. The type URL will be used to identify - // the extension. In the case that the type URL is *xds.type.v3.TypedStruct* - // (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type - // URL of *TypedStruct* will be utilized. See the - // :ref:`extension configuration overview - // ` for further details. - google.protobuf.Any typed_config = 2 [(validate.rules).any = {required: true}]; -} diff --git a/src/main/proto/xds/core/v3/resource.proto b/src/main/proto/xds/core/v3/resource.proto deleted file mode 100644 index dc06279..0000000 --- a/src/main/proto/xds/core/v3/resource.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "google/protobuf/any.proto"; - -import "xds/annotations/v3/status.proto"; -import "xds/core/v3/resource_name.proto"; - -option java_outer_classname = "ResourceProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// xDS resource wrapper. This encapsulates a xDS resource when appearing in an -// xDS transport discovery response or when accessed as a filesystem object. -message Resource { - // Resource name. This may be omitted for filesystem resources. - ResourceName name = 1; - - // The resource's logical version. It is illegal to have the same named xDS - // resource name at a given version with different resource payloads. - string version = 2; - - // The resource payload, including type URL. - google.protobuf.Any resource = 3; -} diff --git a/src/main/proto/xds/core/v3/resource_locator.proto b/src/main/proto/xds/core/v3/resource_locator.proto deleted file mode 100644 index 9b40d52..0000000 --- a/src/main/proto/xds/core/v3/resource_locator.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/core/v3/context_params.proto"; - -import "validate/validate.proto"; - -option java_outer_classname = "ResourceLocatorProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// xDS resource locators identify a xDS resource name and instruct the -// data-plane load balancer on how the resource may be located. -// -// Resource locators have a canonical xdstp:// URI representation: -// -// xdstp://{authority}/{type_url}/{id}?{context_params}{#directive,*} -// -// where context_params take the form of URI query parameters. -// -// Resource locators have a similar canonical http:// URI representation: -// -// http://{authority}/{type_url}/{id}?{context_params}{#directive,*} -// -// Resource locators also have a simplified file:// URI representation: -// -// file:///{id}{#directive,*} -// -message ResourceLocator { - enum Scheme { - XDSTP = 0; - HTTP = 1; - FILE = 2; - } - - // URI scheme. - Scheme scheme = 1 [(validate.rules).enum = {defined_only: true}]; - - // Opaque identifier for the resource. Any '/' will not be escaped during URI - // encoding and will form part of the URI path. This may end - // with ‘*’ for glob collection references. - string id = 2; - - // Logical authority for resource (not necessarily transport network address). - // Authorities are opaque in the xDS API, data-plane load balancers will map - // them to concrete network transports such as an xDS management server, e.g. - // via envoy.config.core.v3.ConfigSource. - string authority = 3; - - // Fully qualified resource type (as in type URL without types.googleapis.com/ - // prefix). - string resource_type = 4 [(validate.rules).string = {min_len: 1}]; - - oneof context_param_specifier { - // Additional parameters that can be used to select resource variants. - // Matches must be exact, i.e. all context parameters must match exactly and - // there must be no additional context parameters set on the matched - // resource. - ContextParams exact_context = 5; - - // .. space reserved for future potential matchers, e.g. CEL expressions. - } - - // Directives provide information to data-plane load balancers on how xDS - // resource names are to be interpreted and potentially further resolved. For - // example, they may provide alternative resource locators for when primary - // resolution fails. Directives are not part of resource names and do not - // appear in a xDS transport discovery request. - // - // When encoding to URIs, directives take the form: - // - // = - // - // For example, we can have alt=xdstp://foo/bar or entry=some%20thing. Each - // directive value type may have its own string encoding, in the case of - // ResourceLocator there is a recursive URI encoding. - // - // Percent encoding applies to the URI encoding of the directive value. - // Multiple directives are comma-separated, so the reserved characters that - // require percent encoding in a directive value are [',', '#', '[', ']', - // '%']. These are the RFC3986 fragment reserved characters with the addition - // of the xDS scheme specific ','. See - // https://tools.ietf.org/html/rfc3986#page-49 for further details on URI ABNF - // and reserved characters. - message Directive { - oneof directive { - option (validate.required) = true; - - // An alternative resource locator for fallback if the resource is - // unavailable. For example, take the resource locator: - // - // xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table - // - // If the data-plane load balancer is unable to reach `foo` to fetch the - // resource, it will fallback to `bar`. Alternative resources do not need - // to have equivalent content, but they should be functional substitutes. - ResourceLocator alt = 1; - - // List collections support inlining of resources via the entry field in - // Resource. These inlined Resource objects may have an optional name - // field specified. When specified, the entry directive allows - // ResourceLocator to directly reference these inlined resources, e.g. - // xdstp://.../foo#entry=bar. - string entry = 2 [(validate.rules).string = {min_len: 1, pattern: "^[0-9a-zA-Z_\\-\\./~:]+$"}]; - } - } - - // A list of directives that appear in the xDS resource locator #fragment. - // - // When encoding to URI form, directives are percent encoded with comma - // separation. - repeated Directive directives = 6; -} diff --git a/src/main/proto/xds/core/v3/resource_name.proto b/src/main/proto/xds/core/v3/resource_name.proto deleted file mode 100644 index 0f3d997..0000000 --- a/src/main/proto/xds/core/v3/resource_name.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package xds.core.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/core/v3/context_params.proto"; - -import "validate/validate.proto"; - -option java_outer_classname = "ResourceNameProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.core.v3"; -option go_package = "github.com/cncf/xds/go/xds/core/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// xDS resource name. This has a canonical xdstp:// URI representation: -// -// xdstp://{authority}/{type_url}/{id}?{context_params} -// -// where context_params take the form of URI query parameters. -// -// A xDS resource name fully identifies a network resource for transport -// purposes. xDS resource names in this form appear only in discovery -// request/response messages used with the xDS transport. -message ResourceName { - // Opaque identifier for the resource. Any '/' will not be escaped during URI - // encoding and will form part of the URI path. - string id = 1; - - // Logical authority for resource (not necessarily transport network address). - // Authorities are opaque in the xDS API, data-plane load balancers will map - // them to concrete network transports such as an xDS management server. - string authority = 2; - - // Fully qualified resource type (as in type URL without types.googleapis.com/ - // prefix). - string resource_type = 3 [(validate.rules).string = {min_len: 1}]; - - // Additional parameters that can be used to select resource variants. - ContextParams context = 4; -} diff --git a/src/main/proto/xds/data/orca/v3/orca_load_report.proto b/src/main/proto/xds/data/orca/v3/orca_load_report.proto deleted file mode 100644 index 1b08475..0000000 --- a/src/main/proto/xds/data/orca/v3/orca_load_report.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package xds.data.orca.v3; - -option java_outer_classname = "OrcaLoadReportProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.data.orca.v3"; -option go_package = "github.com/cncf/xds/go/xds/data/orca/v3"; - -import "validate/validate.proto"; - -// See section `ORCA load report format` of the design document in -// https://github.com/envoyproxy/envoy/issues/6614. - -message OrcaLoadReport { - // CPU utilization expressed as a fraction of available CPU resources. This - // should be derived from the latest sample or measurement. The value may be - // larger than 1.0 when the usage exceeds the reporter dependent notion of - // soft limits. - double cpu_utilization = 1 [(validate.rules).double.gte = 0]; - - // Memory utilization expressed as a fraction of available memory - // resources. This should be derived from the latest sample or measurement. - double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1]; - - // Total RPS being served by an endpoint. This should cover all services that an endpoint is - // responsible for. - // Deprecated -- use ``rps_fractional`` field instead. - uint64 rps = 3 [deprecated = true]; - - // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of - // storage) associated with the request. - map request_cost = 4; - - // Resource utilization values. Each value is expressed as a fraction of total resources - // available, derived from the latest sample or measurement. - map utilization = 5 - [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1]; - - // Total RPS being served by an endpoint. This should cover all services that an endpoint is - // responsible for. - double rps_fractional = 6 [(validate.rules).double.gte = 0]; - - // Total EPS (errors/second) being served by an endpoint. This should cover - // all services that an endpoint is responsible for. - double eps = 7 [(validate.rules).double.gte = 0]; - - // Application specific opaque metrics. - map named_metrics = 8; - - // Application specific utilization expressed as a fraction of available - // resources. For example, an application may report the max of CPU and memory - // utilization for better load balancing if it is both CPU and memory bound. - // This should be derived from the latest sample or measurement. - // The value may be larger than 1.0 when the usage exceeds the reporter - // dependent notion of soft limits. - double application_utilization = 9 [(validate.rules).double.gte = 0]; -} diff --git a/src/main/proto/xds/service/orca/v3/orca.proto b/src/main/proto/xds/service/orca/v3/orca.proto deleted file mode 100644 index 03126cd..0000000 --- a/src/main/proto/xds/service/orca/v3/orca.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package xds.service.orca.v3; - -option java_outer_classname = "OrcaProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.service.orca.v3"; -option go_package = "github.com/cncf/xds/go/xds/service/orca/v3"; - -import "xds/data/orca/v3/orca_load_report.proto"; - -import "google/protobuf/duration.proto"; - -// See section `Out-of-band (OOB) reporting` of the design document in -// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. - -// Out-of-band (OOB) load reporting service for the additional load reporting -// agent that does not sit in the request path. Reports are periodically sampled -// with sufficient frequency to provide temporal association with requests. -// OOB reporting compensates the limitation of in-band reporting in revealing -// costs for backends that do not provide a steady stream of telemetry such as -// long running stream operations and zero QPS services. This is a server -// streaming service, client needs to terminate current RPC and initiate -// a new call to change backend reporting frequency. -service OpenRcaService { - rpc StreamCoreMetrics(OrcaLoadReportRequest) returns (stream xds.data.orca.v3.OrcaLoadReport); -} - -message OrcaLoadReportRequest { - // Interval for generating Open RCA core metric responses. - google.protobuf.Duration report_interval = 1; - // Request costs to collect. If this is empty, all known requests costs tracked by - // the load reporting agent will be returned. This provides an opportunity for - // the client to selectively obtain a subset of tracked costs. - repeated string request_cost_names = 2; -} diff --git a/src/main/proto/xds/type/matcher/v3/cel.proto b/src/main/proto/xds/type/matcher/v3/cel.proto deleted file mode 100644 index a45af95..0000000 --- a/src/main/proto/xds/type/matcher/v3/cel.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "xds/type/v3/cel.proto"; -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -// [#protodoc-title: Common Expression Language (CEL) matchers] - -// Performs a match by evaluating a `Common Expression Language -// `_ (CEL) expression against the standardized set of -// :ref:`HTTP attributes ` specified via ``HttpAttributesCelMatchInput``. -// -// .. attention:: -// -// The match is ``true``, iff the result of the evaluation is a bool AND true. -// In all other cases, the match is ``false``, including but not limited to: non-bool types, -// ``false``, ``null``, ``int(1)``, etc. -// In case CEL expression raises an error, the result of the evaluation is interpreted "no match". -// -// Refer to :ref:`Unified Matcher API ` documentation -// for usage details. -// -// [#comment: envoy.matching.matchers.cel_matcher] -message CelMatcher { - // Either parsed or checked representation of the CEL program. - type.v3.CelExpression expr_match = 1 [(validate.rules).message = {required: true}]; - - // Free-form description of the CEL AST, e.g. the original expression text, to be - // used for debugging assistance. - string description = 2; -} diff --git a/src/main/proto/xds/type/matcher/v3/domain.proto b/src/main/proto/xds/type/matcher/v3/domain.proto deleted file mode 100644 index 06f11d7..0000000 --- a/src/main/proto/xds/type/matcher/v3/domain.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "ServerNameMatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Server name matcher] - -// Matches a fully qualified server name against a set of domain -// names with optional wildcards. -message ServerNameMatcher { - // Specifies a set of exact and wildcard domains and a match action. The - // wildcard symbol ``*`` must appear at most once as the left-most part of - // the domain on a dot border. The wildcard matches one or more non-empty - // domain parts. - message DomainMatcher { - // A non-empty set of domain names with optional wildcards, e.g. - // ``www.example.com``, ``*.com``, or ``*``. - repeated string domains = 1 [ (validate.rules).repeated = {min_items : 1} ]; - - // Match action to apply when the server name matches any of the domain - // names in the matcher. - Matcher.OnMatch on_match = 2; - } - - // Match a server name by multiple domain matchers. Each domain, exact or - // wildcard, must appear at most once across all the domain matchers. - // - // The server name will be matched against all wildcard domains starting from - // the longest suffix, i.e. ``www.example.com`` input will be first matched - // against ``www.example.com``, then ``*.example.com``, then ``*.com``, then - // ``*``, until the associated matcher action accepts the input. Note that - // wildcards must be on a dot border, and values like ``*w.example.com`` are - // invalid. - repeated DomainMatcher domain_matchers = 1; -} diff --git a/src/main/proto/xds/type/matcher/v3/http_inputs.proto b/src/main/proto/xds/type/matcher/v3/http_inputs.proto deleted file mode 100644 index 5709d64..0000000 --- a/src/main/proto/xds/type/matcher/v3/http_inputs.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "HttpInputsProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -// [#protodoc-title: Common HTTP Inputs] - -// Specifies that matching should be performed on the set of :ref:`HTTP attributes -// `. -// -// The attributes will be exposed via `Common Expression Language -// `_ runtime to associated CEL matcher. -// -// Refer to :ref:`Unified Matcher API ` documentation -// for usage details. -// -// [#comment: envoy.matching.inputs.cel_data_input] -message HttpAttributesCelMatchInput { -} diff --git a/src/main/proto/xds/type/matcher/v3/ip.proto b/src/main/proto/xds/type/matcher/v3/ip.proto deleted file mode 100644 index ad3ab06..0000000 --- a/src/main/proto/xds/type/matcher/v3/ip.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "xds/annotations/v3/status.proto"; -import "xds/core/v3/cidr.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "IPMatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: IP matcher] - -// Matches a specific IP address against a set of possibly overlapping subnets using a trie. -message IPMatcher { - // Specifies a list of IP address ranges and a match action. - message IPRangeMatcher { - // A non-empty set of CIDR ranges. - repeated core.v3.CidrRange ranges = 1 [(validate.rules).repeated = {min_items: 1}]; - - // Match action to apply when the IP address is within one of the CIDR ranges. - Matcher.OnMatch on_match = 2; - - // Indicates whether this match option should be considered if there is a - // more specific matcher. Exclusive matchers are not selected whenever a - // more specific matcher exists (e.g. matcher with a longer prefix) even - // when the more specific matcher fails its nested match condition. - // Non-exclusive matchers are considered if the more specific matcher - // exists but its nested match condition does not entirely match. - // Non-exclusive matchers are selected in the order of their specificity - // first (longest prefix first), then the order of declaration next. - // - // For example, consider two range matchers: an exclusive matcher *X* on - // ``0.0.0.0/0`` and a matcher *Y* on ``192.0.0.0/2`` with a nested match - // condition *Z*. For the input IP ``192.168.0.1`` matcher *Y* is the most - // specific. If its nested match condition *Z* does not accept the input, - // then the less specific matcher *X* does not apply either despite the - // input being within the range, because matcher *X* is exclusive. - // - // The opposite is true if matcher *X* is not marked as exclusive. In that - // case matcher *X* always matches whenever matcher "*Y* rejects the input. - bool exclusive = 3; - } - - // Match IP address by CIDR ranges. - repeated IPRangeMatcher range_matchers = 1; -} diff --git a/src/main/proto/xds/type/matcher/v3/matcher.proto b/src/main/proto/xds/type/matcher/v3/matcher.proto deleted file mode 100644 index cc03ff6..0000000 --- a/src/main/proto/xds/type/matcher/v3/matcher.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "xds/core/v3/extension.proto"; -import "xds/type/matcher/v3/string.proto"; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "MatcherProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -// [#protodoc-title: Unified Matcher API] - -// A matcher, which may traverse a matching tree in order to result in a match action. -// During matching, the tree will be traversed until a match is found, or if no match -// is found the action specified by the most specific on_no_match will be evaluated. -// As an on_no_match might result in another matching tree being evaluated, this process -// might repeat several times until the final OnMatch (or no match) is decided. -message Matcher { - // What to do if a match is successful. - message OnMatch { - oneof on_match { - option (validate.required) = true; - - // Nested matcher to evaluate. - // If the nested matcher does not match and does not specify - // on_no_match, then this matcher is considered not to have - // matched, even if a predicate at this level or above returned - // true. - Matcher matcher = 1; - - // Protocol-specific action to take. - core.v3.TypedExtensionConfig action = 2; - } - - // If true and the Matcher matches, the action will be taken but the caller - // will behave as if the Matcher did not match. A subsequent matcher or - // on_no_match action will be used instead. - // This field is not supported in all contexts in which the matcher API is - // used. If this field is set in a context in which it's not supported, - // the resource will be rejected. - bool keep_matching = 3; - } - - // A linear list of field matchers. - // The field matchers are evaluated in order, and the first match - // wins. - message MatcherList { - // Predicate to determine if a match is successful. - message Predicate { - // Predicate for a single input field. - message SinglePredicate { - // Protocol-specific specification of input field to match on. - // [#extension-category: envoy.matching.common_inputs] - core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; - - oneof matcher { - option (validate.required) = true; - - // Built-in string matcher. - type.matcher.v3.StringMatcher value_match = 2; - - // Extension for custom matching logic. - // [#extension-category: envoy.matching.input_matchers] - core.v3.TypedExtensionConfig custom_match = 3; - } - } - - // A list of two or more matchers. Used to allow using a list within a oneof. - message PredicateList { - repeated Predicate predicate = 1 [(validate.rules).repeated = {min_items: 2}]; - } - - oneof match_type { - option (validate.required) = true; - - // A single predicate to evaluate. - SinglePredicate single_predicate = 1; - - // A list of predicates to be OR-ed together. - PredicateList or_matcher = 2; - - // A list of predicates to be AND-ed together. - PredicateList and_matcher = 3; - - // The invert of a predicate - Predicate not_matcher = 4; - } - } - - // An individual matcher. - message FieldMatcher { - // Determines if the match succeeds. - Predicate predicate = 1 [(validate.rules).message = {required: true}]; - - // What to do if the match succeeds. - OnMatch on_match = 2 [(validate.rules).message = {required: true}]; - } - - // A list of matchers. First match wins. - repeated FieldMatcher matchers = 1 [(validate.rules).repeated = {min_items: 1}]; - } - - message MatcherTree { - // A map of configured matchers. Used to allow using a map within a oneof. - message MatchMap { - map map = 1 [(validate.rules).map = {min_pairs: 1}]; - } - - // Protocol-specific specification of input field to match on. - core.v3.TypedExtensionConfig input = 1 [(validate.rules).message = {required: true}]; - - // Exact or prefix match maps in which to look up the input value. - // If the lookup succeeds, the match is considered successful, and - // the corresponding OnMatch is used. - oneof tree_type { - option (validate.required) = true; - - MatchMap exact_match_map = 2; - - // Longest matching prefix wins. - MatchMap prefix_match_map = 3; - - // Extension for custom matching logic. - core.v3.TypedExtensionConfig custom_match = 4; - } - } - - oneof matcher_type { - // A linear list of matchers to evaluate. - MatcherList matcher_list = 1; - - // A match tree to evaluate. - MatcherTree matcher_tree = 2; - } - - // Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified - // above, or if none of the matches specified above succeeded). - // If no matcher above matched and this field is not populated, the match will be considered unsuccessful. - OnMatch on_no_match = 3; -} diff --git a/src/main/proto/xds/type/matcher/v3/range.proto b/src/main/proto/xds/type/matcher/v3/range.proto deleted file mode 100644 index 5834009..0000000 --- a/src/main/proto/xds/type/matcher/v3/range.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "xds/type/v3/range.proto"; -import "xds/type/matcher/v3/matcher.proto"; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "RangeProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -// [#protodoc-title: Range matcher] - -// Specifies a set of ranges for matching an int64 number and the associated -// match actions. -message Int64RangeMatcher { - // Specifies a list of number ranges and a match action. - message RangeMatcher { - // A non-empty set of int64 ranges. - repeated xds.type.v3.Int64Range ranges = 1 - [(validate.rules).repeated = { min_items: 1 }]; - - // Match action to apply when the input number is within one of the ranges. - Matcher.OnMatch on_match = 2; - } - - // Match a number by a list of number ranges. If multiple ranges contain the - // input number, then the first action in this list is taken. - repeated RangeMatcher range_matchers = 1; -} - -// Specifies a set of ranges for matching an int32 number and the associated -// match actions. -message Int32RangeMatcher { - // Specifies a list of number ranges and a match action. - message RangeMatcher { - // A non-empty set of int32 ranges. - repeated xds.type.v3.Int32Range ranges = 1 - [(validate.rules).repeated = { min_items: 1 }]; - - // Match action to apply when the input number is within one of the ranges. - Matcher.OnMatch on_match = 2; - } - - // Match a number by a list of number ranges. If multiple ranges contain the - // input number, then the first action in this list is taken. - repeated RangeMatcher range_matchers = 1; -} - -// Specifies a set of ranges for matching a double number and the associated -// match actions. -message DoubleRangeMatcher { - // Specifies a list of number ranges and a match action. - message RangeMatcher { - // A non-empty set of double ranges. - repeated xds.type.v3.DoubleRange ranges = 1 - [(validate.rules).repeated = { min_items: 1 }]; - - // Match action to apply when the input number is within one of the ranges. - Matcher.OnMatch on_match = 2; - } - - // Match a number by a list of number ranges. If multiple ranges contain the - // input number, then the first action in this list is taken. - repeated RangeMatcher range_matchers = 1; -} diff --git a/src/main/proto/xds/type/matcher/v3/regex.proto b/src/main/proto/xds/type/matcher/v3/regex.proto deleted file mode 100644 index 3ff4ca9..0000000 --- a/src/main/proto/xds/type/matcher/v3/regex.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "RegexProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -// [#protodoc-title: Regex matcher] - -// A regex matcher designed for safety when used with untrusted input. -message RegexMatcher { - // Google's `RE2 `_ regex engine. The regex - // string must adhere to the documented `syntax - // `_. The engine is designed to - // complete execution in linear time as well as limit the amount of memory - // used. - // - // Envoy supports program size checking via runtime. The runtime keys - // `re2.max_program_size.error_level` and `re2.max_program_size.warn_level` - // can be set to integers as the maximum program size or complexity that a - // compiled regex can have before an exception is thrown or a warning is - // logged, respectively. `re2.max_program_size.error_level` defaults to 100, - // and `re2.max_program_size.warn_level` has no default if unset (will not - // check/log a warning). - // - // Envoy emits two stats for tracking the program size of regexes: the - // histogram `re2.program_size`, which records the program size, and the - // counter `re2.exceeded_warn_level`, which is incremented each time the - // program size exceeds the warn level threshold. - message GoogleRE2 {} - - oneof engine_type { - option (validate.required) = true; - - // Google's RE2 regex engine. - GoogleRE2 google_re2 = 1 [ (validate.rules).message = {required : true} ]; - } - - // The regex match string. The string must be supported by the configured - // engine. - string regex = 2 [ (validate.rules).string = {min_len : 1} ]; -} diff --git a/src/main/proto/xds/type/matcher/v3/string.proto b/src/main/proto/xds/type/matcher/v3/string.proto deleted file mode 100644 index e58cb41..0000000 --- a/src/main/proto/xds/type/matcher/v3/string.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; - -package xds.type.matcher.v3; - -import "xds/core/v3/extension.proto"; -import "xds/type/matcher/v3/regex.proto"; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.matcher.v3"; -option java_outer_classname = "StringProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/matcher/v3"; - -// [#protodoc-title: String matcher] - -// Specifies the way to match a string. -// [#next-free-field: 9] -message StringMatcher { - oneof match_pattern { - option (validate.required) = true; - - // The input string must match exactly the string specified here. - // - // Examples: - // - // * *abc* only matches the value *abc*. - string exact = 1; - - // The input string must have the prefix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *abc.xyz* - string prefix = 2 [(validate.rules).string = {min_len: 1}]; - - // The input string must have the suffix specified here. - // Note: empty prefix is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc* - string suffix = 3 [(validate.rules).string = {min_len: 1}]; - - // The input string must match the regular expression specified here. - RegexMatcher safe_regex = 5 [(validate.rules).message = {required: true}]; - - // The input string must have the substring specified here. - // Note: empty contains match is not allowed, please use regex instead. - // - // Examples: - // - // * *abc* matches the value *xyz.abc.def* - string contains = 7 [(validate.rules).string = {min_len: 1}]; - - // Use an extension as the matcher type. - // [#extension-category: envoy.string_matcher] - xds.core.v3.TypedExtensionConfig custom = 8; - } - - // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no - // effect for the safe_regex match. - // For example, the matcher *data* will match both input string *Data* and *data* if set to true. - bool ignore_case = 6; -} - -// Specifies a list of ways to match a string. -message ListStringMatcher { - repeated StringMatcher patterns = 1 [(validate.rules).repeated = {min_items: 1}]; -} diff --git a/src/main/proto/xds/type/v3/cel.proto b/src/main/proto/xds/type/v3/cel.proto deleted file mode 100644 index 0439904..0000000 --- a/src/main/proto/xds/type/v3/cel.proto +++ /dev/null @@ -1,77 +0,0 @@ -syntax = "proto3"; - -package xds.type.v3; - -import "google/api/expr/v1alpha1/checked.proto"; -import "google/api/expr/v1alpha1/syntax.proto"; -import "cel/expr/checked.proto"; -import "cel/expr/syntax.proto"; -import "google/protobuf/wrappers.proto"; - -import "xds/annotations/v3/status.proto"; - -import "validate/validate.proto"; - -option java_package = "com.github.xds.type.v3"; -option java_outer_classname = "CelProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/v3"; - -option (xds.annotations.v3.file_status).work_in_progress = true; - -// [#protodoc-title: Common Expression Language (CEL)] - -// Either parsed or checked representation of the `Common Expression Language -// `_ (CEL) program. -message CelExpression { - oneof expr_specifier { - // Parsed expression in abstract syntax tree (AST) form. - // - // Deprecated -- use ``cel_expr_parsed`` field instead. - // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. - google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1 [deprecated = true]; - - // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. - // - // Deprecated -- use ``cel_expr_checked`` field instead. - // If ``cel_expr_parsed`` or ``cel_expr_checked`` is set, this field is not used. - google.api.expr.v1alpha1.CheckedExpr checked_expr = 2 [deprecated = true]; - } - - // Parsed expression in abstract syntax tree (AST) form. - // - // If ``cel_expr_checked`` is set, this field is not used. - cel.expr.ParsedExpr cel_expr_parsed = 3; - - // Parsed expression in abstract syntax tree (AST) form that has been successfully type checked. - // - // If set, takes precedence over ``cel_expr_parsed``. - cel.expr.CheckedExpr cel_expr_checked = 4; - - // Unparsed expression in string form. For example, ``request.headers['x-env'] == 'prod'`` will - // get ``x-env`` header value and compare it with ``prod``. - // Check the `Common Expression Language `_ for more details. - // - // If set, takes precedence over ``cel_expr_parsed`` and ``cel_expr_checked``. - string cel_expr_string = 5; -} - -// Extracts a string by evaluating a `Common Expression Language -// `_ (CEL) expression against the standardized set of -// :ref:`HTTP attributes `. -// -// .. attention:: -// -// Besides CEL evaluation raising an error explicitly, CEL program returning a type other than -// the ``string``, or not returning anything, are considered an error as well. -// -// [#comment:TODO(sergiitk): When implemented, add the extension tag.] -message CelExtractString { - // The CEL expression used to extract a string from the CEL environment. - // the "subject string") that should be replaced. - CelExpression expr_extract = 1 [(validate.rules).message = {required: true}]; - - // If CEL expression evaluates to an error, this value is be returned to the caller. - // If not set, the error is propagated to the caller. - google.protobuf.StringValue default_value = 2; -} diff --git a/src/main/proto/xds/type/v3/range.proto b/src/main/proto/xds/type/v3/range.proto deleted file mode 100644 index 8fc97ab..0000000 --- a/src/main/proto/xds/type/v3/range.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package xds.type.v3; - -option java_package = "com.github.xds.type.v3"; -option java_outer_classname = "RangeProto"; -option java_multiple_files = true; -option go_package = "github.com/cncf/xds/go/xds/type/v3"; - -// [#protodoc-title: Number range] - -// Specifies the int64 start and end of the range using half-open interval -// semantics [start, end). -message Int64Range { - // start of the range (inclusive) - int64 start = 1; - - // end of the range (exclusive) - int64 end = 2; -} - -// Specifies the int32 start and end of the range using half-open interval -// semantics [start, end). -message Int32Range { - // start of the range (inclusive) - int32 start = 1; - - // end of the range (exclusive) - int32 end = 2; -} - -// Specifies the double start and end of the range using half-open interval -// semantics [start, end). -message DoubleRange { - // start of the range (inclusive) - double start = 1; - - // end of the range (exclusive) - double end = 2; -} diff --git a/src/main/proto/xds/type/v3/typed_struct.proto b/src/main/proto/xds/type/v3/typed_struct.proto deleted file mode 100644 index 40d0a8d..0000000 --- a/src/main/proto/xds/type/v3/typed_struct.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package xds.type.v3; - -option java_outer_classname = "TypedStructProto"; -option java_multiple_files = true; -option java_package = "com.github.xds.type.v3"; -option go_package = "github.com/cncf/xds/go/xds/type/v3"; - -import "google/protobuf/struct.proto"; - -// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that -// describes the type of the serialized message. This is very similar to google.protobuf.Any, -// instead of having protocol buffer binary, this employs google.protobuf.Struct as value. -// -// This message is intended to be embedded inside Any, so it shouldn't be directly referred -// from other UDPA messages. -// -// When packing an opaque extension config, packing the expected type into Any is preferred -// wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor -// is not available, for example if: -// -// - A control plane sends opaque message that is originally from external source in human readable -// format such as JSON or YAML. -// - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot -// serialize the message in protocol buffer binary format. -// - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension -// uses. This has to be indicated in the DPLB capability negotiation. -// -// When a DPLB receives a TypedStruct in Any, it should: -// - Check if the type_url of the TypedStruct matches the type the extension expects. -// - Convert value to the type described in type_url and perform validation. -// -// TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link -// protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions). -message TypedStruct { - // A URL that uniquely identifies the type of the serialize protocol buffer message. - // This has same semantics and format described in google.protobuf.Any: - // https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto - string type_url = 1; - - // A JSON representation of the above specified type. - google.protobuf.Struct value = 2; -} diff --git a/tools/API_SHAS b/tools/API_SHAS deleted file mode 100644 index 4aeea77..0000000 --- a/tools/API_SHAS +++ /dev/null @@ -1,11 +0,0 @@ -# envoy (source: SHA from https://github.com/envoyproxy/envoy) -ENVOY_SHA="f97695a50e11f5ff6719e129a466bf9204b64a7f" - -# dependencies (source: https://github.com/envoyproxy/envoy/blob/f97695a50e11f5ff6719e129a466bf9204b64a7f/api/bazel/repository_locations.bzl) -GOOGLEAPIS_VERSION="fd52b5754b2b268bc3a22a10f29844f206abb327" -PGV_VERSION="1.3.0" -PROMETHEUS_VERSION="0.6.2" -OPENTELEMETRY_VERSION="1.9.0" -XDS_VERSION="8bfbf64dc13ee1a570be4fbdcfccbdd8532463f0" -CEL_VERSION="0.25.1" -OPENCENSUS_VERSION="" \ No newline at end of file diff --git a/tools/update-api.sh b/tools/update-api.sh deleted file mode 100755 index 3c14706..0000000 --- a/tools/update-api.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o pipefail -set -o xtrace - -__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -source "${__dir}/API_SHAS" - -protodir="${__dir}/../src/main/proto" -tmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'tmpdir') - -# Check if the temp dir was created. -if [[ ! "${tmpdir}" || ! -d "${tmpdir}" ]]; then - echo "Could not create temp dir" - exit 1 -fi - -# Clean up the temp directory that we created. -function cleanup { - rm -rf "${tmpdir}" -} - -# Register the cleanup function to be called on the EXIT signal. -trap cleanup EXIT - -pushd "${tmpdir}" >/dev/null - -rm -rf "${protodir}" - -curl -sL https://github.com/envoyproxy/envoy/archive/${ENVOY_SHA}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/envoy" -cp -r envoy-*/api/envoy/* "${protodir}/envoy" -mkdir -p "${protodir}/contrib" -cp -r envoy-*/api/contrib/* "${protodir}/contrib" - -curl -sL https://github.com/googleapis/googleapis/archive/${GOOGLEAPIS_VERSION}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/google/api" -mkdir -p "${protodir}/google/api/expr/v1alpha1" -mkdir -p "${protodir}/google/rpc" -cp googleapis-*/google/api/annotations.proto googleapis-*/google/api/http.proto "${protodir}/google/api" -cp googleapis-*/google/api/expr/v1alpha1/syntax.proto "${protodir}/google/api/expr/v1alpha1" -cp googleapis-*/google/api/expr/v1alpha1/checked.proto "${protodir}/google/api/expr/v1alpha1" -cp googleapis-*/google/rpc/status.proto "${protodir}/google/rpc" - -# Note: uses v... from 1.19 -curl -sL https://github.com/envoyproxy/protoc-gen-validate/archive/v${PGV_VERSION}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/validate" -cp -r protoc-gen-validate-*/validate/* "${protodir}/validate" - -curl -sL https://github.com/prometheus/client_model/archive/v${PROMETHEUS_VERSION}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/io/prometheus/client/" -cp client_model-*/io/prometheus/client/metrics.proto "${protodir}/io/prometheus/client/" - -curl -sL https://github.com/cncf/xds/archive/${XDS_VERSION}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/udpa" -mkdir -p "${protodir}/xds" -cp -r xds-*/udpa/* "${protodir}/udpa" -cp -r xds-*/xds/* "${protodir}/xds" - -curl -sL https://github.com/open-telemetry/opentelemetry-proto/archive/v${OPENTELEMETRY_VERSION}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/opentelemetry/proto" -cp -r opentelemetry-proto-*/opentelemetry/proto/* "${protodir}/opentelemetry/proto" - -curl -sL https://github.com/google/cel-spec/archive/v${CEL_VERSION}.tar.gz | tar xz --include '*.proto' -mkdir -p "${protodir}/cel/" -cp -r cel-spec-*/proto/cel/* "${protodir}/cel/" - -popd >/dev/null diff --git a/tools/update-sha.sh b/tools/update-sha.sh deleted file mode 100755 index 5cde754..0000000 --- a/tools/update-sha.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o pipefail -set -o nounset -set -o xtrace - -function find_sha() { - local CONTENT=$1 - local DEPENDENCY=$2 - echo "$CONTENT" | grep "$DEPENDENCY" -A 11 | grep -m 1 version | awk '{ print $3 }' | tr -d '"' | tr -d "," -} - -function find_date() { - local CONTENT=$1 - local DEPENDENCY=$2 - echo "$CONTENT" | grep "$DEPENDENCY" -A 11 | grep -m 1 release_date | awk '{ print $3 }' | tr -d '"' | tr -d "," -} - -function find_envoy_sha_from_tag() { - local TAG=$1 - curl -s https://api.github.com/repos/envoyproxy/envoy/tags | grep "$TAG" -A 4 | grep sha | awk '{print $2}' | tr -d '"' | tr -d "," -} - -ENVOY_VERSION=$(find_envoy_sha_from_tag "$1") - -CURL_OUTPUT=$(curl -s "https://raw.githubusercontent.com/envoyproxy/envoy/$ENVOY_VERSION/api/bazel/repository_locations.bzl") - -GOOGLEAPIS_VERSION=$(find_sha "$CURL_OUTPUT" com_google_googleapis) -GOOGLEAPIS_DATE=$(find_date "$CURL_OUTPUT" com_google_googleapis) - -PGV_GIT_SHA=$(find_sha "$CURL_OUTPUT" com_envoyproxy_protoc_gen_validate) -PGV_GIT_DATE=$(find_date "$CURL_OUTPUT" com_envoyproxy_protoc_gen_validate) - -PROMETHEUS_VERSION=$(find_sha "$CURL_OUTPUT" prometheus_metrics_model) -PROMETHEUS_DATE=$(find_date "$CURL_OUTPUT" prometheus_metrics_model) - -OPENCENSUS_SHA=$(find_sha "$CURL_OUTPUT" opencensus_proto) -OPENCENSUS_DATE=$(find_date "$CURL_OUTPUT" opencensus_proto) - -XDS_VERSION=$(find_sha "$CURL_OUTPUT" com_github_cncf_xds) -XDS_DATE=$(find_date "$CURL_OUTPUT" com_github_cncf_xds) - -OPENTELEMETRY_SHA=$(find_sha "$CURL_OUTPUT" opentelemetry_proto) -OPENTELEMETRY_DATE=$(find_date "$CURL_OUTPUT" opentelemetry_proto) - -echo -n "# Update the versions here and run update-api.sh - -# envoy (source: SHA from https://github.com/envoyproxy/envoy) -ENVOY_SHA=\"$ENVOY_VERSION\" - -# dependencies (source: https://github.com/envoyproxy/envoy/blob/$ENVOY_VERSION/api/bazel/repository_locations.bzl) -GOOGLEAPIS_VERSION=\"$GOOGLEAPIS_VERSION\" # $GOOGLEAPIS_DATE -PGV_VERSION=\"$PGV_GIT_SHA\" # $PGV_GIT_DATE -PROMETHEUS_VERSION=\"$PROMETHEUS_VERSION\" # $PROMETHEUS_DATE -OPENCENSUS_VERSION=\"$OPENCENSUS_SHA\" # $OPENCENSUS_DATE -OPENTELEMETRY_VERSION=\"$OPENTELEMETRY_SHA\" # $OPENTELEMETRY_DATE -XDS_VERSION=\"$XDS_VERSION\" # $XDS_DATE -"