|
| 1 | +// Copyright 2017 Istio Authors |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +import "mixer/v1/attributes.proto"; |
| 18 | +import "mixer/v1/config/client/api_spec.proto"; |
| 19 | +import "mixer/v1/config/client/quota.proto"; |
| 20 | + |
| 21 | +package istio.mixer.v1.config.client; |
| 22 | + |
| 23 | +// Defines mixer control config. |
| 24 | +// It is per-route for upstream if it is from Envoy route opaque config. |
| 25 | +message MixerControlConfig { |
| 26 | + // If true, call Mixer Check. |
| 27 | + bool enable_mixer_check = 1; |
| 28 | + |
| 29 | + // If true, call Mixer Report. |
| 30 | + bool enable_mixer_Report = 2; |
| 31 | + |
| 32 | + // If true, disable forwarding any attributes to upstream. |
| 33 | + bool disable_forward_attributes = 3; |
| 34 | + |
| 35 | + // Send these attributes to Mixer in both Check and Report. |
| 36 | + Attributes mixer_attributes = 4; |
| 37 | + |
| 38 | + // Forward these attributes to upstream. |
| 39 | + Attributes forward_attributes = 5; |
| 40 | + |
| 41 | + // API specifications to generate API attributes. |
| 42 | + repeated APISpec api_spec = 6; |
| 43 | + |
| 44 | + // Quota specifications to generate quota requirements. |
| 45 | + repeated QuotaSpec quota_spec = 7; |
| 46 | +} |
| 47 | + |
| 48 | +// Specifies config for Envoy Mixer HTTP filter and TCP filter. |
| 49 | +message MixerFilterConfig { |
| 50 | + // The flag to disable check cache. |
| 51 | + bool disable_check_cache = 1; |
| 52 | + |
| 53 | + // The flag to disable quota cache. |
| 54 | + bool disable_quota_cache = 2; |
| 55 | + |
| 56 | + // The flag to disable report batch. |
| 57 | + bool disable_report_batch = 3; |
| 58 | + |
| 59 | + enum NetworkFailPolicy { |
| 60 | + // If network fails, request is passed to the backend. |
| 61 | + FAIL_OPEN = 0; |
| 62 | + // If network fails, request is rejected. |
| 63 | + FAIL_CLOSE = 1; |
| 64 | + } |
| 65 | + // Specifies the policy when failed to connect to Mixer server. |
| 66 | + NetworkFailPolicy network_fail_policy = 4; |
| 67 | + |
| 68 | + // Specifies the default Mixer control config. |
| 69 | + // If one is defined in upstream route table, per-route mixer control config |
| 70 | + // takes precedence over the default mixer control config. |
| 71 | + MixerControlConfig control_config = 5; |
| 72 | +} |
0 commit comments