github.com/microsoft/moc@v0.17.1/rpc/cloudagent/security/certificate/moc_cloudagent_certificate.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 import "google/protobuf/wrappers.proto"; 8 import "moc_common_common.proto"; 9 10 enum CertificateType { 11 Client = 0; 12 Server = 1; 13 } 14 15 message CertificateRequest { 16 repeated Certificate Certificates = 1; 17 } 18 19 message CSRRequest { 20 repeated CertificateSigningRequest CSRs = 1; 21 } 22 23 message CertificateResponse { 24 repeated Certificate Certificates = 1; 25 google.protobuf.BoolValue Result = 2; 26 string Error = 3; 27 } 28 29 message CertificateSigningRequest { 30 string name = 1; 31 string csr = 2 [(sensitive) = true]; 32 string oldCertificate = 3 [(sensitive) = true]; 33 Status status = 4; 34 string caName = 5; 35 string groupName = 6; 36 string vaultName = 7; 37 string locationName = 8; 38 string identity = 9; 39 int64 validity = 10; 40 google.protobuf.BoolValue isCA = 11; 41 } 42 43 message Certificate { 44 string name = 1; 45 string id = 2; 46 int64 notBefore = 3; 47 int64 notAfter = 4; 48 string certificate = 5 [(sensitive) = true]; 49 Status status = 6; 50 CertificateType type = 7; 51 string groupName = 8; 52 string vaultName = 9; 53 string locationName = 10; 54 Tags tags = 11; 55 } 56 57 service CertificateAgent { 58 rpc CreateOrUpdate(CertificateRequest) returns (CertificateResponse) {} 59 rpc Get(CertificateRequest) returns (CertificateResponse) {} 60 rpc Delete(CertificateRequest) returns (CertificateResponse) {} 61 rpc Sign(CSRRequest) returns (CertificateResponse) {} 62 rpc Renew(CSRRequest) returns (CertificateResponse) {} 63 }