forked from google/certificate-transparency-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.pb.go
372 lines (331 loc) · 15.6 KB
/
config.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: config.proto
package configpb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
configpb "github.com/google/certificate-transparency-go/trillian/ctfe/configpb"
keyspb "github.com/google/trillian/crypto/keyspb"
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.ProtoPackageIsVersion3 // please upgrade the proto package
// IdentityFunction specifies how Trillian identity hash is computed.
type IdentityFunction int32
const (
IdentityFunction_UNKNOWN_IDENTITY_FUNCTION IdentityFunction = 0
// Returns SHA256 hash of the certificate DER. This is the same function that
// CTFE uses when submitting add-[pre-]chain entries to Trillian.
//
// For example, it can be used when migrating a CT log to Trillian. Using the
// same function as CTFE makes any newly submitted entries compatible with the
// ones that migrated from the source log.
IdentityFunction_SHA256_CERT_DATA IdentityFunction = 1
// Returns SHA256 hash of the leaf index.
//
// For example, this function can be used for mirroring CT logs. Since the
// source logs might have duplicates of different kinds (depends on the
// operator), this function allows storing them all (unlike SHA256_CERT_DATA).
// Note that the CTFE log must stay read-only (mirror), as CTFE's identity
// hash is incompatible.
IdentityFunction_SHA256_LEAF_INDEX IdentityFunction = 2
)
var IdentityFunction_name = map[int32]string{
0: "UNKNOWN_IDENTITY_FUNCTION",
1: "SHA256_CERT_DATA",
2: "SHA256_LEAF_INDEX",
}
var IdentityFunction_value = map[string]int32{
"UNKNOWN_IDENTITY_FUNCTION": 0,
"SHA256_CERT_DATA": 1,
"SHA256_LEAF_INDEX": 2,
}
func (x IdentityFunction) String() string {
return proto.EnumName(IdentityFunction_name, int32(x))
}
func (IdentityFunction) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{0}
}
// MigrationConfig describes the configuration options for a single CT log
// migration instance.
type MigrationConfig struct {
// The URI of the source CT log, e.g. "https://ct.googleapis.com/pilot".
SourceUri string `protobuf:"bytes,1,opt,name=source_uri,json=sourceUri,proto3" json:"source_uri,omitempty"`
// The public key of the source log.
PublicKey *keyspb.PublicKey `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// The name of the backend which this log migrates to. The name must be one of
// those defined in the LogBackendSet.
LogBackendName string `protobuf:"bytes,3,opt,name=log_backend_name,json=logBackendName,proto3" json:"log_backend_name,omitempty"`
// The ID of a Trillian PREORDERED_LOG tree that stores the log data.
LogId int64 `protobuf:"varint,4,opt,name=log_id,json=logId,proto3" json:"log_id,omitempty"`
// Max number of entries per get-entries request from the source log.
BatchSize int32 `protobuf:"varint,5,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
// Determines whether the migration should run continuously, i.e. watch and
// follow the updates of the source log's STH. For example, this mode can be
// used to support a mirror CT log.
IsContinuous bool `protobuf:"varint,6,opt,name=is_continuous,json=isContinuous,proto3" json:"is_continuous,omitempty"`
// The log entry index to start fetching at. If negative, then it is assumed
// equal to the current Trillian tree size.
// Ignored in continuous mode which starts at the point where it stopped (e.g.
// the current Trillian tree size in a simple case).
StartIndex int64 `protobuf:"varint,7,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"`
// The log index to end fetching at, non-inclusive. If zero, fetch up to the
// source log's current STH. Ignored in continuous mode which keeps updating
// STH and fetching up to that.
EndIndex int64 `protobuf:"varint,8,opt,name=end_index,json=endIndex,proto3" json:"end_index,omitempty"`
// The number of parallel get-entries fetchers. Assumed equal to 1 if not
// specified.
NumFetchers int32 `protobuf:"varint,9,opt,name=num_fetchers,json=numFetchers,proto3" json:"num_fetchers,omitempty"`
// The number of parallel workers submitting entries to Trillian. Assumed
// equal to 1 if not specified.
NumSubmitters int32 `protobuf:"varint,10,opt,name=num_submitters,json=numSubmitters,proto3" json:"num_submitters,omitempty"`
// Max number of batches in fetchers->submitters channel.
ChannelSize int32 `protobuf:"varint,11,opt,name=channel_size,json=channelSize,proto3" json:"channel_size,omitempty"`
// The function that computes LeafIdentityHash for Trillian log entries.
IdentityFunction IdentityFunction `protobuf:"varint,12,opt,name=identity_function,json=identityFunction,proto3,enum=configpb.IdentityFunction" json:"identity_function,omitempty"`
// If set to false (by default), then Migrillian verifies that the tree as
// seen by Trillian is consistent with the current STH of the source CT log.
// It invokes the get-sth-consistency endpoint (section 4.4 of RFC 6962) with
// the corresponding tree sizes, and verifies the returned proof.
NoConsistencyCheck bool `protobuf:"varint,13,opt,name=no_consistency_check,json=noConsistencyCheck,proto3" json:"no_consistency_check,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MigrationConfig) Reset() { *m = MigrationConfig{} }
func (m *MigrationConfig) String() string { return proto.CompactTextString(m) }
func (*MigrationConfig) ProtoMessage() {}
func (*MigrationConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{0}
}
func (m *MigrationConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MigrationConfig.Unmarshal(m, b)
}
func (m *MigrationConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MigrationConfig.Marshal(b, m, deterministic)
}
func (m *MigrationConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_MigrationConfig.Merge(m, src)
}
func (m *MigrationConfig) XXX_Size() int {
return xxx_messageInfo_MigrationConfig.Size(m)
}
func (m *MigrationConfig) XXX_DiscardUnknown() {
xxx_messageInfo_MigrationConfig.DiscardUnknown(m)
}
var xxx_messageInfo_MigrationConfig proto.InternalMessageInfo
func (m *MigrationConfig) GetSourceUri() string {
if m != nil {
return m.SourceUri
}
return ""
}
func (m *MigrationConfig) GetPublicKey() *keyspb.PublicKey {
if m != nil {
return m.PublicKey
}
return nil
}
func (m *MigrationConfig) GetLogBackendName() string {
if m != nil {
return m.LogBackendName
}
return ""
}
func (m *MigrationConfig) GetLogId() int64 {
if m != nil {
return m.LogId
}
return 0
}
func (m *MigrationConfig) GetBatchSize() int32 {
if m != nil {
return m.BatchSize
}
return 0
}
func (m *MigrationConfig) GetIsContinuous() bool {
if m != nil {
return m.IsContinuous
}
return false
}
func (m *MigrationConfig) GetStartIndex() int64 {
if m != nil {
return m.StartIndex
}
return 0
}
func (m *MigrationConfig) GetEndIndex() int64 {
if m != nil {
return m.EndIndex
}
return 0
}
func (m *MigrationConfig) GetNumFetchers() int32 {
if m != nil {
return m.NumFetchers
}
return 0
}
func (m *MigrationConfig) GetNumSubmitters() int32 {
if m != nil {
return m.NumSubmitters
}
return 0
}
func (m *MigrationConfig) GetChannelSize() int32 {
if m != nil {
return m.ChannelSize
}
return 0
}
func (m *MigrationConfig) GetIdentityFunction() IdentityFunction {
if m != nil {
return m.IdentityFunction
}
return IdentityFunction_UNKNOWN_IDENTITY_FUNCTION
}
func (m *MigrationConfig) GetNoConsistencyCheck() bool {
if m != nil {
return m.NoConsistencyCheck
}
return false
}
// MigrationConfigSet is a set of MigrationConfig messages.
type MigrationConfigSet struct {
Config []*MigrationConfig `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MigrationConfigSet) Reset() { *m = MigrationConfigSet{} }
func (m *MigrationConfigSet) String() string { return proto.CompactTextString(m) }
func (*MigrationConfigSet) ProtoMessage() {}
func (*MigrationConfigSet) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{1}
}
func (m *MigrationConfigSet) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MigrationConfigSet.Unmarshal(m, b)
}
func (m *MigrationConfigSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MigrationConfigSet.Marshal(b, m, deterministic)
}
func (m *MigrationConfigSet) XXX_Merge(src proto.Message) {
xxx_messageInfo_MigrationConfigSet.Merge(m, src)
}
func (m *MigrationConfigSet) XXX_Size() int {
return xxx_messageInfo_MigrationConfigSet.Size(m)
}
func (m *MigrationConfigSet) XXX_DiscardUnknown() {
xxx_messageInfo_MigrationConfigSet.DiscardUnknown(m)
}
var xxx_messageInfo_MigrationConfigSet proto.InternalMessageInfo
func (m *MigrationConfigSet) GetConfig() []*MigrationConfig {
if m != nil {
return m.Config
}
return nil
}
// MigrillianConfig holds configuration for multiple migration / mirroring jobs.
type MigrillianConfig struct {
// The set of backends that this configuration will use to send requests to.
// The names of the backends in the LogBackendSet must all be distinct.
Backends *configpb.LogBackendSet `protobuf:"bytes,1,opt,name=backends,proto3" json:"backends,omitempty"`
// The set of migrations that will use the above backends. All the protos in
// it must set a valid log_backend_name for the config to be usable.
MigrationConfigs *MigrationConfigSet `protobuf:"bytes,2,opt,name=migration_configs,json=migrationConfigs,proto3" json:"migration_configs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MigrillianConfig) Reset() { *m = MigrillianConfig{} }
func (m *MigrillianConfig) String() string { return proto.CompactTextString(m) }
func (*MigrillianConfig) ProtoMessage() {}
func (*MigrillianConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_3eaf2c85e69e9ea4, []int{2}
}
func (m *MigrillianConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MigrillianConfig.Unmarshal(m, b)
}
func (m *MigrillianConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MigrillianConfig.Marshal(b, m, deterministic)
}
func (m *MigrillianConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_MigrillianConfig.Merge(m, src)
}
func (m *MigrillianConfig) XXX_Size() int {
return xxx_messageInfo_MigrillianConfig.Size(m)
}
func (m *MigrillianConfig) XXX_DiscardUnknown() {
xxx_messageInfo_MigrillianConfig.DiscardUnknown(m)
}
var xxx_messageInfo_MigrillianConfig proto.InternalMessageInfo
func (m *MigrillianConfig) GetBackends() *configpb.LogBackendSet {
if m != nil {
return m.Backends
}
return nil
}
func (m *MigrillianConfig) GetMigrationConfigs() *MigrationConfigSet {
if m != nil {
return m.MigrationConfigs
}
return nil
}
func init() {
proto.RegisterEnum("configpb.IdentityFunction", IdentityFunction_name, IdentityFunction_value)
proto.RegisterType((*MigrationConfig)(nil), "configpb.MigrationConfig")
proto.RegisterType((*MigrationConfigSet)(nil), "configpb.MigrationConfigSet")
proto.RegisterType((*MigrillianConfig)(nil), "configpb.MigrillianConfig")
}
func init() { proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4) }
var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 622 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x5d, 0x6f, 0xd3, 0x3e,
0x14, 0xc6, 0xff, 0xd9, 0x4b, 0xff, 0xed, 0x69, 0x37, 0x52, 0x6b, 0x13, 0x59, 0x61, 0xa2, 0x6c,
0x42, 0x8a, 0x90, 0xd6, 0x8c, 0x4e, 0x70, 0xdf, 0x75, 0xed, 0x08, 0x1b, 0x19, 0x4a, 0x3b, 0xf1,
0x72, 0x81, 0x95, 0xb8, 0x6e, 0x6a, 0x35, 0xb1, 0xa3, 0xd8, 0x91, 0xe8, 0xbe, 0x03, 0x37, 0x7c,
0x62, 0x94, 0x97, 0x66, 0x50, 0x89, 0xab, 0x24, 0xbf, 0xe7, 0xc9, 0xf1, 0xf1, 0xf1, 0x63, 0x68,
0x11, 0xc1, 0xe7, 0x2c, 0xe8, 0xc5, 0x89, 0x50, 0x02, 0xd5, 0x8b, 0xaf, 0xd8, 0xef, 0x9c, 0xaa,
0x84, 0x85, 0x21, 0xf3, 0xb8, 0x45, 0xd4, 0x9c, 0x5a, 0x6b, 0x6e, 0xfd, 0x69, 0xef, 0x74, 0x48,
0xb2, 0x8a, 0x95, 0xb0, 0x96, 0x74, 0x25, 0x63, 0xbf, 0x7c, 0x14, 0xda, 0xc9, 0xcf, 0x1d, 0x78,
0xf2, 0x91, 0x05, 0x89, 0xa7, 0x98, 0xe0, 0xc3, 0xfc, 0x2f, 0x74, 0x0c, 0x20, 0x45, 0x9a, 0x10,
0x8a, 0xd3, 0x84, 0x19, 0x5a, 0x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