github.com/microsoft/moc@v0.17.1/rpc/cloudagent/security/role/moc_cloudagent_role.proto (about) 1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the Apache v2.0 license. 3 4 syntax = "proto3"; 5 option go_package = "github.com/microsoft/moc/rpc/cloudagent/security"; 6 package moc.cloudagent.security; 7 8 import "google/protobuf/wrappers.proto"; 9 import "moc_common_common.proto"; 10 import "moc_common_security.proto"; 11 12 enum GeneralAccessOperation { 13 Unspecified = 0; 14 Read = 1; 15 Write = 2; 16 Delete = 3; 17 All = 4; 18 ProviderAction = 5; 19 } 20 21 enum AccessOperation { 22 OBSOLETE_Read = 0 [deprecated=true]; 23 OBSOLETE_Write = 1 [deprecated=true]; 24 OBSOLETE_Delete = 2 [deprecated=true]; 25 OBSOLETE_All = 3 [deprecated=true]; 26 } 27 28 message RoleRequest { 29 repeated Role Roles = 1; 30 Operation OperationType = 2; 31 } 32 33 message RoleResponse { 34 repeated Role Roles = 1; 35 google.protobuf.BoolValue Result = 2; 36 string Error = 3; 37 } 38 39 message Action { 40 AccessOperation operation = 1 [deprecated=true]; 41 // ProviderType the rule works on 42 ProviderType providerType = 2; 43 // General access permissions 44 GeneralAccessOperation generalOperation = 3; 45 // Provider specific access permissions 46 ProviderAccessOperation providerOperation = 4; 47 } 48 49 message Permission { 50 repeated Action actions = 1; 51 repeated Action notActions = 2; 52 } 53 54 message Role { 55 string name = 1; 56 string id = 2; 57 // The scopes to which this role can be applied 58 repeated Scope assignableScopes = 3; 59 repeated Permission permissions = 4; 60 Status status = 6; 61 Tags tags = 7; 62 } 63 64 service RoleAgent { 65 rpc Invoke(RoleRequest) returns (RoleResponse) {} 66 } 67