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