cockroach: github.com/cockroachdb/cockroach/pkg/ccl/storageccl/engineccl/enginepbccl Index | Files

package enginepbccl

import "github.com/cockroachdb/cockroach/pkg/ccl/storageccl/engineccl/enginepbccl"

Index

Package Files

key_registry.pb.go stats.pb.go

Variables

var (
    ErrInvalidLengthKeyRegistry = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowKeyRegistry   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthStats = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowStats   = fmt.Errorf("proto: integer overflow")
)
var EncryptionType_name = map[int32]string{
    0:  "Plaintext",
    1:  "AES128_CTR",
    2:  "AES192_CTR",
    3:  "AES256_CTR",
}
var EncryptionType_value = map[string]int32{
    "Plaintext":  0,
    "AES128_CTR": 1,
    "AES192_CTR": 2,
    "AES256_CTR": 3,
}

type DataKeysRegistry Uses

type DataKeysRegistry struct {
    // Map of key_id to KeyInfo (raw key is not included).
    StoreKeys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=store_keys,json=storeKeys,proto3" json:"store_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // Map of key_id to SecretKey (raw key is included).
    DataKeys map[string]*SecretKey `protobuf:"bytes,2,rep,name=data_keys,json=dataKeys,proto3" json:"data_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // Active key IDs. Empty means no keys loaded yet.
    ActiveStoreKeyId string `protobuf:"bytes,3,opt,name=active_store_key_id,json=activeStoreKeyId,proto3" json:"active_store_key_id,omitempty"`
    ActiveDataKeyId  string `protobuf:"bytes,4,opt,name=active_data_key_id,json=activeDataKeyId,proto3" json:"active_data_key_id,omitempty"`
}

DataKeysRegistry contains all data keys (including the raw key) as well as store key information (excluding raw key). This is written to disk.

func (*DataKeysRegistry) Descriptor Uses

func (*DataKeysRegistry) Descriptor() ([]byte, []int)

func (*DataKeysRegistry) Marshal Uses

func (m *DataKeysRegistry) Marshal() (dAtA []byte, err error)

func (*DataKeysRegistry) MarshalTo Uses

func (m *DataKeysRegistry) MarshalTo(dAtA []byte) (int, error)

func (*DataKeysRegistry) ProtoMessage Uses

func (*DataKeysRegistry) ProtoMessage()

func (*DataKeysRegistry) Reset Uses

func (m *DataKeysRegistry) Reset()

func (*DataKeysRegistry) Size Uses

func (m *DataKeysRegistry) Size() (n int)

func (*DataKeysRegistry) String Uses

func (m *DataKeysRegistry) String() string

func (*DataKeysRegistry) Unmarshal Uses

func (m *DataKeysRegistry) Unmarshal(dAtA []byte) error

func (*DataKeysRegistry) XXX_DiscardUnknown Uses

func (m *DataKeysRegistry) XXX_DiscardUnknown()

func (*DataKeysRegistry) XXX_Marshal Uses

func (m *DataKeysRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DataKeysRegistry) XXX_Merge Uses

func (dst *DataKeysRegistry) XXX_Merge(src proto.Message)

func (*DataKeysRegistry) XXX_Size Uses

func (m *DataKeysRegistry) XXX_Size() int

func (*DataKeysRegistry) XXX_Unmarshal Uses

func (m *DataKeysRegistry) XXX_Unmarshal(b []byte) error

type EncryptionSettings Uses

type EncryptionSettings struct {
    EncryptionType EncryptionType `protobuf:"varint,1,opt,name=encryption_type,json=encryptionType,proto3,enum=cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType" json:"encryption_type,omitempty"`
    // Fields for AES-CTR. Empty when encryption_type = Plaintext.
    KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
    // len(nonce) + sizeof(counter) should add up to AES_Blocksize (128 bits).
    Nonce   []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
    Counter uint32 `protobuf:"varint,4,opt,name=counter,proto3" json:"counter,omitempty"`
}

EncryptionSettings describes the encryption settings for a file. This is stored as a protobuf.Any inside the FileEntry as described in: pkg/storage/engine/enginepb/file_registry.proto

func (*EncryptionSettings) Descriptor Uses

func (*EncryptionSettings) Descriptor() ([]byte, []int)

func (*EncryptionSettings) Marshal Uses

func (m *EncryptionSettings) Marshal() (dAtA []byte, err error)

func (*EncryptionSettings) MarshalTo Uses

func (m *EncryptionSettings) MarshalTo(dAtA []byte) (int, error)

func (*EncryptionSettings) ProtoMessage Uses

func (*EncryptionSettings) ProtoMessage()

func (*EncryptionSettings) Reset Uses

func (m *EncryptionSettings) Reset()

func (*EncryptionSettings) Size Uses

func (m *EncryptionSettings) Size() (n int)

func (*EncryptionSettings) String Uses

func (m *EncryptionSettings) String() string

func (*EncryptionSettings) Unmarshal Uses

func (m *EncryptionSettings) Unmarshal(dAtA []byte) error

func (*EncryptionSettings) XXX_DiscardUnknown Uses

func (m *EncryptionSettings) XXX_DiscardUnknown()

func (*EncryptionSettings) XXX_Marshal Uses

func (m *EncryptionSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EncryptionSettings) XXX_Merge Uses

func (dst *EncryptionSettings) XXX_Merge(src proto.Message)

func (*EncryptionSettings) XXX_Size Uses

func (m *EncryptionSettings) XXX_Size() int

func (*EncryptionSettings) XXX_Unmarshal Uses

func (m *EncryptionSettings) XXX_Unmarshal(b []byte) error

type EncryptionStatus Uses

type EncryptionStatus struct {
    // Information about the active store key, if any.
    ActiveStoreKey *KeyInfo `protobuf:"bytes,1,opt,name=active_store_key,json=activeStoreKey,proto3" json:"active_store_key,omitempty"`
    // Information about the active data key, if any.
    ActiveDataKey *KeyInfo `protobuf:"bytes,2,opt,name=active_data_key,json=activeDataKey,proto3" json:"active_data_key,omitempty"`
}

EncryptionStatus contains encryption-related information.

func (*EncryptionStatus) Descriptor Uses

func (*EncryptionStatus) Descriptor() ([]byte, []int)

func (*EncryptionStatus) Marshal Uses

func (m *EncryptionStatus) Marshal() (dAtA []byte, err error)

func (*EncryptionStatus) MarshalTo Uses

func (m *EncryptionStatus) MarshalTo(dAtA []byte) (int, error)

func (*EncryptionStatus) ProtoMessage Uses

func (*EncryptionStatus) ProtoMessage()

func (*EncryptionStatus) Reset Uses

func (m *EncryptionStatus) Reset()

func (*EncryptionStatus) Size Uses

func (m *EncryptionStatus) Size() (n int)

func (*EncryptionStatus) String Uses

func (m *EncryptionStatus) String() string

func (*EncryptionStatus) Unmarshal Uses

func (m *EncryptionStatus) Unmarshal(dAtA []byte) error

func (*EncryptionStatus) XXX_DiscardUnknown Uses

func (m *EncryptionStatus) XXX_DiscardUnknown()

func (*EncryptionStatus) XXX_Marshal Uses

func (m *EncryptionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EncryptionStatus) XXX_Merge Uses

func (dst *EncryptionStatus) XXX_Merge(src proto.Message)

func (*EncryptionStatus) XXX_Size Uses

func (m *EncryptionStatus) XXX_Size() int

func (*EncryptionStatus) XXX_Unmarshal Uses

func (m *EncryptionStatus) XXX_Unmarshal(b []byte) error

type EncryptionType Uses

type EncryptionType int32
const (
    // No encryption.
    EncryptionType_Plaintext EncryptionType = 0
    // AES in counter mode with various key lengths.
    EncryptionType_AES128_CTR EncryptionType = 1
    EncryptionType_AES192_CTR EncryptionType = 2
    EncryptionType_AES256_CTR EncryptionType = 3
)

func (EncryptionType) EnumDescriptor Uses

func (EncryptionType) EnumDescriptor() ([]byte, []int)

func (EncryptionType) String Uses

func (x EncryptionType) String() string

type KeyInfo Uses

type KeyInfo struct {
    // EncryptionType is the type of encryption (aka: cipher) used with this key.
    EncryptionType EncryptionType `protobuf:"varint,1,opt,name=encryption_type,json=encryptionType,proto3,enum=cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType" json:"encryption_type,omitempty"`
    // The ID (hash) of this key.
    KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"`
    // First time this key was seen (in seconds since epoch).
    CreationTime int64 `protobuf:"varint,3,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"`
    // Source is a description of the source. This could be a filename,
    // or the key manager that made the key. eg: "data key manager".
    Source string `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"`
    // Was exposed is true if we ever wrote the key in plaintext.
    // This does not apply to store keys, only data keys.
    WasExposed bool `protobuf:"varint,5,opt,name=was_exposed,json=wasExposed,proto3" json:"was_exposed,omitempty"`
    // ID of the key that caused this key to be created.
    ParentKeyId string `protobuf:"bytes,6,opt,name=parent_key_id,json=parentKeyId,proto3" json:"parent_key_id,omitempty"`
}

KeyInfo contains information about the key, but not the key itself. This is safe to pass around, log, and store.

func (*KeyInfo) Descriptor Uses

func (*KeyInfo) Descriptor() ([]byte, []int)

func (*KeyInfo) Marshal Uses

func (m *KeyInfo) Marshal() (dAtA []byte, err error)

func (*KeyInfo) MarshalTo Uses

func (m *KeyInfo) MarshalTo(dAtA []byte) (int, error)

func (*KeyInfo) ProtoMessage Uses

func (*KeyInfo) ProtoMessage()

func (*KeyInfo) Reset Uses

func (m *KeyInfo) Reset()

func (*KeyInfo) Size Uses

func (m *KeyInfo) Size() (n int)

func (*KeyInfo) String Uses

func (m *KeyInfo) String() string

func (*KeyInfo) Unmarshal Uses

func (m *KeyInfo) Unmarshal(dAtA []byte) error

func (*KeyInfo) XXX_DiscardUnknown Uses

func (m *KeyInfo) XXX_DiscardUnknown()

func (*KeyInfo) XXX_Marshal Uses

func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyInfo) XXX_Merge Uses

func (dst *KeyInfo) XXX_Merge(src proto.Message)

func (*KeyInfo) XXX_Size Uses

func (m *KeyInfo) XXX_Size() int

func (*KeyInfo) XXX_Unmarshal Uses

func (m *KeyInfo) XXX_Unmarshal(b []byte) error

type SecretKey Uses

type SecretKey struct {
    Info *KeyInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
    // The raw key.
    Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

SecretKey contains the information about the key AND the raw key itself. This should never be logged, displayed, or stored outside of the key registry. The name is intended to make users of the key wary of the usage.

func (*SecretKey) Descriptor Uses

func (*SecretKey) Descriptor() ([]byte, []int)

func (*SecretKey) Marshal Uses

func (m *SecretKey) Marshal() (dAtA []byte, err error)

func (*SecretKey) MarshalTo Uses

func (m *SecretKey) MarshalTo(dAtA []byte) (int, error)

func (*SecretKey) ProtoMessage Uses

func (*SecretKey) ProtoMessage()

func (*SecretKey) Reset Uses

func (m *SecretKey) Reset()

func (*SecretKey) Size Uses

func (m *SecretKey) Size() (n int)

func (*SecretKey) String Uses

func (m *SecretKey) String() string

func (*SecretKey) Unmarshal Uses

func (m *SecretKey) Unmarshal(dAtA []byte) error

func (*SecretKey) XXX_DiscardUnknown Uses

func (m *SecretKey) XXX_DiscardUnknown()

func (*SecretKey) XXX_Marshal Uses

func (m *SecretKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SecretKey) XXX_Merge Uses

func (dst *SecretKey) XXX_Merge(src proto.Message)

func (*SecretKey) XXX_Size Uses

func (m *SecretKey) XXX_Size() int

func (*SecretKey) XXX_Unmarshal Uses

func (m *SecretKey) XXX_Unmarshal(b []byte) error

Package enginepbccl imports 5 packages (graph) and is imported by 2 packages. Updated 2019-07-06. Refresh now. Tools for package owners.