blob: 53982571d478a117cba113a13b4a5cef89b66a89 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 dubbo.apache.org.v1alpha1;
option java_multiple_files = true;
message AuthorizationPolicyToClient {
string key = 1;
AuthorizationPolicySpecToClient spec = 2;
}
message AuthorizationPolicySpecToClient {
string action = 1;
repeated AuthorizationPolicyRuleToClient rules = 2;
float samples = 3;
float order = 4;
string matchType = 5;
}
message AuthorizationPolicyRuleToClient {
AuthorizationPolicySource from = 1;
AuthorizationPolicyCondition when = 2;
}
message AuthorizationPolicy {
string action = 1;
repeated AuthorizationPolicyRule rules = 2;
float samples = 3;
float order = 4;
string matchType = 5;
}
message AuthorizationPolicyRule {
AuthorizationPolicySource from = 1;
AuthorizationPolicyTarget to = 2;
AuthorizationPolicyCondition when = 3;
}
message AuthorizationPolicySource {
repeated string namespaces = 1;
repeated string notNamespaces = 2;
repeated string ipBlocks = 3;
repeated string notIpBlocks = 4;
repeated string principals = 5;
repeated string notPrincipals = 6;
repeated AuthorizationPolicyExtend extends = 7;
repeated AuthorizationPolicyExtend notExtends = 8;
}
message AuthorizationPolicyTarget {
repeated string namespaces = 1;
repeated string notNamespaces = 2;
repeated string ipBlocks = 3;
repeated string notIpBlocks = 4;
repeated string principals = 5;
repeated string notPrincipals = 6;
repeated AuthorizationPolicyExtend extends = 7;
repeated AuthorizationPolicyExtend notExtends = 8;
}
message AuthorizationPolicyCondition {
string key = 1;
repeated AuthorizationPolicyMatch values = 2;
repeated AuthorizationPolicyMatch notValues = 3;
}
message AuthorizationPolicyMatch {
string type = 1;
string value = 2;
}
message AuthorizationPolicyExtend {
string key = 1;
string value = 2;
}