github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/apps/newfileproxy/common/services_rpc.proto (about) 1 // Copyright (c) 2016, Google Inc. All rights reserved. 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 = "proto2"; 16 package common; 17 18 enum ServiceType { 19 REQUEST_CHALLENGE = 1; 20 CHALLENGE_RESPONSE = 2; 21 SIGNED_CHALLENGE = 3; 22 CREATE = 4; 23 DELETE = 5; 24 ADDREADER = 6; 25 ADDOWNER = 7; 26 ADDWRITER = 8; 27 DELETEREADER = 9; 28 DELETEOWNER = 10; 29 DELETEWRITER = 11; 30 READ = 12; 31 WRITE = 13; 32 SAVESTATE = 14; 33 NONE = 15; 34 } 35 36 // A FileproxyMessage is a message sent between fileproxy programs 37 // as the data payload of a taosupport SimpleMessage. 38 message FileproxyMessage { 39 required ServiceType type_of_service = 1; 40 optional string err = 2; 41 // For READ and WRITE, this is the total number of buffers constituting file. 42 optional int32 num_total_buffers = 3; 43 // For READ and WRITE, this is the sequence number of this buffer. 44 optional int32 current_buffer = 4; 45 // Arguments apply to the following calls and are call dependent. 46 // For CREATE, resourcename, type ("file" or "directory") 47 // For DELETE, resource name 48 // For READ, resource name 49 // For WRITE, resource name 50 // For ADDREADER, resource name 51 // For ADDOWNER, resource name 52 // For ADDWRITER, resource name 53 // For DELETEREADER, resource name 54 // For DELETEOWNER, resource name 55 // For DELETEWRITER, resource name 56 repeated string arguments = 5; 57 // data is message specific 58 // For REQUEST_CHALLENGE, no data or arguments. 59 // For CHALLENGE, there should be one data blob which is the user x509 cert. 60 // For SIGNED_CHALLENGE, there should be two data blobs: a x509 cert and the signed nonce. 61 // For CREATE, list of compound certs 62 // For ADDREADER, list of compound certs 63 // For ADDOWNER, list of compound certs 64 // For ADDWRITER, list of compound certs 65 repeated bytes data = 6; 66 } 67 68 message UserKeyDataMessage { 69 optional bytes cert = 1; 70 optional bytes der_key = 2; 71 } 72 73 // User keys 74 message UserKeysMessage { 75 repeated bytes serialized_keys = 1; 76 }