1// Copyright 2018 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 15syntax = "proto3"; 16 17// adapter config for policy backend. 18package policy; 19 20import "gogoproto/gogo.proto"; 21import "google/protobuf/duration.proto"; 22 23option go_package="policy"; 24 25// Config for policy backend, which could be used as a fake adapter for integration test, 26// supports checknothing and keyval template. 27message Params { 28 // Check params which controls check result returned by policy backend. 29 message CheckParams { 30 // Controls that request should be allowed or not. 31 bool check_allow = 1; 32 33 // Valid duration of the check result. 34 google.protobuf.Duration valid_duration = 2; 35 36 // Valid request count of the check result. 37 int64 valid_count = 3; 38 } 39 40 // Specify check related params. 41 CheckParams check_params = 1; 42 43 // Specify route directive related params. 44 map<string, string> table = 2; 45} 46