github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/identity.proto (about) 1 // Copyright 2017 Intel Corporation 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 16 syntax = "proto3"; 17 18 option java_multiple_files = true; 19 option java_package = "sawtooth.identity.protobuf"; 20 21 message Policy { 22 23 enum EntryType { 24 ENTRY_TYPE_UNSET = 0; 25 PERMIT_KEY = 1; 26 DENY_KEY = 2; 27 } 28 29 message Entry { 30 // Whether this is a Permit_KEY or Deny_KEY entry 31 EntryType type = 1; 32 33 // This should be a list of public keys or * to refer to all participants. 34 // If using *, it should be the only key in the list. 35 string key = 2; 36 } 37 38 // name of the policy, this should be unique. 39 string name = 1; 40 41 // list of Entries 42 // The entries will be processed in order from first to last. 43 repeated Entry entries = 2; 44 } 45 46 // Policy will be stored in a Policy list to account for state collisions 47 message PolicyList { 48 repeated Policy policies = 1; 49 } 50 51 52 message Role { 53 // Role name 54 string name = 1; 55 56 // Name of corresponding policy 57 string policy_name = 2; 58 } 59 60 // Roles will be stored in a RoleList to account for state collisions 61 message RoleList { 62 repeated Role roles = 1; 63 }