Removed meshca.proto (#28535)

pull/28556/head
Esun Kim 3 years ago committed by GitHub
parent b2939f58d0
commit b38b706200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      BUILD
  2. 55
      src/core/ext/upb-generated/third_party/istio/security/proto/providers/google/meshca.upb.c
  3. 131
      src/core/ext/upb-generated/third_party/istio/security/proto/providers/google/meshca.upb.h
  4. 47
      src/core/ext/upbdefs-generated/third_party/istio/security/proto/providers/google/meshca.upbdefs.c
  5. 40
      src/core/ext/upbdefs-generated/third_party/istio/security/proto/providers/google/meshca.upbdefs.h
  6. 51
      third_party/istio/security/proto/providers/google/meshca.proto
  7. 1
      tools/codegen/core/gen_upb_api.sh

23
BUILD

@ -5599,29 +5599,6 @@ grpc_upb_proto_library(
deps = ["//src/proto/grpc/lb/v1:load_balancer_proto_descriptor"],
)
# Once upb code-gen issue is resolved, replace meshca_upb with this.
# meshca_upb_proto_library(
# name = "meshca_upb",
# deps = ["//third_party/istio/security/proto/providers/google:meshca_proto"],
# )
grpc_cc_library(
name = "meshca_upb",
srcs = [
"src/core/ext/upb-generated/third_party/istio/security/proto/providers/google/meshca.upb.c",
],
hdrs = [
"src/core/ext/upb-generated/third_party/istio/security/proto/providers/google/meshca.upb.h",
],
external_deps = [
"upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
],
language = "c++",
deps = [
"protobuf_duration_upb",
],
)
grpc_upb_proto_library(
name = "alts_upb",
deps = ["//src/proto/grpc/gcp:alts_handshaker_proto"],

@ -1,55 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* third_party/istio/security/proto/providers/google/meshca.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg_internal.h"
#include "third_party/istio/security/proto/providers/google/meshca.upb.h"
#include "google/protobuf/duration.upb.h"
#include "upb/port_def.inc"
static const upb_msglayout_sub google_security_meshca_v1_MeshCertificateRequest_submsgs[1] = {
{.submsg = &google_protobuf_Duration_msginit},
};
static const upb_msglayout_field google_security_meshca_v1_MeshCertificateRequest__fields[3] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, _UPB_MODE_SCALAR | (_UPB_REP_STRVIEW << _UPB_REP_SHIFT)},
{2, UPB_SIZE(12, 24), 0, 0, 9, _UPB_MODE_SCALAR | (_UPB_REP_STRVIEW << _UPB_REP_SHIFT)},
{3, UPB_SIZE(20, 40), 1, 0, 11, _UPB_MODE_SCALAR | (_UPB_REP_PTR << _UPB_REP_SHIFT)},
};
const upb_msglayout google_security_meshca_v1_MeshCertificateRequest_msginit = {
&google_security_meshca_v1_MeshCertificateRequest_submsgs[0],
&google_security_meshca_v1_MeshCertificateRequest__fields[0],
UPB_SIZE(24, 48), 3, _UPB_MSGEXT_NONE, 3, 255,
};
static const upb_msglayout_field google_security_meshca_v1_MeshCertificateResponse__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, _UPB_MODE_ARRAY | (_UPB_REP_PTR << _UPB_REP_SHIFT)},
};
const upb_msglayout google_security_meshca_v1_MeshCertificateResponse_msginit = {
NULL,
&google_security_meshca_v1_MeshCertificateResponse__fields[0],
UPB_SIZE(8, 8), 1, _UPB_MSGEXT_NONE, 1, 255,
};
static const upb_msglayout *messages_layout[2] = {
&google_security_meshca_v1_MeshCertificateRequest_msginit,
&google_security_meshca_v1_MeshCertificateResponse_msginit,
};
const upb_msglayout_file third_party_istio_security_proto_providers_google_meshca_proto_upb_file_layout = {
messages_layout,
NULL,
2,
0,
};
#include "upb/port_undef.inc"

@ -1,131 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* third_party/istio/security/proto/providers/google/meshca.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef THIRD_PARTY_ISTIO_SECURITY_PROTO_PROVIDERS_GOOGLE_MESHCA_PROTO_UPB_H_
#define THIRD_PARTY_ISTIO_SECURITY_PROTO_PROVIDERS_GOOGLE_MESHCA_PROTO_UPB_H_
#include "upb/msg_internal.h"
#include "upb/decode.h"
#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
struct google_security_meshca_v1_MeshCertificateRequest;
struct google_security_meshca_v1_MeshCertificateResponse;
typedef struct google_security_meshca_v1_MeshCertificateRequest google_security_meshca_v1_MeshCertificateRequest;
typedef struct google_security_meshca_v1_MeshCertificateResponse google_security_meshca_v1_MeshCertificateResponse;
extern const upb_msglayout google_security_meshca_v1_MeshCertificateRequest_msginit;
extern const upb_msglayout google_security_meshca_v1_MeshCertificateResponse_msginit;
struct google_protobuf_Duration;
extern const upb_msglayout google_protobuf_Duration_msginit;
/* google.security.meshca.v1.MeshCertificateRequest */
UPB_INLINE google_security_meshca_v1_MeshCertificateRequest *google_security_meshca_v1_MeshCertificateRequest_new(upb_arena *arena) {
return (google_security_meshca_v1_MeshCertificateRequest *)_upb_msg_new(&google_security_meshca_v1_MeshCertificateRequest_msginit, arena);
}
UPB_INLINE google_security_meshca_v1_MeshCertificateRequest *google_security_meshca_v1_MeshCertificateRequest_parse(const char *buf, size_t size,
upb_arena *arena) {
google_security_meshca_v1_MeshCertificateRequest *ret = google_security_meshca_v1_MeshCertificateRequest_new(arena);
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_security_meshca_v1_MeshCertificateRequest_msginit, arena)) return NULL;
return ret;
}
UPB_INLINE google_security_meshca_v1_MeshCertificateRequest *google_security_meshca_v1_MeshCertificateRequest_parse_ex(const char *buf, size_t size,
const upb_extreg *extreg, int options,
upb_arena *arena) {
google_security_meshca_v1_MeshCertificateRequest *ret = google_security_meshca_v1_MeshCertificateRequest_new(arena);
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_security_meshca_v1_MeshCertificateRequest_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
}
UPB_INLINE char *google_security_meshca_v1_MeshCertificateRequest_serialize(const google_security_meshca_v1_MeshCertificateRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_security_meshca_v1_MeshCertificateRequest_msginit, arena, len);
}
UPB_INLINE upb_strview google_security_meshca_v1_MeshCertificateRequest_request_id(const google_security_meshca_v1_MeshCertificateRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE upb_strview google_security_meshca_v1_MeshCertificateRequest_csr(const google_security_meshca_v1_MeshCertificateRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE bool google_security_meshca_v1_MeshCertificateRequest_has_validity(const google_security_meshca_v1_MeshCertificateRequest *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_Duration* google_security_meshca_v1_MeshCertificateRequest_validity(const google_security_meshca_v1_MeshCertificateRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Duration*); }
UPB_INLINE void google_security_meshca_v1_MeshCertificateRequest_set_request_id(google_security_meshca_v1_MeshCertificateRequest *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_security_meshca_v1_MeshCertificateRequest_set_csr(google_security_meshca_v1_MeshCertificateRequest *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void google_security_meshca_v1_MeshCertificateRequest_set_validity(google_security_meshca_v1_MeshCertificateRequest *msg, struct google_protobuf_Duration* value) {
_upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* google_security_meshca_v1_MeshCertificateRequest_mutable_validity(google_security_meshca_v1_MeshCertificateRequest *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)google_security_meshca_v1_MeshCertificateRequest_validity(msg);
if (sub == NULL) {
sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
if (!sub) return NULL;
google_security_meshca_v1_MeshCertificateRequest_set_validity(msg, sub);
}
return sub;
}
/* google.security.meshca.v1.MeshCertificateResponse */
UPB_INLINE google_security_meshca_v1_MeshCertificateResponse *google_security_meshca_v1_MeshCertificateResponse_new(upb_arena *arena) {
return (google_security_meshca_v1_MeshCertificateResponse *)_upb_msg_new(&google_security_meshca_v1_MeshCertificateResponse_msginit, arena);
}
UPB_INLINE google_security_meshca_v1_MeshCertificateResponse *google_security_meshca_v1_MeshCertificateResponse_parse(const char *buf, size_t size,
upb_arena *arena) {
google_security_meshca_v1_MeshCertificateResponse *ret = google_security_meshca_v1_MeshCertificateResponse_new(arena);
if (!ret) return NULL;
if (!upb_decode(buf, size, ret, &google_security_meshca_v1_MeshCertificateResponse_msginit, arena)) return NULL;
return ret;
}
UPB_INLINE google_security_meshca_v1_MeshCertificateResponse *google_security_meshca_v1_MeshCertificateResponse_parse_ex(const char *buf, size_t size,
const upb_extreg *extreg, int options,
upb_arena *arena) {
google_security_meshca_v1_MeshCertificateResponse *ret = google_security_meshca_v1_MeshCertificateResponse_new(arena);
if (!ret) return NULL;
if (!_upb_decode(buf, size, ret, &google_security_meshca_v1_MeshCertificateResponse_msginit, extreg, options, arena)) {
return NULL;
}
return ret;
}
UPB_INLINE char *google_security_meshca_v1_MeshCertificateResponse_serialize(const google_security_meshca_v1_MeshCertificateResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_security_meshca_v1_MeshCertificateResponse_msginit, arena, len);
}
UPB_INLINE upb_strview const* google_security_meshca_v1_MeshCertificateResponse_cert_chain(const google_security_meshca_v1_MeshCertificateResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
UPB_INLINE upb_strview* google_security_meshca_v1_MeshCertificateResponse_mutable_cert_chain(google_security_meshca_v1_MeshCertificateResponse *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE upb_strview* google_security_meshca_v1_MeshCertificateResponse_resize_cert_chain(google_security_meshca_v1_MeshCertificateResponse *msg, size_t len, upb_arena *arena) {
return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_security_meshca_v1_MeshCertificateResponse_add_cert_chain(google_security_meshca_v1_MeshCertificateResponse *msg, upb_strview val, upb_arena *arena) {
return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
arena);
}
extern const upb_msglayout_file third_party_istio_security_proto_providers_google_meshca_proto_upb_file_layout;
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* THIRD_PARTY_ISTIO_SECURITY_PROTO_PROVIDERS_GOOGLE_MESHCA_PROTO_UPB_H_ */

@ -1,47 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* third_party/istio/security/proto/providers/google/meshca.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include "upb/def.h"
#include "third_party/istio/security/proto/providers/google/meshca.upbdefs.h"
#include "third_party/istio/security/proto/providers/google/meshca.upb.h"
extern upb_def_init google_protobuf_duration_proto_upbdefinit;
static const char descriptor[521] = {'\n', '>', 't', 'h', 'i', 'r', 'd', '_', 'p', 'a', 'r', 't', 'y', '/', 'i', 's', 't', 'i', 'o', '/', 's', 'e', 'c', 'u', 'r',
'i', 't', 'y', '/', 'p', 'r', 'o', 't', 'o', '/', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 's', '/', 'g', 'o', 'o', 'g', 'l',
'e', '/', 'm', 'e', 's', 'h', 'c', 'a', '.', 'p', 'r', 'o', 't', 'o', '\022', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '.', 's', 'e',
'c', 'u', 'r', 'i', 't', 'y', '.', 'm', 'e', 's', 'h', 'c', 'a', '.', 'v', '1', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/',
'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\"', '\200',
'\001', '\n', '\026', 'M', 'e', 's', 'h', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't',
'\022', '\035', '\n', '\n', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'i', 'd', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\t', 'r', 'e', 'q',
'u', 'e', 's', 't', 'I', 'd', '\022', '\020', '\n', '\003', 'c', 's', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\003', 'c', 's', 'r', '\022',
'5', '\n', '\010', 'v', 'a', 'l', 'i', 'd', 'i', 't', 'y', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l',
'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'v', 'a', 'l', 'i',
'd', 'i', 't', 'y', '\"', '8', '\n', '\027', 'M', 'e', 's', 'h', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'R', 'e',
's', 'p', 'o', 'n', 's', 'e', '\022', '\035', '\n', '\n', 'c', 'e', 'r', 't', '_', 'c', 'h', 'a', 'i', 'n', '\030', '\001', ' ', '\003', '(',
'\t', 'R', '\t', 'c', 'e', 'r', 't', 'C', 'h', 'a', 'i', 'n', '2', '\226', '\001', '\n', '\026', 'M', 'e', 's', 'h', 'C', 'e', 'r', 't',
'i', 'f', 'i', 'c', 'a', 't', 'e', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '|', '\n', '\021', 'C', 'r', 'e', 'a', 't', 'e', 'C',
'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', '1', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 's', 'e', 'c', 'u', 'r',
'i', 't', 'y', '.', 'm', 'e', 's', 'h', 'c', 'a', '.', 'v', '1', '.', 'M', 'e', 's', 'h', 'C', 'e', 'r', 't', 'i', 'f', 'i',
'c', 'a', 't', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '2', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 's', 'e', 'c', 'u',
'r', 'i', 't', 'y', '.', 'm', 'e', 's', 'h', 'c', 'a', '.', 'v', '1', '.', 'M', 'e', 's', 'h', 'C', 'e', 'r', 't', 'i', 'f',
'i', 'c', 'a', 't', 'e', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', 'B', '.', '\n', '\035', 'c', 'o', 'm', '.', 'g', 'o',
'o', 'g', 'l', 'e', '.', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'm', 'e', 's', 'h', 'c', 'a', '.', 'v', '1', 'B', '\013',
'M', 'e', 's', 'h', 'C', 'a', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
};
static upb_def_init *deps[2] = {
&google_protobuf_duration_proto_upbdefinit,
NULL
};
upb_def_init third_party_istio_security_proto_providers_google_meshca_proto_upbdefinit = {
deps,
&third_party_istio_security_proto_providers_google_meshca_proto_upb_file_layout,
"third_party/istio/security/proto/providers/google/meshca.proto",
UPB_STRVIEW_INIT(descriptor, 521)
};

@ -1,40 +0,0 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
* third_party/istio/security/proto/providers/google/meshca.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#ifndef THIRD_PARTY_ISTIO_SECURITY_PROTO_PROVIDERS_GOOGLE_MESHCA_PROTO_UPBDEFS_H_
#define THIRD_PARTY_ISTIO_SECURITY_PROTO_PROVIDERS_GOOGLE_MESHCA_PROTO_UPBDEFS_H_
#include "upb/def.h"
#include "upb/port_def.inc"
#ifdef __cplusplus
extern "C" {
#endif
#include "upb/def.h"
#include "upb/port_def.inc"
extern upb_def_init third_party_istio_security_proto_providers_google_meshca_proto_upbdefinit;
UPB_INLINE const upb_msgdef *google_security_meshca_v1_MeshCertificateRequest_getmsgdef(upb_symtab *s) {
_upb_symtab_loaddefinit(s, &third_party_istio_security_proto_providers_google_meshca_proto_upbdefinit);
return upb_symtab_lookupmsg(s, "google.security.meshca.v1.MeshCertificateRequest");
}
UPB_INLINE const upb_msgdef *google_security_meshca_v1_MeshCertificateResponse_getmsgdef(upb_symtab *s) {
_upb_symtab_loaddefinit(s, &third_party_istio_security_proto_providers_google_meshca_proto_upbdefinit);
return upb_symtab_lookupmsg(s, "google.security.meshca.v1.MeshCertificateResponse");
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#include "upb/port_undef.inc"
#endif /* THIRD_PARTY_ISTIO_SECURITY_PROTO_PROVIDERS_GOOGLE_MESHCA_PROTO_UPBDEFS_H_ */

@ -1,51 +0,0 @@
// Copyright 2019 Istio Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.security.meshca.v1;
import "google/protobuf/duration.proto";
option java_multiple_files = true;
option java_outer_classname = "MeshCaProto";
option java_package = "com.google.security.meshca.v1";
// Certificate request message.
message MeshCertificateRequest {
// The request ID must be a valid UUID with the exception that zero UUID is
// not supported (00000000-0000-0000-0000-000000000000).
string request_id = 1;
// PEM-encoded certificate request.
string csr = 2;
// Optional: requested certificate validity period.
google.protobuf.Duration validity = 3;
// Reserved 4
}
// Certificate response message.
message MeshCertificateResponse {
// PEM-encoded certificate chain.
// Leaf cert is element '0'. Root cert is element 'n'.
repeated string cert_chain = 1;
}
// Service for managing certificates issued by the CSM CA.
service MeshCertificateService {
// Using provided CSR, returns a signed certificate that represents a GCP
// service account identity.
rpc CreateCertificate(MeshCertificateRequest)
returns (MeshCertificateResponse) {
}
}

@ -117,7 +117,6 @@ proto_files=( \
"envoy/type/v3/percent.proto" \
"envoy/type/v3/range.proto" \
"envoy/type/v3/semantic_version.proto" \
"third_party/istio/security/proto/providers/google/meshca.proto" \
"udpa/annotations/migrate.proto" \
"udpa/annotations/security.proto" \
"udpa/annotations/sensitive.proto" \

Loading…
Cancel
Save