github.com/microsoft/moc@v0.17.1/rpc/cloudagent/security/keyvault/key/moc_cloudagent_key.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 13 message KeyRequest { 14 repeated Key Keys = 1; 15 Operation OperationType = 2; 16 } 17 18 message KeyResponse { 19 repeated Key Keys = 1; 20 google.protobuf.BoolValue Result = 2; 21 string Error = 3; 22 } 23 24 message KeyOperationRequest { 25 Key key = 1; 26 string Data = 2 [(sensitive) = true]; 27 Algorithm algorithm = 3; 28 KeyOperation OBSOLETE_OperationType = 4 [deprecated=true]; 29 SignVerifyParams SignVerifyParams = 5; 30 ProviderAccessOperation OperationType = 6; 31 } 32 33 message KeyOperationResponse { 34 string Data = 1 [(sensitive) = true]; 35 google.protobuf.BoolValue Result = 2; 36 string Error = 3; 37 } 38 39 message PrivateKeyWrappingInfo { 40 string WrappingKeyName = 1; 41 bytes WrappingKeyPublic = 2 [(sensitive) = true]; 42 KeyWrappingAlgorithm WrappingAlgorithm = 3; 43 } 44 45 message SignVerifyParams { 46 JSONWebKeySignatureAlgorithm algorithm = 1; 47 string signature = 2 [(sensitive) = true]; 48 } 49 50 message Key { 51 string name = 1; 52 string id = 2; 53 string locationName = 3; 54 // Public Key Value 55 bytes publicKey = 4 [(sensitive) = true]; 56 JsonWebKeyType type = 5; 57 string vaultName = 6; 58 string groupName = 7; 59 Status status = 8; 60 KeySize size = 9; 61 JsonWebKeyCurveName curve = 10; 62 repeated KeyOperation keyOps = 11; 63 Tags tags = 12; 64 int64 keyRotationFrequencyInSeconds = 13; 65 // Private Key Value and wrapping information 66 bytes privateKey = 14 [(sensitive) = true]; 67 PrivateKeyWrappingInfo privateKeyWrappingInfo = 15; 68 } 69 70 service KeyAgent { 71 rpc Invoke(KeyRequest) returns (KeyResponse) {} 72 rpc Operate(KeyOperationRequest) returns (KeyOperationResponse) {} 73 }