mirror of https://github.com/hashicorp/boundary
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
300 lines
11 KiB
300 lines
11 KiB
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.10
|
|
// protoc (unknown)
|
|
// source: controller/storage/servers/store/v1/root_certificate.proto
|
|
|
|
// Package store provides protobufs for storing types in the pki package.
|
|
|
|
package store
|
|
|
|
import (
|
|
timestamp "github.com/hashicorp/boundary/internal/db/timestamp"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// CertificateAuthority is a versioned entity used to lock the database when rotation RootCertificates
|
|
type CertificateAuthority struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// @inject_tag: `gorm:"primary_key"`
|
|
PrivateId string `protobuf:"bytes,10,opt,name=private_id,json=privateId,proto3" json:"private_id,omitempty" gorm:"primary_key"`
|
|
// version allows optimistic locking of the resource.
|
|
// @inject_tag: `gorm:"default:null"`
|
|
Version uint32 `protobuf:"varint,20,opt,name=version,proto3" json:"version,omitempty" gorm:"default:null"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CertificateAuthority) Reset() {
|
|
*x = CertificateAuthority{}
|
|
mi := &file_controller_storage_servers_store_v1_root_certificate_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CertificateAuthority) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CertificateAuthority) ProtoMessage() {}
|
|
|
|
func (x *CertificateAuthority) ProtoReflect() protoreflect.Message {
|
|
mi := &file_controller_storage_servers_store_v1_root_certificate_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CertificateAuthority.ProtoReflect.Descriptor instead.
|
|
func (*CertificateAuthority) Descriptor() ([]byte, []int) {
|
|
return file_controller_storage_servers_store_v1_root_certificate_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *CertificateAuthority) GetPrivateId() string {
|
|
if x != nil {
|
|
return x.PrivateId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CertificateAuthority) GetVersion() uint32 {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// RootCertificate contains all fields related to a RootCertificate resource
|
|
type RootCertificate struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The serial number of the root certificate
|
|
// @inject_tag: `gorm:"not_null"`
|
|
SerialNumber uint64 `protobuf:"varint,10,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty" gorm:"not_null"`
|
|
// Certificate is the PEM encoded certificate.
|
|
// @inject_tag: `gorm:"not_null"`
|
|
Certificate []byte `protobuf:"bytes,20,opt,name=certificate,proto3" json:"certificate,omitempty" gorm:"not_null"`
|
|
// Not valid before is the timestamp at which this certificate's validity period starts
|
|
NotValidBefore *timestamp.Timestamp `protobuf:"bytes,30,opt,name=not_valid_before,json=notValidBefore,proto3" json:"not_valid_before,omitempty"`
|
|
// Not valid after is the timestamp at which this certificate's validity period ends
|
|
NotValidAfter *timestamp.Timestamp `protobuf:"bytes,40,opt,name=not_valid_after,json=notValidAfter,proto3" json:"not_valid_after,omitempty"`
|
|
// The public key associated with this certificate
|
|
// @inject_tag: `gorm:"primary_key"`
|
|
PublicKey []byte `protobuf:"bytes,50,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" gorm:"primary_key"`
|
|
// The plain-text private key associated with this certificate. We are not storing this
|
|
// in the database.
|
|
// @inject_tag: gorm:"-" wrapping:"pt,private_key"
|
|
PrivateKey []byte `protobuf:"bytes,60,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty" gorm:"-" wrapping:"pt,private_key"`
|
|
// The private key associated with this certificate
|
|
// This is a ciphertext field
|
|
// @inject_tag: gorm:"column:private_key;not_null" wrapping:"ct,private_key"
|
|
CtPrivateKey []byte `protobuf:"bytes,61,opt,name=ct_private_key,json=ctPrivateKey,proto3" json:"ct_private_key,omitempty" gorm:"column:private_key;not_null" wrapping:"ct,private_key"`
|
|
// The id of the kms database key used for encrypting this entry.
|
|
// @inject_tag: `gorm:"not_null"`
|
|
KeyId string `protobuf:"bytes,70,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty" gorm:"not_null"`
|
|
// State is an enum value indicating if this is the next or current root cert
|
|
// @inject_tag: `gorm:"not_null"`
|
|
State string `protobuf:"bytes,80,opt,name=state,proto3" json:"state,omitempty" gorm:"not_null"`
|
|
// A reference to the CertificateAuthority
|
|
// @inject_tag: `gorm:"not_null"`
|
|
IssuingCa string `protobuf:"bytes,90,opt,name=issuing_ca,json=issuingCa,proto3" json:"issuing_ca,omitempty" gorm:"not_null"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RootCertificate) Reset() {
|
|
*x = RootCertificate{}
|
|
mi := &file_controller_storage_servers_store_v1_root_certificate_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RootCertificate) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RootCertificate) ProtoMessage() {}
|
|
|
|
func (x *RootCertificate) ProtoReflect() protoreflect.Message {
|
|
mi := &file_controller_storage_servers_store_v1_root_certificate_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RootCertificate.ProtoReflect.Descriptor instead.
|
|
func (*RootCertificate) Descriptor() ([]byte, []int) {
|
|
return file_controller_storage_servers_store_v1_root_certificate_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *RootCertificate) GetSerialNumber() uint64 {
|
|
if x != nil {
|
|
return x.SerialNumber
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RootCertificate) GetCertificate() []byte {
|
|
if x != nil {
|
|
return x.Certificate
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RootCertificate) GetNotValidBefore() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.NotValidBefore
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RootCertificate) GetNotValidAfter() *timestamp.Timestamp {
|
|
if x != nil {
|
|
return x.NotValidAfter
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RootCertificate) GetPublicKey() []byte {
|
|
if x != nil {
|
|
return x.PublicKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RootCertificate) GetPrivateKey() []byte {
|
|
if x != nil {
|
|
return x.PrivateKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RootCertificate) GetCtPrivateKey() []byte {
|
|
if x != nil {
|
|
return x.CtPrivateKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RootCertificate) GetKeyId() string {
|
|
if x != nil {
|
|
return x.KeyId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RootCertificate) GetState() string {
|
|
if x != nil {
|
|
return x.State
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RootCertificate) GetIssuingCa() string {
|
|
if x != nil {
|
|
return x.IssuingCa
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_controller_storage_servers_store_v1_root_certificate_proto protoreflect.FileDescriptor
|
|
|
|
const file_controller_storage_servers_store_v1_root_certificate_proto_rawDesc = "" +
|
|
"\n" +
|
|
":controller/storage/servers/store/v1/root_certificate.proto\x12#controller.storage.servers.store.v1\x1a/controller/storage/timestamp/v1/timestamp.proto\"O\n" +
|
|
"\x14CertificateAuthority\x12\x1d\n" +
|
|
"\n" +
|
|
"private_id\x18\n" +
|
|
" \x01(\tR\tprivateId\x12\x18\n" +
|
|
"\aversion\x18\x14 \x01(\rR\aversion\"\xb4\x03\n" +
|
|
"\x0fRootCertificate\x12#\n" +
|
|
"\rserial_number\x18\n" +
|
|
" \x01(\x04R\fserialNumber\x12 \n" +
|
|
"\vcertificate\x18\x14 \x01(\fR\vcertificate\x12T\n" +
|
|
"\x10not_valid_before\x18\x1e \x01(\v2*.controller.storage.timestamp.v1.TimestampR\x0enotValidBefore\x12R\n" +
|
|
"\x0fnot_valid_after\x18( \x01(\v2*.controller.storage.timestamp.v1.TimestampR\rnotValidAfter\x12\x1d\n" +
|
|
"\n" +
|
|
"public_key\x182 \x01(\fR\tpublicKey\x12\x1f\n" +
|
|
"\vprivate_key\x18< \x01(\fR\n" +
|
|
"privateKey\x12$\n" +
|
|
"\x0ect_private_key\x18= \x01(\fR\fctPrivateKey\x12\x15\n" +
|
|
"\x06key_id\x18F \x01(\tR\x05keyId\x12\x14\n" +
|
|
"\x05state\x18P \x01(\tR\x05state\x12\x1d\n" +
|
|
"\n" +
|
|
"issuing_ca\x18Z \x01(\tR\tissuingCaB;Z9github.com/hashicorp/boundary/internal/server/store;storeb\x06proto3"
|
|
|
|
var (
|
|
file_controller_storage_servers_store_v1_root_certificate_proto_rawDescOnce sync.Once
|
|
file_controller_storage_servers_store_v1_root_certificate_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_controller_storage_servers_store_v1_root_certificate_proto_rawDescGZIP() []byte {
|
|
file_controller_storage_servers_store_v1_root_certificate_proto_rawDescOnce.Do(func() {
|
|
file_controller_storage_servers_store_v1_root_certificate_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_controller_storage_servers_store_v1_root_certificate_proto_rawDesc), len(file_controller_storage_servers_store_v1_root_certificate_proto_rawDesc)))
|
|
})
|
|
return file_controller_storage_servers_store_v1_root_certificate_proto_rawDescData
|
|
}
|
|
|
|
var file_controller_storage_servers_store_v1_root_certificate_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_controller_storage_servers_store_v1_root_certificate_proto_goTypes = []any{
|
|
(*CertificateAuthority)(nil), // 0: controller.storage.servers.store.v1.CertificateAuthority
|
|
(*RootCertificate)(nil), // 1: controller.storage.servers.store.v1.RootCertificate
|
|
(*timestamp.Timestamp)(nil), // 2: controller.storage.timestamp.v1.Timestamp
|
|
}
|
|
var file_controller_storage_servers_store_v1_root_certificate_proto_depIdxs = []int32{
|
|
2, // 0: controller.storage.servers.store.v1.RootCertificate.not_valid_before:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
2, // 1: controller.storage.servers.store.v1.RootCertificate.not_valid_after:type_name -> controller.storage.timestamp.v1.Timestamp
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_controller_storage_servers_store_v1_root_certificate_proto_init() }
|
|
func file_controller_storage_servers_store_v1_root_certificate_proto_init() {
|
|
if File_controller_storage_servers_store_v1_root_certificate_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_controller_storage_servers_store_v1_root_certificate_proto_rawDesc), len(file_controller_storage_servers_store_v1_root_certificate_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_controller_storage_servers_store_v1_root_certificate_proto_goTypes,
|
|
DependencyIndexes: file_controller_storage_servers_store_v1_root_certificate_proto_depIdxs,
|
|
MessageInfos: file_controller_storage_servers_store_v1_root_certificate_proto_msgTypes,
|
|
}.Build()
|
|
File_controller_storage_servers_store_v1_root_certificate_proto = out.File
|
|
file_controller_storage_servers_store_v1_root_certificate_proto_goTypes = nil
|
|
file_controller_storage_servers_store_v1_root_certificate_proto_depIdxs = nil
|
|
}
|