open-vault/physical/types.pb.go
Calvin Leung Huang a08ccbffa7
[Review Only] Autoseal OSS port (#757)
* Port awskms autoseal

* Rename files

* WIP autoseal

* Fix protobuf conflict

* Expose some structs to properly allow encrypting stored keys

* Update awskms with the latest changes

* Add KeyGuard implementation to abstract encryption/decryption of keys

* Fully decouple seal.Access implementations from sealwrap structs

* Add extra line to proto files, comment update

* Update seal_access_entry.go

* govendor sync

* Add endpoint info to configureAWSKMSSeal

* Update comment

* Refactor structs

* Update make proto

* Remove remove KeyGuard, move encrypt/decrypt to autoSeal

* Add rest of seals, update VerifyRecoveryKeys, add deps

* Fix some merge conflicts via govendor updates

* Rename SealWrapEntry to EncryptedBlobInfo

* Remove barrier type upgrade check in oss

* Add key to EncryptedBlobInfo proto

* Update barrierTypeUpgradeCheck signature
2018-10-19 14:43:57 -07:00

222 lines
7.8 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: physical/types.proto
package physical
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type EncryptedBlobInfo struct {
Ciphertext []byte `protobuf:"bytes,1,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
IV []byte `protobuf:"bytes,2,opt,name=iv,proto3" json:"iv,omitempty"`
HMAC []byte `protobuf:"bytes,3,opt,name=hmac,proto3" json:"hmac,omitempty"`
Wrapped bool `protobuf:"varint,4,opt,name=wrapped,proto3" json:"wrapped,omitempty"`
KeyInfo *SealKeyInfo `protobuf:"bytes,5,opt,name=key_info,json=keyInfo,proto3" json:"key_info,omitempty"`
// Key is the Key value for the entry that corresponds to
// physical.Entry.Key's value
Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EncryptedBlobInfo) Reset() { *m = EncryptedBlobInfo{} }
func (m *EncryptedBlobInfo) String() string { return proto.CompactTextString(m) }
func (*EncryptedBlobInfo) ProtoMessage() {}
func (*EncryptedBlobInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_deea33bd14ea5328, []int{0}
}
func (m *EncryptedBlobInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EncryptedBlobInfo.Unmarshal(m, b)
}
func (m *EncryptedBlobInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EncryptedBlobInfo.Marshal(b, m, deterministic)
}
func (m *EncryptedBlobInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptedBlobInfo.Merge(m, src)
}
func (m *EncryptedBlobInfo) XXX_Size() int {
return xxx_messageInfo_EncryptedBlobInfo.Size(m)
}
func (m *EncryptedBlobInfo) XXX_DiscardUnknown() {
xxx_messageInfo_EncryptedBlobInfo.DiscardUnknown(m)
}
var xxx_messageInfo_EncryptedBlobInfo proto.InternalMessageInfo
func (m *EncryptedBlobInfo) GetCiphertext() []byte {
if m != nil {
return m.Ciphertext
}
return nil
}
func (m *EncryptedBlobInfo) GetIV() []byte {
if m != nil {
return m.IV
}
return nil
}
func (m *EncryptedBlobInfo) GetHMAC() []byte {
if m != nil {
return m.HMAC
}
return nil
}
func (m *EncryptedBlobInfo) GetWrapped() bool {
if m != nil {
return m.Wrapped
}
return false
}
func (m *EncryptedBlobInfo) GetKeyInfo() *SealKeyInfo {
if m != nil {
return m.KeyInfo
}
return nil
}
func (m *EncryptedBlobInfo) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
// SealKeyInfo contains information regarding the seal used to encrypt the entry.
type SealKeyInfo struct {
// Mechanism is the method used by the seal to encrypt and sign the
// data as defined by the seal.
Mechanism uint64 `protobuf:"varint,1,opt,name=Mechanism,proto3" json:"Mechanism,omitempty"`
HMACMechanism uint64 `protobuf:"varint,2,opt,name=HMACMechanism,proto3" json:"HMACMechanism,omitempty"`
// This is an opaque ID used by the seal to identify the specific
// key to use as defined by the seal. This could be a version, key
// label, or something else.
KeyID string `protobuf:"bytes,3,opt,name=KeyID,proto3" json:"KeyID,omitempty"`
HMACKeyID string `protobuf:"bytes,4,opt,name=HMACKeyID,proto3" json:"HMACKeyID,omitempty"`
// These value are used when generating our own data encryption keys
// and encrypting them using the autoseal
WrappedKey []byte `protobuf:"bytes,5,opt,name=WrappedKey,proto3" json:"WrappedKey,omitempty"`
// Mechanism specific flags
Flags uint64 `protobuf:"varint,6,opt,name=Flags,proto3" json:"Flags,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SealKeyInfo) Reset() { *m = SealKeyInfo{} }
func (m *SealKeyInfo) String() string { return proto.CompactTextString(m) }
func (*SealKeyInfo) ProtoMessage() {}
func (*SealKeyInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_deea33bd14ea5328, []int{1}
}
func (m *SealKeyInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SealKeyInfo.Unmarshal(m, b)
}
func (m *SealKeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SealKeyInfo.Marshal(b, m, deterministic)
}
func (m *SealKeyInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_SealKeyInfo.Merge(m, src)
}
func (m *SealKeyInfo) XXX_Size() int {
return xxx_messageInfo_SealKeyInfo.Size(m)
}
func (m *SealKeyInfo) XXX_DiscardUnknown() {
xxx_messageInfo_SealKeyInfo.DiscardUnknown(m)
}
var xxx_messageInfo_SealKeyInfo proto.InternalMessageInfo
func (m *SealKeyInfo) GetMechanism() uint64 {
if m != nil {
return m.Mechanism
}
return 0
}
func (m *SealKeyInfo) GetHMACMechanism() uint64 {
if m != nil {
return m.HMACMechanism
}
return 0
}
func (m *SealKeyInfo) GetKeyID() string {
if m != nil {
return m.KeyID
}
return ""
}
func (m *SealKeyInfo) GetHMACKeyID() string {
if m != nil {
return m.HMACKeyID
}
return ""
}
func (m *SealKeyInfo) GetWrappedKey() []byte {
if m != nil {
return m.WrappedKey
}
return nil
}
func (m *SealKeyInfo) GetFlags() uint64 {
if m != nil {
return m.Flags
}
return 0
}
func init() {
proto.RegisterType((*EncryptedBlobInfo)(nil), "physical.EncryptedBlobInfo")
proto.RegisterType((*SealKeyInfo)(nil), "physical.SealKeyInfo")
}
func init() { proto.RegisterFile("physical/types.proto", fileDescriptor_deea33bd14ea5328) }
var fileDescriptor_deea33bd14ea5328 = []byte{
// 312 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x5f, 0x4b, 0xc3, 0x30,
0x14, 0xc5, 0x69, 0xd7, 0xfd, 0xbb, 0x9b, 0xa2, 0x61, 0x42, 0x1e, 0x44, 0xca, 0x54, 0xe8, 0x53,
0x2b, 0xfa, 0x09, 0x9c, 0x7f, 0x50, 0xc6, 0x5e, 0xe2, 0x83, 0xe0, 0x8b, 0x64, 0x59, 0xb6, 0x84,
0x75, 0x4d, 0x68, 0xb3, 0x69, 0x3e, 0x98, 0x4f, 0x7e, 0x39, 0x49, 0x4a, 0xd9, 0x7c, 0xbb, 0xf7,
0x97, 0xc3, 0xe1, 0x9c, 0x1b, 0x18, 0x69, 0x61, 0x2b, 0xc9, 0x68, 0x9e, 0x19, 0xab, 0x79, 0x95,
0xea, 0x52, 0x19, 0x85, 0x7a, 0x0d, 0x1d, 0xff, 0x04, 0x70, 0xfa, 0x54, 0xb0, 0xd2, 0x6a, 0xc3,
0x17, 0x93, 0x5c, 0xcd, 0x5f, 0x8b, 0xa5, 0x42, 0x17, 0x00, 0x4c, 0x6a, 0xc1, 0x4b, 0xc3, 0xbf,
0x0d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