diff --git a/docs/BUILD b/docs/BUILD index 176200ed..922ba916 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -12,6 +12,7 @@ package_group( proto_library( name = "protos", deps = [ + "//envoy/admin/v2alpha:certs", "//envoy/admin/v2alpha:clusters", "//envoy/admin/v2alpha:config_dump", "//envoy/admin/v2alpha:memory", diff --git a/envoy/admin/v2alpha/BUILD b/envoy/admin/v2alpha/BUILD index ffe447ed..a059ae42 100644 --- a/envoy/admin/v2alpha/BUILD +++ b/envoy/admin/v2alpha/BUILD @@ -37,3 +37,9 @@ api_proto_library_internal( srcs = ["memory.proto"], visibility = ["//visibility:public"], ) + +api_proto_library_internal( + name = "certs", + srcs = ["certs.proto"], + visibility = ["//visibility:public"], +) diff --git a/envoy/admin/v2alpha/certs.proto b/envoy/admin/v2alpha/certs.proto new file mode 100644 index 00000000..98165209 --- /dev/null +++ b/envoy/admin/v2alpha/certs.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package envoy.admin.v2alpha; + +// [#protodoc-title: Certificates] + +// Proto representation of certificate details. Admin endpoint uses this wrapper for `/certs` to +// display certificate information. See :ref:`/certs ` for more +// information. +message Certificates { + // List of certificates known to an Envoy. + repeated Certificate certificates = 1; +} + +message Certificate { + + // Details of CA certificate. + repeated CertificateDetails ca_cert = 1; + + // Details of Certificate Chain + repeated CertificateDetails cert_chain = 2; +} + +message CertificateDetails { + // Path of the certificate. + string path = 1; + + // Certificate Serial Number. + string serial_number = 2; + + // List of Subject Alternate names. + repeated SubjectAlternateName subject_alt_names = 3; + + // Minimum of days until expiration of certificate and it's chain. + uint64 days_until_expiration = 4; +} + +message SubjectAlternateName { + + // Subject Alternate Name. + oneof name { + string dns = 1; + string uri = 2; + } +}