From 6fa4695182aaec8cc1cbc9fba2d5449ecd45e07f Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Tue, 23 Oct 2018 12:41:15 -0700 Subject: [PATCH 1/4] Add Protolock. Move the protoc docker files to tools/protoc. Add docker files for protolock image. Update Makefile precommit hook and prow presubmit check to run protolock. --- Makefile | 29 + README.md | 8 +- proto.lock | 4388 ++++++++++++++++++++ prow/api-presubmit.sh | 3 +- scripts/pre-commit | 3 + {docker => tools/protoc}/Dockerfile | 0 {docker => tools/protoc}/build-and-push.sh | 0 tools/protolock/Dockerfile | 19 + tools/protolock/build-and-push.sh | 12 + 9 files changed, 4460 insertions(+), 2 deletions(-) create mode 100644 proto.lock rename {docker => tools/protoc}/Dockerfile (100%) rename {docker => tools/protoc}/build-and-push.sh (100%) create mode 100644 tools/protolock/Dockerfile create mode 100755 tools/protolock/build-and-push.sh diff --git a/Makefile b/Makefile index 659a151c40..52bc7707ed 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,17 @@ ifdef CIRCLECI repo_dir = . docker_gen = /usr/bin/protoc -I/protobuf -I$(repo_dir) out_path = $(OUT_PATH) +docker_lock = protolock else gen_img := gcr.io/istio-testing/protoc:2018-06-12 +lock_img := gcr.io/istio-testing/protolock:2018-10-23 pwd := $(shell pwd) mount_dir := /src repo_dir := istio.io/api repo_mount := $(mount_dir)/istio.io/api docker_gen := docker run --rm -v $(pwd):$(repo_mount) -w $(mount_dir) $(gen_img) -I$(repo_dir) out_path = . +docker_lock = docker run --rm -v $(pwd):$(repo_mount) -w $(repo_mount) $(lock_img) endif ######################## @@ -99,12 +102,14 @@ generate-mcp-go: $(config_mcp_pb_gos) $(config_mcp_pb_doc) $(config_mcp_pb_gos) $(config_mcp_pb_doc): $(config_mcp_protos) ## Generate mcp/v1alpha1/*.pb.go + $(config_mcp_pb_doc) + @$(docker_lock) status @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(config_mcp_path) $^ generate-mcp-python: $(config_mcp_pb_pythons) $(config_mcp_pb_pythons): $(config_mcp_protos) ## Generate python/istio_api/mcp/v1alpha1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-mcp: @@ -125,12 +130,14 @@ generate-mesh-go: $(mesh_pb_gos) $(mesh_pb_doc) $(mesh_pb_gos) $(mesh_pb_doc): $(mesh_protos) ## Generate mesh/v1alpha1/*.pb.go + $(mesh_pb_doc) + @$(docker_lock) status @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(mesh_path) $^ generate-mesh-python: $(mesh_pb_pythons) $(mesh_pb_pythons): $(mesh_protos) ## Generate python/istio_api/mesh/v1alpha1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-mesh: @@ -173,18 +180,22 @@ generate-mixer-go: \ $(mixer_v1_pb_gos) $(mixer_v1_pb_doc): $(mixer_v1_protos) ## Generate mixer/v1/*.pb.go + $(mixer_v1_pb_doc) + @$(docker_lock) status @$(docker_gen) $(gogoslick_plugin) $(protoc_gen_docs_plugin)$(mixer_v1_path) $^ $(mixer_config_client_pb_gos) $(mixer_config_client_pb_doc): $(mixer_config_client_protos) ## Generate mixer/v1/config/client/*.pb.go + $(mixer_config_client_pb_doc) + @$(docker_lock) status @$(docker_gen) $(gogoslick_plugin) $(protoc_gen_docs_plugin)$(mixer_config_client_path) $^ $(mixer_adapter_model_v1beta1_pb_gos) $(mixer_adapter_model_v1beta1_pb_doc) : $(mixer_adapter_model_v1beta1_protos) ## Generate mixer/adapter/model/v1beta1/*.pb.go + $(mixer_adapter_model_v1beta1_pb_doc) + @$(docker_lock) status @$(docker_gen) $(gogoslick_plugin) $(protoc_gen_docs_plugin)$(mixer_adapter_model_v1beta1_path) $^ $(policy_v1beta1_pb_gos) $(policy_v1beta1_pb_doc) : $(policy_v1beta1_protos) ## Generate policy/v1beta1/*.pb.go + $(policy_v1beta1_pb_doc) + @$(docker_lock) status @$(docker_gen) $(gogoslick_plugin) $(protoc_gen_docs_plugin)$(policy_v1beta1_path) $^ generate-mixer-python: \ @@ -195,18 +206,22 @@ generate-mixer-python: \ $(mixer_v1_pb_pythons): $(mixer_v1_protos) ## Generate python/istio_api/mixer/v1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ $(mixer_config_client_pb_pythons): $(mixer_config_client_protos) ## Generate python/istio_api/mixer/v1/config/client/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ $(mixer_adapter_model_v1beta1_pb_pythons): $(mixer_adapter_model_v1beta1_protos) ## Generate python/istio_api/mixer/adapter/model/v1beta1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ $(policy_v1beta1_pb_pythons): $(policy_v1beta1_protos) ## Generate python/istio_api/policy/v1beta1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-mixer: @@ -227,12 +242,14 @@ generate-routing-go: $(routing_v1alpha3_pb_gos) $(routing_v1alpha3_pb_doc) $(routing_v1alpha3_pb_gos) $(routing_v1alpha3_pb_doc): $(routing_v1alpha3_protos) ## Generate networking/v1alpha3/*.pb.go + @$(docker_lock) status @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(routing_v1alpha3_path) $^ generate-routing-python: $(routing_v1alpha3_pb_pythons) $(routing_v1alpha3_pb_pythons): $(routing_v1alpha3_protos) ## Generate python/istio_api/networking/v1alpha3/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-routing: @@ -253,12 +270,14 @@ generate-rbac-go: $(rbac_v1alpha1_pb_gos) $(rbac_v1alpha1_pb_doc) $(rbac_v1alpha1_pb_gos) $(rbac_v1alpha1_pb_doc): $(rbac_v1alpha1_protos) ## Generate rbac/v1alpha1/*.pb.go + @$(docker_lock) status @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(rbac_v1alpha1_path) $^ generate-rbac-python: $(rbac_v1alpha1_protos) $(rbac_v1alpha1_pb_pythons): $(rbac_v1alpha1_protos) ## Generate python/istio_api/rbac/v1alpha1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-rbac: @@ -280,12 +299,14 @@ generate-authn-go: $(authn_v1alpha1_pb_gos) $(authn_v1alpha1_pb_doc) $(authn_v1alpha1_pb_gos) $(authn_v1alpha1_pb_doc): $(authn_v1alpha1_protos) ## Generate authentication/v1alpha1/*.pb.go + @$(docker_lock) status @$(docker_gen) $(gogofast_plugin) $(protoc_gen_docs_plugin)$(authn_v1alpha1_path) $^ generate-authn-python: $(authn_v1alpha1_pb_pythons) $(authn_v1alpha1_pb_pythons): $(authn_v1alpha1_protos) ## Generate python/istio_api/authentication/v1alpha1/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-authn: @@ -306,6 +327,7 @@ generate-envoy-go: $(envoy_pb_gos) $(envoy_pb_doc) # Envoy APIs is internal APIs, documents is not required. $(envoy_pb_gos): $(envoy_protos) ## Generate envoy/*/*.pb.go + @$(docker_lock) status @$(docker_gen) $(gogofast_plugin) $^ generate-envoy-python: $(envoy_pb_pythons) @@ -313,11 +335,18 @@ generate-envoy-python: $(envoy_pb_pythons) # Envoy APIs is internal APIs, documents is not required. $(envoy_pb_pythons): $(envoy_protos) ## Generate envoy/*/*_pb2.py + @$(docker_lock) status @$(docker_gen) $(protoc_gen_python_plugin) $^ clean-envoy: rm -f $(envoy_pb_gos) +##################### +# Protolock +##################### +proto-commit: + @$(docker_lock) commit + ##################### # Cleanup ##################### diff --git a/README.md b/README.md index c0d77bc87a..7e014a9c5e 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,12 @@ When making changes to the protos in this repository, your changes **must** comp ## Updating -After the [protobuf](https://github.com/google/protobuf) definitions are updated, the corresponding `*pb.go` and `_pb2.py` files must be generated by running `scripts/generate-protos.sh` and submitted as part of the same PR as the updated definitions. +After the [protobuf](https://github.com/google/protobuf) definitions +are updated, the corresponding `*pb.go` and `_pb2.py` files must be +generated by running `scripts/generate-protos.sh` and submitted as +part of the same PR as the updated definitions. Also `make +proto-commit` must be run to update the proto.lock file with new +changes. + If releasing a new tagged version, please update python/istio-api/setup.py version to reflect. diff --git a/proto.lock b/proto.lock new file mode 100644 index 0000000000..987d89fcbf --- /dev/null +++ b/proto.lock @@ -0,0 +1,4388 @@ +{ + "definitions": [ + { + "protopath": "authentication:/:v1alpha1:/:policy.proto", + "def": { + "enums": [ + { + "name": "MutualTls.Mode", + "enum_fields": [ + { + "name": "STRICT", + "integer": 0 + }, + { + "name": "PERMISSIVE", + "integer": 1 + } + ] + }, + { + "name": "PrincipalBinding", + "enum_fields": [ + { + "name": "USE_PEER", + "integer": 0 + }, + { + "name": "USE_ORIGIN", + "integer": 1 + } + ] + } + ], + "messages": [ + { + "name": "StringMatch", + "fields": [ + { + "id": 1, + "name": "exact", + "type": "string" + }, + { + "id": 2, + "name": "prefix", + "type": "string" + }, + { + "id": 3, + "name": "suffix", + "type": "string" + }, + { + "id": 4, + "name": "regex", + "type": "string" + } + ] + }, + { + "name": "MutualTls", + "fields": [ + { + "id": 1, + "name": "allow_tls", + "type": "bool" + }, + { + "id": 2, + "name": "mode", + "type": "Mode" + } + ] + }, + { + "name": "Jwt", + "fields": [ + { + "id": 1, + "name": "issuer", + "type": "string" + }, + { + "id": 2, + "name": "audiences", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "jwks_uri", + "type": "string" + }, + { + "id": 6, + "name": "jwt_headers", + "type": "string", + "is_repeated": true + }, + { + "id": 7, + "name": "jwt_params", + "type": "string", + "is_repeated": true + }, + { + "id": 9, + "name": "trigger_rules", + "type": "TriggerRule", + "is_repeated": true + } + ], + "messages": [ + { + "name": "TriggerRule", + "fields": [ + { + "id": 1, + "name": "excluded_paths", + "type": "StringMatch", + "is_repeated": true + }, + { + "id": 2, + "name": "included_paths", + "type": "StringMatch", + "is_repeated": true + } + ] + } + ] + }, + { + "name": "PeerAuthenticationMethod", + "fields": [ + { + "id": 1, + "name": "mtls", + "type": "MutualTls" + }, + { + "id": 2, + "name": "jwt", + "type": "Jwt" + } + ] + }, + { + "name": "OriginAuthenticationMethod", + "fields": [ + { + "id": 1, + "name": "jwt", + "type": "Jwt" + } + ] + }, + { + "name": "Policy", + "fields": [ + { + "id": 1, + "name": "targets", + "type": "TargetSelector", + "is_repeated": true + }, + { + "id": 2, + "name": "peers", + "type": "PeerAuthenticationMethod", + "is_repeated": true + }, + { + "id": 3, + "name": "peer_is_optional", + "type": "bool" + }, + { + "id": 4, + "name": "origins", + "type": "OriginAuthenticationMethod", + "is_repeated": true + }, + { + "id": 5, + "name": "origin_is_optional", + "type": "bool" + }, + { + "id": 6, + "name": "principal_binding", + "type": "PrincipalBinding" + } + ] + }, + { + "name": "TargetSelector", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "ports", + "type": "PortSelector", + "is_repeated": true + } + ] + }, + { + "name": "PortSelector", + "fields": [ + { + "id": 1, + "name": "number", + "type": "uint32" + }, + { + "id": 2, + "name": "name", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "envoy:/:config:/:filter:/:http:/:authn:/:v2alpha1:/:config.proto", + "def": { + "messages": [ + { + "name": "FilterConfig", + "fields": [ + { + "id": 1, + "name": "policy", + "type": "istio.authentication.v1alpha1.Policy" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "jwt_output_payload_locations", + "type": "string" + } + } + ] + } + ] + } + }, + { + "protopath": "envoy:/:config:/:filter:/:http:/:jwt_auth:/:v2alpha1:/:config.proto", + "def": { + "messages": [ + { + "name": "HttpUri", + "fields": [ + { + "id": 1, + "name": "uri", + "type": "string" + }, + { + "id": 2, + "name": "cluster", + "type": "string" + }, + { + "id": 3, + "name": "timeout", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "DataSource", + "fields": [ + { + "id": 1, + "name": "filename", + "type": "string" + }, + { + "id": 2, + "name": "inline_bytes", + "type": "bytes" + }, + { + "id": 3, + "name": "inline_string", + "type": "string" + } + ] + }, + { + "name": "JwtRule", + "fields": [ + { + "id": 1, + "name": "issuer", + "type": "string" + }, + { + "id": 2, + "name": "audiences", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "remote_jwks", + "type": "RemoteJwks" + }, + { + "id": 4, + "name": "local_jwks", + "type": "DataSource" + }, + { + "id": 5, + "name": "forward", + "type": "bool" + }, + { + "id": 6, + "name": "from_headers", + "type": "JwtHeader", + "is_repeated": true + }, + { + "id": 7, + "name": "from_params", + "type": "string", + "is_repeated": true + }, + { + "id": 8, + "name": "forward_payload_header", + "type": "string" + } + ] + }, + { + "name": "RemoteJwks", + "fields": [ + { + "id": 1, + "name": "http_uri", + "type": "HttpUri" + }, + { + "id": 2, + "name": "cache_duration", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "JwtHeader", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "value_prefix", + "type": "string" + } + ] + }, + { + "name": "JwtAuthentication", + "fields": [ + { + "id": 1, + "name": "rules", + "type": "JwtRule", + "is_repeated": true + }, + { + "id": 2, + "name": "allow_missing_or_failed", + "type": "bool" + } + ] + } + ] + } + }, + { + "protopath": "mcp:/:v1alpha1:/:envelope.proto", + "def": { + "messages": [ + { + "name": "Envelope", + "fields": [ + { + "id": 1, + "name": "metadata", + "type": "istio.mcp.v1alpha1.Metadata" + }, + { + "id": 2, + "name": "resource", + "type": "google.protobuf.Any" + } + ] + } + ] + } + }, + { + "protopath": "mcp:/:v1alpha1:/:mcp.proto", + "def": { + "messages": [ + { + "name": "Client", + "fields": [ + { + "id": 1, + "name": "id", + "type": "string" + }, + { + "id": 2, + "name": "metadata", + "type": "google.protobuf.Struct" + } + ] + }, + { + "name": "MeshConfigRequest", + "fields": [ + { + "id": 1, + "name": "version_info", + "type": "string" + }, + { + "id": 2, + "name": "client", + "type": "Client" + }, + { + "id": 3, + "name": "type_url", + "type": "string" + }, + { + "id": 4, + "name": "response_nonce", + "type": "string" + }, + { + "id": 5, + "name": "error_detail", + "type": "google.rpc.Status" + } + ] + }, + { + "name": "MeshConfigResponse", + "fields": [ + { + "id": 1, + "name": "version_info", + "type": "string" + }, + { + "id": 2, + "name": "envelopes", + "type": "Envelope", + "is_repeated": true + }, + { + "id": 3, + "name": "type_url", + "type": "string" + }, + { + "id": 4, + "name": "nonce", + "type": "string" + } + ] + }, + { + "name": "IncrementalMeshConfigRequest", + "fields": [ + { + "id": 1, + "name": "client", + "type": "Client" + }, + { + "id": 2, + "name": "type_url", + "type": "string" + }, + { + "id": 4, + "name": "response_nonce", + "type": "string" + }, + { + "id": 5, + "name": "error_detail", + "type": "google.rpc.Status" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "initial_resource_versions", + "type": "string" + } + } + ] + }, + { + "name": "IncrementalMeshConfigResponse", + "fields": [ + { + "id": 1, + "name": "system_version_info", + "type": "string" + }, + { + "id": 2, + "name": "envelopes", + "type": "Envelope", + "is_repeated": true + }, + { + "id": 3, + "name": "removed_resources", + "type": "string", + "is_repeated": true + }, + { + "id": 4, + "name": "nonce", + "type": "string" + } + ] + } + ], + "services": [ + { + "name": "AggregatedMeshConfigService", + "rpcs": [ + { + "name": "StreamAggregatedResources", + "in_type": "MeshConfigRequest", + "out_type": "MeshConfigResponse", + "in_streamed": true, + "out_streamed": true + }, + { + "name": "IncrementalAggregatedResources", + "in_type": "IncrementalMeshConfigRequest", + "out_type": "IncrementalMeshConfigResponse", + "in_streamed": true, + "out_streamed": true + } + ] + } + ] + } + }, + { + "protopath": "mcp:/:v1alpha1:/:metadata.proto", + "def": { + "messages": [ + { + "name": "Metadata", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "create_time", + "type": "google.protobuf.Timestamp" + }, + { + "id": 3, + "name": "version", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "mesh:/:v1alpha1:/:config.proto", + "def": { + "enums": [ + { + "name": "MeshConfig.IngressControllerMode", + "enum_fields": [ + { + "name": "OFF", + "integer": 0 + }, + { + "name": "DEFAULT", + "integer": 1 + }, + { + "name": "STRICT", + "integer": 2 + } + ] + }, + { + "name": "MeshConfig.AuthPolicy", + "enum_fields": [ + { + "name": "NONE", + "integer": 0 + }, + { + "name": "MUTUAL_TLS", + "integer": 1 + } + ] + } + ], + "messages": [ + { + "name": "MeshConfig", + "fields": [ + { + "id": 1, + "name": "mixer_check_server", + "type": "string" + }, + { + "id": 2, + "name": "mixer_report_server", + "type": "string" + }, + { + "id": 3, + "name": "disable_policy_checks", + "type": "bool" + }, + { + "id": 4, + "name": "proxy_listen_port", + "type": "int32" + }, + { + "id": 5, + "name": "proxy_http_port", + "type": "int32" + }, + { + "id": 6, + "name": "connect_timeout", + "type": "google.protobuf.Duration" + }, + { + "id": 7, + "name": "ingress_class", + "type": "string" + }, + { + "id": 8, + "name": "ingress_service", + "type": "string" + }, + { + "id": 9, + "name": "ingress_controller_mode", + "type": "IngressControllerMode" + }, + { + "id": 10, + "name": "auth_policy", + "type": "AuthPolicy" + }, + { + "id": 12, + "name": "enable_tracing", + "type": "bool" + }, + { + "id": 13, + "name": "access_log_file", + "type": "string" + }, + { + "id": 24, + "name": "access_log_format", + "type": "string" + }, + { + "id": 14, + "name": "default_config", + "type": "ProxyConfig" + }, + { + "id": 19, + "name": "enable_client_side_policy_check", + "type": "bool" + }, + { + "id": 20, + "name": "sds_uds_path", + "type": "string" + }, + { + "id": 22, + "name": "config_sources", + "type": "ConfigSource", + "is_repeated": true + }, + { + "id": 23, + "name": "enable_sds_token_mount", + "type": "bool" + } + ], + "reserved_ids": [ + 11, + 15, + 16, + 17, + 18, + 21 + ] + }, + { + "name": "ConfigSource", + "fields": [ + { + "id": 1, + "name": "address", + "type": "string" + }, + { + "id": 2, + "name": "tls_settings", + "type": "istio.networking.v1alpha3.TLSSettings" + } + ] + } + ] + } + }, + { + "protopath": "mesh:/:v1alpha1:/:network.proto", + "def": { + "messages": [ + { + "name": "Network", + "fields": [ + { + "id": 2, + "name": "endpoints", + "type": "NetworkEndpoints", + "is_repeated": true + }, + { + "id": 3, + "name": "gateways", + "type": "IstioNetworkGateway", + "is_repeated": true + } + ], + "messages": [ + { + "name": "NetworkEndpoints", + "fields": [ + { + "id": 1, + "name": "from_cidr", + "type": "string" + }, + { + "id": 2, + "name": "from_registry", + "type": "string" + } + ] + }, + { + "name": "IstioNetworkGateway", + "fields": [ + { + "id": 1, + "name": "registry_service_name", + "type": "string" + }, + { + "id": 2, + "name": "address", + "type": "string" + }, + { + "id": 3, + "name": "port", + "type": "uint32" + }, + { + "id": 4, + "name": "locality", + "type": "string" + } + ] + } + ] + }, + { + "name": "MeshNetworks", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "networks", + "type": "Network" + } + } + ] + } + ] + } + }, + { + "protopath": "mesh:/:v1alpha1:/:proxy.proto", + "def": { + "enums": [ + { + "name": "AuthenticationPolicy", + "enum_fields": [ + { + "name": "NONE", + "integer": 0 + }, + { + "name": "MUTUAL_TLS", + "integer": 1 + }, + { + "name": "INHERIT", + "integer": 1000 + } + ] + }, + { + "name": "ProxyConfig.InboundInterceptionMode", + "enum_fields": [ + { + "name": "REDIRECT", + "integer": 0 + }, + { + "name": "TPROXY", + "integer": 1 + } + ] + } + ], + "messages": [ + { + "name": "Tracing", + "fields": [ + { + "id": 1, + "name": "zipkin", + "type": "Zipkin" + }, + { + "id": 2, + "name": "lightstep", + "type": "Lightstep" + } + ], + "messages": [ + { + "name": "Zipkin", + "fields": [ + { + "id": 1, + "name": "address", + "type": "string" + } + ] + }, + { + "name": "Lightstep", + "fields": [ + { + "id": 1, + "name": "address", + "type": "string" + }, + { + "id": 2, + "name": "access_token", + "type": "string" + }, + { + "id": 3, + "name": "secure", + "type": "bool" + }, + { + "id": 4, + "name": "cacert_path", + "type": "string" + } + ] + } + ] + }, + { + "name": "ProxyConfig", + "fields": [ + { + "id": 1, + "name": "config_path", + "type": "string" + }, + { + "id": 2, + "name": "binary_path", + "type": "string" + }, + { + "id": 3, + "name": "service_cluster", + "type": "string" + }, + { + "id": 4, + "name": "drain_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 5, + "name": "parent_shutdown_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 6, + "name": "discovery_address", + "type": "string" + }, + { + "id": 8, + "name": "zipkin_address", + "type": "string" + }, + { + "id": 9, + "name": "connect_timeout", + "type": "google.protobuf.Duration" + }, + { + "id": 10, + "name": "statsd_udp_address", + "type": "string" + }, + { + "id": 11, + "name": "proxy_admin_port", + "type": "int32" + }, + { + "id": 13, + "name": "control_plane_auth_policy", + "type": "AuthenticationPolicy" + }, + { + "id": 14, + "name": "custom_config_file", + "type": "string" + }, + { + "id": 15, + "name": "stat_name_length", + "type": "int32" + }, + { + "id": 16, + "name": "concurrency", + "type": "int32" + }, + { + "id": 17, + "name": "proxy_bootstrap_template_path", + "type": "string" + }, + { + "id": 18, + "name": "interception_mode", + "type": "InboundInterceptionMode" + }, + { + "id": 19, + "name": "tracing", + "type": "Tracing" + } + ], + "reserved_ids": [ + 7, + 12 + ] + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:check.proto", + "def": { + "messages": [ + { + "name": "CheckResult", + "fields": [ + { + "id": 1, + "name": "status", + "type": "google.rpc.Status" + }, + { + "id": 2, + "name": "valid_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 3, + "name": "valid_use_count", + "type": "int32" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:extensions.proto", + "def": { + "enums": [ + { + "name": "TemplateVariety", + "enum_fields": [ + { + "name": "TEMPLATE_VARIETY_CHECK", + "integer": 0 + }, + { + "name": "TEMPLATE_VARIETY_REPORT", + "integer": 1 + }, + { + "name": "TEMPLATE_VARIETY_QUOTA", + "integer": 2 + }, + { + "name": "TEMPLATE_VARIETY_ATTRIBUTE_GENERATOR", + "integer": 3 + }, + { + "name": "TEMPLATE_VARIETY_CHECK_WITH_OUTPUT", + "integer": 4 + } + ] + } + ], + "messages": [ + { + "name": "google.protobuf.FileOptions", + "fields": [ + { + "id": 72295727, + "name": "template_variety", + "type": "TemplateVariety" + }, + { + "id": 72295888, + "name": "template_name", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:info.proto", + "def": { + "messages": [ + { + "name": "Info", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "description", + "type": "string" + }, + { + "id": 3, + "name": "templates", + "type": "string", + "is_repeated": true + }, + { + "id": 4, + "name": "config", + "type": "string" + }, + { + "id": 5, + "name": "session_based", + "type": "bool" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:infrastructure_backend.proto", + "def": { + "messages": [ + { + "name": "CreateSessionRequest", + "fields": [ + { + "id": 1, + "name": "adapter_config", + "type": "google.protobuf.Any" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "inferred_types", + "type": "google.protobuf.Any" + } + } + ] + }, + { + "name": "CreateSessionResponse", + "fields": [ + { + "id": 1, + "name": "session_id", + "type": "string" + }, + { + "id": 2, + "name": "status", + "type": "google.rpc.Status" + } + ] + }, + { + "name": "ValidateRequest", + "fields": [ + { + "id": 1, + "name": "adapter_config", + "type": "google.protobuf.Any" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "inferred_types", + "type": "google.protobuf.Any" + } + } + ] + }, + { + "name": "ValidateResponse", + "fields": [ + { + "id": 1, + "name": "status", + "type": "google.rpc.Status" + } + ] + }, + { + "name": "CloseSessionRequest", + "fields": [ + { + "id": 1, + "name": "session_id", + "type": "string" + } + ] + }, + { + "name": "CloseSessionResponse", + "fields": [ + { + "id": 1, + "name": "status", + "type": "google.rpc.Status" + } + ] + } + ], + "services": [ + { + "name": "InfrastructureBackend", + "rpcs": [ + { + "name": "Validate", + "in_type": "ValidateRequest", + "out_type": "ValidateResponse" + }, + { + "name": "CreateSession", + "in_type": "CreateSessionRequest", + "out_type": "CreateSessionResponse" + }, + { + "name": "CloseSession", + "in_type": "CloseSessionRequest", + "out_type": "CloseSessionResponse" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:quota.proto", + "def": { + "messages": [ + { + "name": "QuotaRequest", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "quotas", + "type": "QuotaParams" + } + } + ], + "messages": [ + { + "name": "QuotaParams", + "fields": [ + { + "id": 1, + "name": "amount", + "type": "int64" + }, + { + "id": 2, + "name": "best_effort", + "type": "bool" + } + ] + } + ] + }, + { + "name": "QuotaResult", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "quotas", + "type": "Result" + } + } + ], + "messages": [ + { + "name": "Result", + "fields": [ + { + "id": 2, + "name": "valid_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 3, + "name": "granted_amount", + "type": "int64" + } + ] + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:report.proto", + "def": { + "messages": [ + { + "name": "ReportResult" + } + ] + } + }, + { + "protopath": "mixer:/:adapter:/:model:/:v1beta1:/:template.proto", + "def": { + "messages": [ + { + "name": "Template", + "fields": [ + { + "id": 1, + "name": "descriptor", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:attributes.proto", + "def": { + "messages": [ + { + "name": "Attributes", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "attributes", + "type": "AttributeValue" + } + } + ], + "messages": [ + { + "name": "AttributeValue", + "fields": [ + { + "id": 2, + "name": "string_value", + "type": "string" + }, + { + "id": 3, + "name": "int64_value", + "type": "int64" + }, + { + "id": 4, + "name": "double_value", + "type": "double" + }, + { + "id": 5, + "name": "bool_value", + "type": "bool" + }, + { + "id": 6, + "name": "bytes_value", + "type": "bytes" + }, + { + "id": 7, + "name": "timestamp_value", + "type": "google.protobuf.Timestamp" + }, + { + "id": 8, + "name": "duration_value", + "type": "google.protobuf.Duration" + }, + { + "id": 9, + "name": "string_map_value", + "type": "StringMap" + } + ] + }, + { + "name": "StringMap", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "entries", + "type": "string" + } + } + ] + } + ] + }, + { + "name": "CompressedAttributes", + "fields": [ + { + "id": 1, + "name": "words", + "type": "string", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "sint32", + "field": { + "id": 2, + "name": "strings", + "type": "sint32" + } + }, + { + "key_type": "sint32", + "field": { + "id": 3, + "name": "int64s", + "type": "int64" + } + }, + { + "key_type": "sint32", + "field": { + "id": 4, + "name": "doubles", + "type": "double" + } + }, + { + "key_type": "sint32", + "field": { + "id": 5, + "name": "bools", + "type": "bool" + } + }, + { + "key_type": "sint32", + "field": { + "id": 6, + "name": "timestamps", + "type": "google.protobuf.Timestamp" + } + }, + { + "key_type": "sint32", + "field": { + "id": 7, + "name": "durations", + "type": "google.protobuf.Duration" + } + }, + { + "key_type": "sint32", + "field": { + "id": 8, + "name": "bytes", + "type": "bytes" + } + }, + { + "key_type": "sint32", + "field": { + "id": 9, + "name": "string_maps", + "type": "StringMap" + } + } + ] + }, + { + "name": "StringMap", + "maps": [ + { + "key_type": "sint32", + "field": { + "id": 1, + "name": "entries", + "type": "sint32" + } + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:check.proto", + "def": { + "enums": [ + { + "name": "ReferencedAttributes.Condition", + "enum_fields": [ + { + "name": "CONDITION_UNSPECIFIED", + "integer": 0 + }, + { + "name": "ABSENCE", + "integer": 1 + }, + { + "name": "EXACT", + "integer": 2 + }, + { + "name": "REGEX", + "integer": 3 + } + ] + }, + { + "name": "HeaderOperation.Operation", + "enum_fields": [ + { + "name": "REPLACE", + "integer": 0 + }, + { + "name": "REMOVE", + "integer": 1 + }, + { + "name": "APPEND", + "integer": 2 + } + ] + } + ], + "messages": [ + { + "name": "CheckRequest", + "fields": [ + { + "id": 1, + "name": "attributes", + "type": "CompressedAttributes" + }, + { + "id": 2, + "name": "global_word_count", + "type": "uint32" + }, + { + "id": 3, + "name": "deduplication_id", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 4, + "name": "quotas", + "type": "QuotaParams" + } + } + ], + "messages": [ + { + "name": "QuotaParams", + "fields": [ + { + "id": 1, + "name": "amount", + "type": "int64" + }, + { + "id": 2, + "name": "best_effort", + "type": "bool" + } + ] + } + ] + }, + { + "name": "CheckResponse", + "fields": [ + { + "id": 2, + "name": "precondition", + "type": "PreconditionResult" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "quotas", + "type": "QuotaResult" + } + } + ], + "messages": [ + { + "name": "PreconditionResult", + "fields": [ + { + "id": 1, + "name": "status", + "type": "google.rpc.Status" + }, + { + "id": 2, + "name": "valid_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 3, + "name": "valid_use_count", + "type": "int32" + }, + { + "id": 5, + "name": "referenced_attributes", + "type": "ReferencedAttributes" + }, + { + "id": 6, + "name": "route_directive", + "type": "RouteDirective" + } + ], + "reserved_ids": [ + 4 + ] + }, + { + "name": "QuotaResult", + "fields": [ + { + "id": 1, + "name": "valid_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 2, + "name": "granted_amount", + "type": "int64" + }, + { + "id": 5, + "name": "referenced_attributes", + "type": "ReferencedAttributes" + } + ] + } + ] + }, + { + "name": "ReferencedAttributes", + "fields": [ + { + "id": 1, + "name": "words", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "attribute_matches", + "type": "AttributeMatch", + "is_repeated": true + } + ], + "messages": [ + { + "name": "AttributeMatch", + "fields": [ + { + "id": 1, + "name": "name", + "type": "sint32" + }, + { + "id": 2, + "name": "condition", + "type": "Condition" + }, + { + "id": 3, + "name": "regex", + "type": "string" + }, + { + "id": 4, + "name": "map_key", + "type": "sint32" + } + ] + } + ] + }, + { + "name": "HeaderOperation", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "value", + "type": "string" + }, + { + "id": 3, + "name": "operation", + "type": "Operation" + } + ] + }, + { + "name": "RouteDirective", + "fields": [ + { + "id": 1, + "name": "request_header_operations", + "type": "HeaderOperation", + "is_repeated": true + }, + { + "id": 2, + "name": "response_header_operations", + "type": "HeaderOperation", + "is_repeated": true + }, + { + "id": 3, + "name": "direct_response_code", + "type": "uint32" + }, + { + "id": 4, + "name": "direct_response_body", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:config:/:client:/:api_spec.proto", + "def": { + "messages": [ + { + "name": "HTTPAPISpec", + "fields": [ + { + "id": 1, + "name": "attributes", + "type": "Attributes" + }, + { + "id": 2, + "name": "patterns", + "type": "HTTPAPISpecPattern", + "is_repeated": true + }, + { + "id": 3, + "name": "api_keys", + "type": "APIKey", + "is_repeated": true + } + ] + }, + { + "name": "HTTPAPISpecPattern", + "fields": [ + { + "id": 1, + "name": "attributes", + "type": "Attributes" + }, + { + "id": 2, + "name": "http_method", + "type": "string" + }, + { + "id": 3, + "name": "uri_template", + "type": "string" + }, + { + "id": 4, + "name": "regex", + "type": "string" + } + ] + }, + { + "name": "APIKey", + "fields": [ + { + "id": 1, + "name": "query", + "type": "string" + }, + { + "id": 2, + "name": "header", + "type": "string" + }, + { + "id": 3, + "name": "cookie", + "type": "string" + } + ] + }, + { + "name": "HTTPAPISpecReference", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "namespace", + "type": "string" + } + ] + }, + { + "name": "HTTPAPISpecBinding", + "fields": [ + { + "id": 1, + "name": "services", + "type": "IstioService", + "is_repeated": true + }, + { + "id": 2, + "name": "api_specs", + "type": "HTTPAPISpecReference", + "is_repeated": true + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:config:/:client:/:client_config.proto", + "def": { + "enums": [ + { + "name": "NetworkFailPolicy.FailPolicy", + "enum_fields": [ + { + "name": "FAIL_OPEN", + "integer": 0 + }, + { + "name": "FAIL_CLOSE", + "integer": 1 + } + ] + } + ], + "messages": [ + { + "name": "NetworkFailPolicy", + "fields": [ + { + "id": 1, + "name": "policy", + "type": "FailPolicy" + } + ] + }, + { + "name": "ServiceConfig", + "fields": [ + { + "id": 1, + "name": "disable_check_calls", + "type": "bool" + }, + { + "id": 2, + "name": "disable_report_calls", + "type": "bool" + }, + { + "id": 3, + "name": "mixer_attributes", + "type": "Attributes" + }, + { + "id": 4, + "name": "http_api_spec", + "type": "HTTPAPISpec", + "is_repeated": true + }, + { + "id": 5, + "name": "quota_spec", + "type": "QuotaSpec", + "is_repeated": true + }, + { + "id": 7, + "name": "network_fail_policy", + "type": "NetworkFailPolicy" + }, + { + "id": 8, + "name": "forward_attributes", + "type": "Attributes" + } + ] + }, + { + "name": "TransportConfig", + "fields": [ + { + "id": 1, + "name": "disable_check_cache", + "type": "bool" + }, + { + "id": 2, + "name": "disable_quota_cache", + "type": "bool" + }, + { + "id": 3, + "name": "disable_report_batch", + "type": "bool" + }, + { + "id": 4, + "name": "network_fail_policy", + "type": "NetworkFailPolicy" + }, + { + "id": 5, + "name": "stats_update_interval", + "type": "google.protobuf.Duration" + }, + { + "id": 6, + "name": "check_cluster", + "type": "string" + }, + { + "id": 7, + "name": "report_cluster", + "type": "string" + }, + { + "id": 8, + "name": "attributes_for_mixer_proxy", + "type": "Attributes" + } + ] + }, + { + "name": "HttpClientConfig", + "fields": [ + { + "id": 1, + "name": "transport", + "type": "TransportConfig" + }, + { + "id": 3, + "name": "default_destination_service", + "type": "string" + }, + { + "id": 4, + "name": "mixer_attributes", + "type": "Attributes" + }, + { + "id": 5, + "name": "forward_attributes", + "type": "Attributes" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "service_configs", + "type": "ServiceConfig" + } + } + ] + }, + { + "name": "TcpClientConfig", + "fields": [ + { + "id": 1, + "name": "transport", + "type": "TransportConfig" + }, + { + "id": 2, + "name": "mixer_attributes", + "type": "Attributes" + }, + { + "id": 3, + "name": "disable_check_calls", + "type": "bool" + }, + { + "id": 4, + "name": "disable_report_calls", + "type": "bool" + }, + { + "id": 5, + "name": "connection_quota_spec", + "type": "QuotaSpec" + }, + { + "id": 6, + "name": "report_interval", + "type": "google.protobuf.Duration" + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:config:/:client:/:quota.proto", + "def": { + "messages": [ + { + "name": "QuotaSpec", + "fields": [ + { + "id": 1, + "name": "rules", + "type": "QuotaRule", + "is_repeated": true + } + ] + }, + { + "name": "QuotaRule", + "fields": [ + { + "id": 1, + "name": "match", + "type": "AttributeMatch", + "is_repeated": true + }, + { + "id": 2, + "name": "quotas", + "type": "Quota", + "is_repeated": true + } + ] + }, + { + "name": "StringMatch", + "fields": [ + { + "id": 1, + "name": "exact", + "type": "string" + }, + { + "id": 2, + "name": "prefix", + "type": "string" + }, + { + "id": 3, + "name": "regex", + "type": "string" + } + ] + }, + { + "name": "AttributeMatch", + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "clause", + "type": "StringMatch" + } + } + ] + }, + { + "name": "Quota", + "fields": [ + { + "id": 1, + "name": "quota", + "type": "string" + }, + { + "id": 2, + "name": "charge", + "type": "int64" + } + ] + }, + { + "name": "QuotaSpecBinding", + "fields": [ + { + "id": 1, + "name": "services", + "type": "IstioService", + "is_repeated": true + }, + { + "id": 2, + "name": "quota_specs", + "type": "QuotaSpecReference", + "is_repeated": true + } + ], + "messages": [ + { + "name": "QuotaSpecReference", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "namespace", + "type": "string" + } + ] + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:config:/:client:/:service.proto", + "def": { + "messages": [ + { + "name": "IstioService", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "namespace", + "type": "string" + }, + { + "id": 3, + "name": "domain", + "type": "string" + }, + { + "id": 4, + "name": "service", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 5, + "name": "labels", + "type": "string" + } + } + ] + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:report.proto", + "def": { + "messages": [ + { + "name": "ReportRequest", + "fields": [ + { + "id": 1, + "name": "attributes", + "type": "CompressedAttributes", + "is_repeated": true + }, + { + "id": 2, + "name": "default_words", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "global_word_count", + "type": "uint32" + } + ] + }, + { + "name": "ReportResponse" + } + ] + } + }, + { + "protopath": "mixer:/:v1:/:service.proto", + "def": { + "services": [ + { + "name": "Mixer", + "rpcs": [ + { + "name": "Check", + "in_type": "CheckRequest", + "out_type": "CheckResponse" + }, + { + "name": "Report", + "in_type": "ReportRequest", + "out_type": "ReportResponse" + } + ] + } + ] + } + }, + { + "protopath": "networking:/:v1alpha3:/:destination_rule.proto", + "def": { + "enums": [ + { + "name": "LoadBalancerSettings.SimpleLB", + "enum_fields": [ + { + "name": "ROUND_ROBIN", + "integer": 0 + }, + { + "name": "LEAST_CONN", + "integer": 1 + }, + { + "name": "RANDOM", + "integer": 2 + }, + { + "name": "PASSTHROUGH", + "integer": 3 + } + ] + }, + { + "name": "TLSSettings.TLSmode", + "enum_fields": [ + { + "name": "DISABLE", + "integer": 0 + }, + { + "name": "SIMPLE", + "integer": 1 + }, + { + "name": "MUTUAL", + "integer": 2 + }, + { + "name": "ISTIO_MUTUAL", + "integer": 3 + } + ] + } + ], + "messages": [ + { + "name": "DestinationRule", + "fields": [ + { + "id": 1, + "name": "host", + "type": "string" + }, + { + "id": 2, + "name": "traffic_policy", + "type": "TrafficPolicy" + }, + { + "id": 3, + "name": "subsets", + "type": "Subset", + "is_repeated": true + } + ] + }, + { + "name": "TrafficPolicy", + "fields": [ + { + "id": 1, + "name": "load_balancer", + "type": "LoadBalancerSettings" + }, + { + "id": 2, + "name": "connection_pool", + "type": "ConnectionPoolSettings" + }, + { + "id": 3, + "name": "outlier_detection", + "type": "OutlierDetection" + }, + { + "id": 4, + "name": "tls", + "type": "TLSSettings" + }, + { + "id": 5, + "name": "port_level_settings", + "type": "PortTrafficPolicy", + "is_repeated": true + } + ], + "messages": [ + { + "name": "PortTrafficPolicy", + "fields": [ + { + "id": 1, + "name": "port", + "type": "PortSelector" + }, + { + "id": 2, + "name": "load_balancer", + "type": "LoadBalancerSettings" + }, + { + "id": 3, + "name": "connection_pool", + "type": "ConnectionPoolSettings" + }, + { + "id": 4, + "name": "outlier_detection", + "type": "OutlierDetection" + }, + { + "id": 5, + "name": "tls", + "type": "TLSSettings" + } + ] + } + ] + }, + { + "name": "Subset", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 3, + "name": "traffic_policy", + "type": "TrafficPolicy" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "labels", + "type": "string" + } + } + ] + }, + { + "name": "LoadBalancerSettings", + "fields": [ + { + "id": 1, + "name": "simple", + "type": "SimpleLB" + }, + { + "id": 2, + "name": "consistent_hash", + "type": "ConsistentHashLB" + } + ], + "messages": [ + { + "name": "ConsistentHashLB", + "fields": [ + { + "id": 1, + "name": "http_header_name", + "type": "string" + }, + { + "id": 2, + "name": "http_cookie", + "type": "HTTPCookie" + }, + { + "id": 3, + "name": "use_source_ip", + "type": "bool" + }, + { + "id": 4, + "name": "minimum_ring_size", + "type": "uint64" + } + ], + "messages": [ + { + "name": "HTTPCookie", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "path", + "type": "string" + }, + { + "id": 3, + "name": "ttl", + "type": "google.protobuf.Duration" + } + ] + } + ] + } + ] + }, + { + "name": "ConnectionPoolSettings", + "fields": [ + { + "id": 1, + "name": "tcp", + "type": "TCPSettings" + }, + { + "id": 2, + "name": "http", + "type": "HTTPSettings" + } + ], + "messages": [ + { + "name": "TCPSettings", + "fields": [ + { + "id": 1, + "name": "max_connections", + "type": "int32" + }, + { + "id": 2, + "name": "connect_timeout", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "HTTPSettings", + "fields": [ + { + "id": 1, + "name": "http1_max_pending_requests", + "type": "int32" + }, + { + "id": 2, + "name": "http2_max_requests", + "type": "int32" + }, + { + "id": 3, + "name": "max_requests_per_connection", + "type": "int32" + }, + { + "id": 4, + "name": "max_retries", + "type": "int32" + } + ] + } + ] + }, + { + "name": "OutlierDetection", + "fields": [ + { + "id": 1, + "name": "consecutive_errors", + "type": "int32" + }, + { + "id": 2, + "name": "interval", + "type": "google.protobuf.Duration" + }, + { + "id": 3, + "name": "base_ejection_time", + "type": "google.protobuf.Duration" + }, + { + "id": 4, + "name": "max_ejection_percent", + "type": "int32" + } + ] + }, + { + "name": "TLSSettings", + "fields": [ + { + "id": 1, + "name": "mode", + "type": "TLSmode" + }, + { + "id": 2, + "name": "client_certificate", + "type": "string" + }, + { + "id": 3, + "name": "private_key", + "type": "string" + }, + { + "id": 4, + "name": "ca_certificates", + "type": "string" + }, + { + "id": 5, + "name": "subject_alt_names", + "type": "string", + "is_repeated": true + }, + { + "id": 6, + "name": "sni", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "networking:/:v1alpha3:/:envoy_filter.proto", + "def": { + "enums": [ + { + "name": "ListenerMatch.ListenerType", + "enum_fields": [ + { + "name": "ANY", + "integer": 0 + }, + { + "name": "SIDECAR_INBOUND", + "integer": 1 + }, + { + "name": "SIDECAR_OUTBOUND", + "integer": 2 + }, + { + "name": "GATEWAY", + "integer": 3 + } + ] + }, + { + "name": "ListenerMatch.ListenerProtocol", + "enum_fields": [ + { + "name": "ALL", + "integer": 0 + }, + { + "name": "HTTP", + "integer": 1 + }, + { + "name": "TCP", + "integer": 2 + } + ] + }, + { + "name": "InsertPosition.Index", + "enum_fields": [ + { + "name": "FIRST", + "integer": 0 + }, + { + "name": "LAST", + "integer": 1 + }, + { + "name": "BEFORE", + "integer": 2 + }, + { + "name": "AFTER", + "integer": 3 + } + ] + }, + { + "name": "Filter.FilterType", + "enum_fields": [ + { + "name": "INVALID", + "integer": 0 + }, + { + "name": "HTTP", + "integer": 1 + }, + { + "name": "NETWORK", + "integer": 2 + } + ] + } + ], + "messages": [ + { + "name": "EnvoyFilter", + "fields": [ + { + "id": 2, + "name": "filters", + "type": "Filter", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 1, + "name": "workload_labels", + "type": "string" + } + } + ], + "messages": [ + { + "name": "ListenerMatch", + "fields": [ + { + "id": 1, + "name": "port_number", + "type": "uint32" + }, + { + "id": 2, + "name": "port_name_prefix", + "type": "string" + }, + { + "id": 3, + "name": "listener_type", + "type": "ListenerType" + }, + { + "id": 4, + "name": "listener_protocol", + "type": "ListenerProtocol" + }, + { + "id": 5, + "name": "address", + "type": "string", + "is_repeated": true + } + ] + }, + { + "name": "InsertPosition", + "fields": [ + { + "id": 1, + "name": "index", + "type": "Index" + }, + { + "id": 2, + "name": "relative_to", + "type": "string" + } + ] + }, + { + "name": "Filter", + "fields": [ + { + "id": 1, + "name": "listener_match", + "type": "ListenerMatch" + }, + { + "id": 2, + "name": "insert_position", + "type": "InsertPosition" + }, + { + "id": 3, + "name": "filter_type", + "type": "FilterType" + }, + { + "id": 4, + "name": "filter_name", + "type": "string" + }, + { + "id": 5, + "name": "filter_config", + "type": "google.protobuf.Struct" + } + ] + } + ] + } + ] + } + }, + { + "protopath": "networking:/:v1alpha3:/:gateway.proto", + "def": { + "enums": [ + { + "name": "TLSOptions.TLSmode", + "enum_fields": [ + { + "name": "PASSTHROUGH", + "integer": 0 + }, + { + "name": "SIMPLE", + "integer": 1 + }, + { + "name": "MUTUAL", + "integer": 2 + }, + { + "name": "AUTO_PASSTHROUGH", + "integer": 3 + } + ] + }, + { + "name": "TLSOptions.TLSProtocol", + "enum_fields": [ + { + "name": "TLS_AUTO", + "integer": 0 + }, + { + "name": "TLSv1_0", + "integer": 1 + }, + { + "name": "TLSv1_1", + "integer": 2 + }, + { + "name": "TLSv1_2", + "integer": 3 + }, + { + "name": "TLSv1_3", + "integer": 4 + } + ] + } + ], + "messages": [ + { + "name": "Gateway", + "fields": [ + { + "id": 1, + "name": "servers", + "type": "Server", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "selector", + "type": "string" + } + } + ] + }, + { + "name": "Server", + "fields": [ + { + "id": 1, + "name": "port", + "type": "Port" + }, + { + "id": 2, + "name": "hosts", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "tls", + "type": "TLSOptions" + } + ], + "messages": [ + { + "name": "TLSOptions", + "fields": [ + { + "id": 1, + "name": "https_redirect", + "type": "bool" + }, + { + "id": 2, + "name": "mode", + "type": "TLSmode" + }, + { + "id": 3, + "name": "server_certificate", + "type": "string" + }, + { + "id": 4, + "name": "private_key", + "type": "string" + }, + { + "id": 5, + "name": "ca_certificates", + "type": "string" + }, + { + "id": 6, + "name": "subject_alt_names", + "type": "string", + "is_repeated": true + }, + { + "id": 7, + "name": "min_protocol_version", + "type": "TLSProtocol" + }, + { + "id": 8, + "name": "max_protocol_version", + "type": "TLSProtocol" + }, + { + "id": 9, + "name": "cipher_suites", + "type": "string", + "is_repeated": true + } + ] + } + ] + }, + { + "name": "Port", + "fields": [ + { + "id": 1, + "name": "number", + "type": "uint32" + }, + { + "id": 2, + "name": "protocol", + "type": "string" + }, + { + "id": 3, + "name": "name", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "networking:/:v1alpha3:/:service_entry.proto", + "def": { + "enums": [ + { + "name": "ServiceEntry.Location", + "enum_fields": [ + { + "name": "MESH_EXTERNAL", + "integer": 0 + }, + { + "name": "MESH_INTERNAL", + "integer": 1 + } + ] + }, + { + "name": "ServiceEntry.Resolution", + "enum_fields": [ + { + "name": "NONE", + "integer": 0 + }, + { + "name": "STATIC", + "integer": 1 + }, + { + "name": "DNS", + "integer": 2 + } + ] + } + ], + "messages": [ + { + "name": "ServiceEntry", + "fields": [ + { + "id": 1, + "name": "hosts", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "addresses", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "ports", + "type": "Port", + "is_repeated": true + }, + { + "id": 4, + "name": "location", + "type": "Location" + }, + { + "id": 5, + "name": "resolution", + "type": "Resolution" + }, + { + "id": 6, + "name": "endpoints", + "type": "Endpoint", + "is_repeated": true + } + ], + "messages": [ + { + "name": "Endpoint", + "fields": [ + { + "id": 1, + "name": "address", + "type": "string" + }, + { + "id": 4, + "name": "network", + "type": "string" + }, + { + "id": 5, + "name": "locality", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 2, + "name": "ports", + "type": "uint32" + } + }, + { + "key_type": "string", + "field": { + "id": 3, + "name": "labels", + "type": "string" + } + } + ] + } + ] + } + ] + } + }, + { + "protopath": "networking:/:v1alpha3:/:virtual_service.proto", + "def": { + "messages": [ + { + "name": "VirtualService", + "fields": [ + { + "id": 1, + "name": "hosts", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "gateways", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "http", + "type": "HTTPRoute", + "is_repeated": true + }, + { + "id": 5, + "name": "tls", + "type": "TLSRoute", + "is_repeated": true + }, + { + "id": 4, + "name": "tcp", + "type": "TCPRoute", + "is_repeated": true + } + ] + }, + { + "name": "Destination", + "fields": [ + { + "id": 1, + "name": "host", + "type": "string" + }, + { + "id": 2, + "name": "subset", + "type": "string" + }, + { + "id": 3, + "name": "port", + "type": "PortSelector" + } + ] + }, + { + "name": "HTTPRoute", + "fields": [ + { + "id": 1, + "name": "match", + "type": "HTTPMatchRequest", + "is_repeated": true + }, + { + "id": 2, + "name": "route", + "type": "HTTPRouteDestination", + "is_repeated": true + }, + { + "id": 3, + "name": "redirect", + "type": "HTTPRedirect" + }, + { + "id": 4, + "name": "rewrite", + "type": "HTTPRewrite" + }, + { + "id": 5, + "name": "websocket_upgrade", + "type": "bool" + }, + { + "id": 6, + "name": "timeout", + "type": "google.protobuf.Duration" + }, + { + "id": 7, + "name": "retries", + "type": "HTTPRetry" + }, + { + "id": 8, + "name": "fault", + "type": "HTTPFaultInjection" + }, + { + "id": 9, + "name": "mirror", + "type": "Destination" + }, + { + "id": 10, + "name": "cors_policy", + "type": "CorsPolicy" + }, + { + "id": 12, + "name": "remove_response_headers", + "type": "string", + "is_repeated": true + }, + { + "id": 14, + "name": "remove_request_headers", + "type": "string", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 11, + "name": "append_headers", + "type": "string" + } + }, + { + "key_type": "string", + "field": { + "id": 13, + "name": "append_response_headers", + "type": "string" + } + }, + { + "key_type": "string", + "field": { + "id": 15, + "name": "append_request_headers", + "type": "string" + } + } + ] + }, + { + "name": "TLSRoute", + "fields": [ + { + "id": 1, + "name": "match", + "type": "TLSMatchAttributes", + "is_repeated": true + }, + { + "id": 2, + "name": "route", + "type": "RouteDestination", + "is_repeated": true + } + ] + }, + { + "name": "TCPRoute", + "fields": [ + { + "id": 1, + "name": "match", + "type": "L4MatchAttributes", + "is_repeated": true + }, + { + "id": 2, + "name": "route", + "type": "RouteDestination", + "is_repeated": true + } + ] + }, + { + "name": "HTTPMatchRequest", + "fields": [ + { + "id": 1, + "name": "uri", + "type": "StringMatch" + }, + { + "id": 2, + "name": "scheme", + "type": "StringMatch" + }, + { + "id": 3, + "name": "method", + "type": "StringMatch" + }, + { + "id": 4, + "name": "authority", + "type": "StringMatch" + }, + { + "id": 6, + "name": "port", + "type": "uint32" + }, + { + "id": 8, + "name": "gateways", + "type": "string", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 5, + "name": "headers", + "type": "StringMatch" + } + }, + { + "key_type": "string", + "field": { + "id": 7, + "name": "source_labels", + "type": "string" + } + } + ] + }, + { + "name": "HTTPRouteDestination", + "fields": [ + { + "id": 1, + "name": "destination", + "type": "Destination" + }, + { + "id": 2, + "name": "weight", + "type": "int32" + }, + { + "id": 3, + "name": "remove_response_headers", + "type": "string", + "is_repeated": true + }, + { + "id": 5, + "name": "remove_request_headers", + "type": "string", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 4, + "name": "append_response_headers", + "type": "string" + } + }, + { + "key_type": "string", + "field": { + "id": 6, + "name": "append_request_headers", + "type": "string" + } + } + ] + }, + { + "name": "RouteDestination", + "fields": [ + { + "id": 1, + "name": "destination", + "type": "Destination" + }, + { + "id": 2, + "name": "weight", + "type": "int32" + } + ] + }, + { + "name": "L4MatchAttributes", + "fields": [ + { + "id": 1, + "name": "destination_subnets", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "port", + "type": "uint32" + }, + { + "id": 3, + "name": "source_subnet", + "type": "string" + }, + { + "id": 5, + "name": "gateways", + "type": "string", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 4, + "name": "source_labels", + "type": "string" + } + } + ] + }, + { + "name": "TLSMatchAttributes", + "fields": [ + { + "id": 1, + "name": "sni_hosts", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "destination_subnets", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "port", + "type": "uint32" + }, + { + "id": 4, + "name": "source_subnet", + "type": "string" + }, + { + "id": 6, + "name": "gateways", + "type": "string", + "is_repeated": true + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 5, + "name": "source_labels", + "type": "string" + } + } + ] + }, + { + "name": "HTTPRedirect", + "fields": [ + { + "id": 1, + "name": "uri", + "type": "string" + }, + { + "id": 2, + "name": "authority", + "type": "string" + } + ] + }, + { + "name": "HTTPRewrite", + "fields": [ + { + "id": 1, + "name": "uri", + "type": "string" + }, + { + "id": 2, + "name": "authority", + "type": "string" + } + ] + }, + { + "name": "StringMatch", + "fields": [ + { + "id": 1, + "name": "exact", + "type": "string" + }, + { + "id": 2, + "name": "prefix", + "type": "string" + }, + { + "id": 3, + "name": "regex", + "type": "string" + } + ] + }, + { + "name": "HTTPRetry", + "fields": [ + { + "id": 1, + "name": "attempts", + "type": "int32" + }, + { + "id": 2, + "name": "per_try_timeout", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "CorsPolicy", + "fields": [ + { + "id": 1, + "name": "allow_origin", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "allow_methods", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "allow_headers", + "type": "string", + "is_repeated": true + }, + { + "id": 4, + "name": "expose_headers", + "type": "string", + "is_repeated": true + }, + { + "id": 5, + "name": "max_age", + "type": "google.protobuf.Duration" + }, + { + "id": 6, + "name": "allow_credentials", + "type": "google.protobuf.BoolValue" + } + ] + }, + { + "name": "HTTPFaultInjection", + "fields": [ + { + "id": 1, + "name": "delay", + "type": "Delay" + }, + { + "id": 2, + "name": "abort", + "type": "Abort" + } + ], + "messages": [ + { + "name": "Delay", + "fields": [ + { + "id": 1, + "name": "percent", + "type": "int32" + }, + { + "id": 2, + "name": "fixed_delay", + "type": "google.protobuf.Duration" + }, + { + "id": 3, + "name": "exponential_delay", + "type": "google.protobuf.Duration" + }, + { + "id": 5, + "name": "percentage", + "type": "Percent" + } + ] + }, + { + "name": "Abort", + "fields": [ + { + "id": 1, + "name": "percent", + "type": "int32" + }, + { + "id": 2, + "name": "http_status", + "type": "int32" + }, + { + "id": 3, + "name": "grpc_status", + "type": "string" + }, + { + "id": 4, + "name": "http2_error", + "type": "string" + }, + { + "id": 5, + "name": "percentage", + "type": "Percent" + } + ] + } + ] + }, + { + "name": "PortSelector", + "fields": [ + { + "id": 1, + "name": "number", + "type": "uint32" + }, + { + "id": 2, + "name": "name", + "type": "string" + } + ] + }, + { + "name": "Percent", + "fields": [ + { + "id": 1, + "name": "value", + "type": "double" + } + ] + } + ] + } + }, + { + "protopath": "policy:/:v1beta1:/:cfg.proto", + "def": { + "enums": [ + { + "name": "HeaderOperationTemplate.Operation", + "enum_fields": [ + { + "name": "REPLACE", + "integer": 0 + }, + { + "name": "REMOVE", + "integer": 1 + }, + { + "name": "APPEND", + "integer": 2 + } + ] + }, + { + "name": "FractionalPercent.DenominatorType", + "enum_fields": [ + { + "name": "HUNDRED", + "integer": 0 + }, + { + "name": "TEN_THOUSAND", + "integer": 1 + } + ] + } + ], + "messages": [ + { + "name": "AttributeManifest", + "fields": [ + { + "id": 1, + "name": "revision", + "type": "string" + }, + { + "id": 2, + "name": "name", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "attributes", + "type": "AttributeInfo" + } + } + ], + "messages": [ + { + "name": "AttributeInfo", + "fields": [ + { + "id": 1, + "name": "description", + "type": "string" + }, + { + "id": 2, + "name": "value_type", + "type": "istio.policy.v1beta1.ValueType" + } + ] + } + ] + }, + { + "name": "Rule", + "fields": [ + { + "id": 1, + "name": "match", + "type": "string" + }, + { + "id": 2, + "name": "actions", + "type": "Action", + "is_repeated": true + }, + { + "id": 3, + "name": "request_header_operations", + "type": "HeaderOperationTemplate", + "is_repeated": true + }, + { + "id": 4, + "name": "response_header_operations", + "type": "HeaderOperationTemplate", + "is_repeated": true + }, + { + "id": 5, + "name": "sampling", + "type": "Sampling" + } + ], + "messages": [ + { + "name": "HeaderOperationTemplate", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 2, + "name": "values", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "operation", + "type": "Operation" + } + ] + } + ] + }, + { + "name": "Action", + "fields": [ + { + "id": 2, + "name": "handler", + "type": "string" + }, + { + "id": 3, + "name": "instances", + "type": "string", + "is_repeated": true + }, + { + "id": 4, + "name": "name", + "type": "string" + } + ] + }, + { + "name": "Instance", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 67794676, + "name": "compiled_template", + "type": "string" + }, + { + "id": 2, + "name": "template", + "type": "string" + }, + { + "id": 3, + "name": "params", + "type": "google.protobuf.Struct" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 4, + "name": "attribute_bindings", + "type": "string" + } + } + ] + }, + { + "name": "Handler", + "fields": [ + { + "id": 1, + "name": "name", + "type": "string" + }, + { + "id": 67794676, + "name": "compiled_adapter", + "type": "string" + }, + { + "id": 2, + "name": "adapter", + "type": "string" + }, + { + "id": 3, + "name": "params", + "type": "google.protobuf.Struct" + }, + { + "id": 4, + "name": "connection", + "type": "Connection" + } + ] + }, + { + "name": "Connection", + "fields": [ + { + "id": 2, + "name": "address", + "type": "string" + }, + { + "id": 3, + "name": "timeout", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "Sampling", + "fields": [ + { + "id": 1, + "name": "random", + "type": "RandomSampling" + }, + { + "id": 2, + "name": "rate_limit", + "type": "RateLimitSampling" + } + ] + }, + { + "name": "RandomSampling", + "fields": [ + { + "id": 1, + "name": "attribute_expression", + "type": "string" + }, + { + "id": 2, + "name": "percent_sampled", + "type": "FractionalPercent" + }, + { + "id": 3, + "name": "use_independent_randomness", + "type": "bool" + } + ] + }, + { + "name": "RateLimitSampling", + "fields": [ + { + "id": 1, + "name": "sampling_duration", + "type": "google.protobuf.Duration" + }, + { + "id": 2, + "name": "max_unsampled_entries", + "type": "int64" + }, + { + "id": 3, + "name": "sampling_rate", + "type": "int64" + } + ] + }, + { + "name": "FractionalPercent", + "fields": [ + { + "id": 1, + "name": "numerator", + "type": "uint32" + }, + { + "id": 2, + "name": "denominator", + "type": "DenominatorType" + } + ] + } + ] + } + }, + { + "protopath": "policy:/:v1beta1:/:type.proto", + "def": { + "messages": [ + { + "name": "Value", + "fields": [ + { + "id": 1, + "name": "string_value", + "type": "string" + }, + { + "id": 2, + "name": "int64_value", + "type": "int64" + }, + { + "id": 3, + "name": "double_value", + "type": "double" + }, + { + "id": 4, + "name": "bool_value", + "type": "bool" + }, + { + "id": 5, + "name": "ip_address_value", + "type": "IPAddress" + }, + { + "id": 6, + "name": "timestamp_value", + "type": "TimeStamp" + }, + { + "id": 7, + "name": "duration_value", + "type": "Duration" + }, + { + "id": 8, + "name": "email_address_value", + "type": "EmailAddress" + }, + { + "id": 9, + "name": "dns_name_value", + "type": "DNSName" + }, + { + "id": 10, + "name": "uri_value", + "type": "Uri" + } + ] + }, + { + "name": "IPAddress", + "fields": [ + { + "id": 1, + "name": "value", + "type": "bytes" + } + ] + }, + { + "name": "Duration", + "fields": [ + { + "id": 1, + "name": "value", + "type": "google.protobuf.Duration" + } + ] + }, + { + "name": "TimeStamp", + "fields": [ + { + "id": 1, + "name": "value", + "type": "google.protobuf.Timestamp" + } + ] + }, + { + "name": "DNSName", + "fields": [ + { + "id": 1, + "name": "value", + "type": "string" + } + ] + }, + { + "name": "EmailAddress", + "fields": [ + { + "id": 1, + "name": "value", + "type": "string" + } + ] + }, + { + "name": "Uri", + "fields": [ + { + "id": 1, + "name": "value", + "type": "string" + } + ] + } + ] + } + }, + { + "protopath": "policy:/:v1beta1:/:value_type.proto", + "def": { + "enums": [ + { + "name": "ValueType", + "enum_fields": [ + { + "name": "VALUE_TYPE_UNSPECIFIED", + "integer": 0 + }, + { + "name": "STRING", + "integer": 1 + }, + { + "name": "INT64", + "integer": 2 + }, + { + "name": "DOUBLE", + "integer": 3 + }, + { + "name": "BOOL", + "integer": 4 + }, + { + "name": "TIMESTAMP", + "integer": 5 + }, + { + "name": "IP_ADDRESS", + "integer": 6 + }, + { + "name": "EMAIL_ADDRESS", + "integer": 7 + }, + { + "name": "URI", + "integer": 8 + }, + { + "name": "DNS_NAME", + "integer": 9 + }, + { + "name": "DURATION", + "integer": 10 + }, + { + "name": "STRING_MAP", + "integer": 11 + } + ] + } + ] + } + }, + { + "protopath": "rbac:/:v1alpha1:/:rbac.proto", + "def": { + "enums": [ + { + "name": "EnforcementMode", + "enum_fields": [ + { + "name": "ENFORCED", + "integer": 0 + }, + { + "name": "PERMISSIVE", + "integer": 1 + } + ] + }, + { + "name": "RbacConfig.Mode", + "enum_fields": [ + { + "name": "OFF", + "integer": 0 + }, + { + "name": "ON", + "integer": 1 + }, + { + "name": "ON_WITH_INCLUSION", + "integer": 2 + }, + { + "name": "ON_WITH_EXCLUSION", + "integer": 3 + } + ] + } + ], + "messages": [ + { + "name": "ServiceRole", + "fields": [ + { + "id": 1, + "name": "rules", + "type": "AccessRule", + "is_repeated": true + } + ] + }, + { + "name": "AccessRule", + "fields": [ + { + "id": 1, + "name": "services", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "paths", + "type": "string", + "is_repeated": true + }, + { + "id": 3, + "name": "methods", + "type": "string", + "is_repeated": true + }, + { + "id": 4, + "name": "constraints", + "type": "Constraint", + "is_repeated": true + } + ], + "messages": [ + { + "name": "Constraint", + "fields": [ + { + "id": 1, + "name": "key", + "type": "string" + }, + { + "id": 2, + "name": "values", + "type": "string", + "is_repeated": true + } + ] + } + ] + }, + { + "name": "ServiceRoleBinding", + "fields": [ + { + "id": 1, + "name": "subjects", + "type": "Subject", + "is_repeated": true + }, + { + "id": 2, + "name": "roleRef", + "type": "RoleRef" + }, + { + "id": 3, + "name": "mode", + "type": "EnforcementMode" + } + ] + }, + { + "name": "Subject", + "fields": [ + { + "id": 1, + "name": "user", + "type": "string" + }, + { + "id": 2, + "name": "group", + "type": "string" + } + ], + "maps": [ + { + "key_type": "string", + "field": { + "id": 3, + "name": "properties", + "type": "string" + } + } + ] + }, + { + "name": "RoleRef", + "fields": [ + { + "id": 1, + "name": "kind", + "type": "string" + }, + { + "id": 2, + "name": "name", + "type": "string" + } + ] + }, + { + "name": "RbacConfig", + "fields": [ + { + "id": 1, + "name": "mode", + "type": "Mode" + }, + { + "id": 2, + "name": "inclusion", + "type": "Target" + }, + { + "id": 3, + "name": "exclusion", + "type": "Target" + }, + { + "id": 4, + "name": "enforcement_mode", + "type": "EnforcementMode" + } + ], + "messages": [ + { + "name": "Target", + "fields": [ + { + "id": 1, + "name": "services", + "type": "string", + "is_repeated": true + }, + { + "id": 2, + "name": "namespaces", + "type": "string", + "is_repeated": true + } + ] + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/prow/api-presubmit.sh b/prow/api-presubmit.sh index b879e9803b..62baa836f6 100755 --- a/prow/api-presubmit.sh +++ b/prow/api-presubmit.sh @@ -41,11 +41,12 @@ ROOT=$(dirname $WD) cd ${ROOT} ./scripts/generate-protos.sh || die "Could not generate *.pb.go" +make proto-commit || die "Could not commit new proto.lock" if [[ -n $(git status --porcelain) ]]; then git status git diff - die "Repo has unstaged changes. Re-run ./scripts/generate-protos.sh" + die "Repo has unstaged changes. Re-run ./scripts/generate-protos.sh or make proto-commit" fi exit 0 diff --git a/scripts/pre-commit b/scripts/pre-commit index 1c4dfe873f..8fca5f1cc1 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -32,4 +32,7 @@ if [ $BRANCH_NAME != '(no branch)' ]; then echo "generating pb.go files..." scripts/generate-protos.sh + + echo "Updating proto.lock" + make proto-commit fi diff --git a/docker/Dockerfile b/tools/protoc/Dockerfile similarity index 100% rename from docker/Dockerfile rename to tools/protoc/Dockerfile diff --git a/docker/build-and-push.sh b/tools/protoc/build-and-push.sh similarity index 100% rename from docker/build-and-push.sh rename to tools/protoc/build-and-push.sh diff --git a/tools/protolock/Dockerfile b/tools/protolock/Dockerfile new file mode 100644 index 0000000000..fed68f2583 --- /dev/null +++ b/tools/protolock/Dockerfile @@ -0,0 +1,19 @@ +FROM alpine:3.7 as builder +RUN apk update +RUN apk add --no-cache go>1.10 git build-base +ENV GOPATH=/go \ + PATH=/go/bin/:$PATH \ + OUTDIR=/out +RUN mkdir -p ${OUTDIR}/usr/bin/ +RUN go get -u -v -ldflags '-w -s' \ + github.com/nilslice/protolock/... \ + && install ${GOPATH}/bin/protolock ${OUTDIR}/usr/bin/ + +FROM znly/upx as packer +COPY --from=builder /out/ /out/ +RUN upx --lzma \ + /out/usr/bin/protolock + +FROM alpine:3.7 +COPY --from=packer /out/ / +ENTRYPOINT ["/usr/bin/protolock"] diff --git a/tools/protolock/build-and-push.sh b/tools/protolock/build-and-push.sh new file mode 100755 index 0000000000..83473eb004 --- /dev/null +++ b/tools/protolock/build-and-push.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# This is a temporary script, only to be used until we have a better official +# place and procedure for generation. PLEASE use with caution +# (read: not for general usage). + +HUB=gcr.io/istio-testing +VERSION=$(date +%Y-%m-%d) + +docker build --no-cache -t $HUB/protolock:$VERSION . + +gcloud docker -- push $HUB/protolock:$VERSION From c44b2e41fb6c50a269504ee12e0f95b35c9765b7 Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Wed, 24 Oct 2018 10:49:01 -0700 Subject: [PATCH 2/4] Add combined image to be used on CircleCI --- tools/all/Dockerfile | 9 +++++++++ tools/all/build-and-push.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tools/all/Dockerfile create mode 100755 tools/all/build-and-push.sh diff --git a/tools/all/Dockerfile b/tools/all/Dockerfile new file mode 100644 index 0000000000..76de314f9d --- /dev/null +++ b/tools/all/Dockerfile @@ -0,0 +1,9 @@ +FROM gcr.io/istio-testing/protolock:2018-10-23 as protolock + +FROM gcr.io/istio-testing/protoc:2018-06-12 + +COPY --from=protolock \ + /usr/bin/protolock \ + /usr/bin/ + +ENTRYPOINT [] diff --git a/tools/all/build-and-push.sh b/tools/all/build-and-push.sh new file mode 100755 index 0000000000..4f4a2d5eb3 --- /dev/null +++ b/tools/all/build-and-push.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# This is a temporary script, only to be used until we have a better official +# place and procedure for generation. PLEASE use with caution +# (read: not for general usage). + +HUB=gcr.io/istio-testing +VERSION=$(date +%Y-%m-%d) + +docker build --no-cache -t $HUB/api-build-tools:$VERSION . + +gcloud docker -- push $HUB/api-build-tools:$VERSION From e87f2dc386fcc6b8e585366cc76bf96dbbc78d59 Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Wed, 24 Oct 2018 16:04:30 -0700 Subject: [PATCH 3/4] Update proto.lock for policy_check_fail_open in mesh config. --- proto.lock | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proto.lock b/proto.lock index 987d89fcbf..f16673fcf3 100644 --- a/proto.lock +++ b/proto.lock @@ -659,6 +659,11 @@ "name": "disable_policy_checks", "type": "bool" }, + { + "id": 25, + "name": "policy_check_fail_open", + "type": "bool" + }, { "id": 4, "name": "proxy_listen_port", From a199b1866f59add0886df56fca40b04dcfaae729 Mon Sep 17 00:00:00 2001 From: Jeff Mendoza Date: Tue, 30 Oct 2018 09:37:40 -0700 Subject: [PATCH 4/4] Updade circle config. --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f333c3acbb..c081c13298 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 defaults: &defaults working_directory: /src/istio.io/api docker: - - image: gcr.io/istio-testing/protoc:2018-06-12 + - image: gcr.io/istio-testing/api-build-tools:2018-10-24 environment: GOPATH: /go OUT_PATH: /src @@ -15,10 +15,11 @@ jobs: - run: command: | ./scripts/generate-protos.sh || die "could not generate *.pb.go" + make proto-commit || die "could not regenerate proto.lock" if [[ -n $(git status --porcelain) ]]; then git status git --no-pager diff - echo "Repo has unstaged changes. Re-run ./scripts/generate-protos.sh" + echo "Repo has unstaged changes. Re-run ./scripts/generate-protos.sh or make proto-commit" exit 1 fi