protobug_sigstore_protos 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/protobug_sigstore_protos.rb +11 -0
- data/lib/sigstore/bundle/v1/sigstore_bundle_pb.rb +244 -0
- data/lib/sigstore/common/v1/sigstore_common_pb.rb +441 -0
- data/lib/sigstore/dsse/envelope_pb.rb +77 -0
- data/lib/sigstore/events/events_pb.rb +194 -0
- data/lib/sigstore/rekor/v1/sigstore_rekor_pb.rb +252 -0
- data/lib/sigstore/trustroot/v1/sigstore_trustroot_pb.rb +346 -0
- data/lib/sigstore/verification/v1/sigstore_verification_pb.rb +365 -0
- metadata +95 -0
@@ -0,0 +1,252 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Code generated by protoc-gen-protobug. DO NOT EDIT.
|
4
|
+
|
5
|
+
# source: sigstore_rekor.proto
|
6
|
+
# syntax: proto3
|
7
|
+
# package: dev.sigstore.rekor.v1
|
8
|
+
# options:
|
9
|
+
# java_package: "dev.sigstore.proto.rekor.v1"
|
10
|
+
# java_outer_classname: "RekorProto"
|
11
|
+
# java_multiple_files: true
|
12
|
+
# go_package: "github.com/sigstore/protobuf-specs/gen/pb-go/rekor/v1"
|
13
|
+
# ruby_package: "Sigstore::Rekor::V1"
|
14
|
+
|
15
|
+
# Copyright 2022 The Sigstore Authors.
|
16
|
+
#
|
17
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
18
|
+
# you may not use this file except in compliance with the License.
|
19
|
+
# You may obtain a copy of the License at
|
20
|
+
#
|
21
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
22
|
+
#
|
23
|
+
# Unless required by applicable law or agreed to in writing, software
|
24
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
25
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
26
|
+
# See the License for the specific language governing permissions and
|
27
|
+
# limitations under the License.
|
28
|
+
|
29
|
+
require "protobug"
|
30
|
+
|
31
|
+
require "google/api/field_behavior_pb"
|
32
|
+
|
33
|
+
require_relative "../../common/v1/sigstore_common_pb"
|
34
|
+
|
35
|
+
module Sigstore
|
36
|
+
module Rekor
|
37
|
+
module V1
|
38
|
+
# KindVersion contains the entry's kind and api version.
|
39
|
+
class KindVersion
|
40
|
+
extend Protobug::Message
|
41
|
+
|
42
|
+
self.full_name = "dev.sigstore.rekor.v1.KindVersion"
|
43
|
+
|
44
|
+
# Kind is the type of entry being stored in the log.
|
45
|
+
# See here for a list: https://github.com/sigstore/rekor/tree/main/pkg/types
|
46
|
+
optional(1, "kind", type: :string, proto3_optional: false)
|
47
|
+
# The specific api version of the type.
|
48
|
+
optional(2, "version", type: :string, proto3_optional: false)
|
49
|
+
end
|
50
|
+
|
51
|
+
# The checkpoint MUST contain an origin string as a unique log identifier,
|
52
|
+
# the tree size, and the root hash. It MAY also be followed by optional data,
|
53
|
+
# and clients MUST NOT assume optional data. The checkpoint MUST also contain
|
54
|
+
# a signature over the root hash (tree head). The checkpoint MAY contain additional
|
55
|
+
# signatures, but the first SHOULD be the signature from the log. Checkpoint contents
|
56
|
+
# are concatenated with newlines into a single string.
|
57
|
+
# The checkpoint format is described in
|
58
|
+
# https://github.com/transparency-dev/formats/blob/main/log/README.md
|
59
|
+
# and https://github.com/C2SP/C2SP/blob/main/tlog-checkpoint.md.
|
60
|
+
# An example implementation can be found in https://github.com/sigstore/rekor/blob/main/pkg/util/signed_note.go
|
61
|
+
class Checkpoint
|
62
|
+
extend Protobug::Message
|
63
|
+
|
64
|
+
self.full_name = "dev.sigstore.rekor.v1.Checkpoint"
|
65
|
+
|
66
|
+
optional(1, "envelope", type: :string, proto3_optional: false)
|
67
|
+
end
|
68
|
+
|
69
|
+
# InclusionProof is the proof returned from the transparency log. Can
|
70
|
+
# be used for offline or online verification against the log.
|
71
|
+
class InclusionProof
|
72
|
+
extend Protobug::Message
|
73
|
+
|
74
|
+
self.full_name = "dev.sigstore.rekor.v1.InclusionProof"
|
75
|
+
|
76
|
+
# The index of the entry in the tree it was written to.
|
77
|
+
optional(
|
78
|
+
1,
|
79
|
+
"log_index",
|
80
|
+
type: :int64,
|
81
|
+
json_name: "logIndex",
|
82
|
+
proto3_optional: false
|
83
|
+
)
|
84
|
+
# The hash digest stored at the root of the merkle tree at the time
|
85
|
+
# the proof was generated.
|
86
|
+
optional(
|
87
|
+
2,
|
88
|
+
"root_hash",
|
89
|
+
type: :bytes,
|
90
|
+
json_name: "rootHash",
|
91
|
+
proto3_optional: false
|
92
|
+
)
|
93
|
+
# The size of the merkle tree at the time the proof was generated.
|
94
|
+
optional(
|
95
|
+
3,
|
96
|
+
"tree_size",
|
97
|
+
type: :int64,
|
98
|
+
json_name: "treeSize",
|
99
|
+
proto3_optional: false
|
100
|
+
)
|
101
|
+
# A list of hashes required to compute the inclusion proof, sorted
|
102
|
+
# in order from leaf to root.
|
103
|
+
# Note that leaf and root hashes are not included.
|
104
|
+
# The root hash is available separately in this message, and the
|
105
|
+
# leaf hash should be calculated by the client.
|
106
|
+
repeated(4, "hashes", type: :bytes)
|
107
|
+
# Signature of the tree head, as of the time of this proof was
|
108
|
+
# generated. See above info on 'Checkpoint' for more details.
|
109
|
+
optional(
|
110
|
+
5,
|
111
|
+
"checkpoint",
|
112
|
+
type: :message,
|
113
|
+
message_type: "dev.sigstore.rekor.v1.Checkpoint",
|
114
|
+
proto3_optional: false
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
118
|
+
# The inclusion promise is calculated by Rekor. It's calculated as a
|
119
|
+
# signature over a canonical JSON serialization of the persisted entry, the
|
120
|
+
# log ID, log index and the integration timestamp.
|
121
|
+
# See https://github.com/sigstore/rekor/blob/a6e58f72b6b18cc06cefe61808efd562b9726330/pkg/api/entries.go#L54
|
122
|
+
# The format of the signature depends on the transparency log's public key.
|
123
|
+
# If the signature algorithm requires a hash function and/or a signature
|
124
|
+
# scheme (e.g. RSA) those has to be retrieved out-of-band from the log's
|
125
|
+
# operators, together with the public key.
|
126
|
+
# This is used to verify the integration timestamp's value and that the log
|
127
|
+
# has promised to include the entry.
|
128
|
+
class InclusionPromise
|
129
|
+
extend Protobug::Message
|
130
|
+
|
131
|
+
self.full_name = "dev.sigstore.rekor.v1.InclusionPromise"
|
132
|
+
|
133
|
+
optional(
|
134
|
+
1,
|
135
|
+
"signed_entry_timestamp",
|
136
|
+
type: :bytes,
|
137
|
+
json_name: "signedEntryTimestamp",
|
138
|
+
proto3_optional: false
|
139
|
+
)
|
140
|
+
end
|
141
|
+
|
142
|
+
# TransparencyLogEntry captures all the details required from Rekor to
|
143
|
+
# reconstruct an entry, given that the payload is provided via other means.
|
144
|
+
# This type can easily be created from the existing response from Rekor.
|
145
|
+
# Future iterations could rely on Rekor returning the minimal set of
|
146
|
+
# attributes (excluding the payload) that are required for verifying the
|
147
|
+
# inclusion promise. The inclusion promise (called SignedEntryTimestamp in
|
148
|
+
# the response from Rekor) is similar to a Signed Certificate Timestamp
|
149
|
+
# as described here https://www.rfc-editor.org/rfc/rfc6962.html#section-3.2.
|
150
|
+
class TransparencyLogEntry
|
151
|
+
extend Protobug::Message
|
152
|
+
|
153
|
+
self.full_name = "dev.sigstore.rekor.v1.TransparencyLogEntry"
|
154
|
+
|
155
|
+
# The global index of the entry, used when querying the log by index.
|
156
|
+
optional(
|
157
|
+
1,
|
158
|
+
"log_index",
|
159
|
+
type: :int64,
|
160
|
+
json_name: "logIndex",
|
161
|
+
proto3_optional: false
|
162
|
+
)
|
163
|
+
# The unique identifier of the log.
|
164
|
+
optional(
|
165
|
+
2,
|
166
|
+
"log_id",
|
167
|
+
type: :message,
|
168
|
+
message_type: "dev.sigstore.common.v1.LogId",
|
169
|
+
json_name: "logId",
|
170
|
+
proto3_optional: false
|
171
|
+
)
|
172
|
+
# The kind (type) and version of the object associated with this
|
173
|
+
# entry. These values are required to construct the entry during
|
174
|
+
# verification.
|
175
|
+
optional(
|
176
|
+
3,
|
177
|
+
"kind_version",
|
178
|
+
type: :message,
|
179
|
+
message_type: "dev.sigstore.rekor.v1.KindVersion",
|
180
|
+
json_name: "kindVersion",
|
181
|
+
proto3_optional: false
|
182
|
+
)
|
183
|
+
# The UNIX timestamp from the log when the entry was persisted.
|
184
|
+
optional(
|
185
|
+
4,
|
186
|
+
"integrated_time",
|
187
|
+
type: :int64,
|
188
|
+
json_name: "integratedTime",
|
189
|
+
proto3_optional: false
|
190
|
+
)
|
191
|
+
# The inclusion promise/signed entry timestamp from the log.
|
192
|
+
# Required for v0.1 bundles, and MUST be verified.
|
193
|
+
# Optional for >= v0.2 bundles, and SHOULD be verified when present.
|
194
|
+
# Also may be used as a signed timestamp.
|
195
|
+
optional(
|
196
|
+
5,
|
197
|
+
"inclusion_promise",
|
198
|
+
type: :message,
|
199
|
+
message_type: "dev.sigstore.rekor.v1.InclusionPromise",
|
200
|
+
json_name: "inclusionPromise",
|
201
|
+
proto3_optional: false
|
202
|
+
)
|
203
|
+
# The inclusion proof can be used for offline or online verification
|
204
|
+
# that the entry was appended to the log, and that the log has not been
|
205
|
+
# altered.
|
206
|
+
optional(
|
207
|
+
6,
|
208
|
+
"inclusion_proof",
|
209
|
+
type: :message,
|
210
|
+
message_type: "dev.sigstore.rekor.v1.InclusionProof",
|
211
|
+
json_name: "inclusionProof",
|
212
|
+
proto3_optional: false
|
213
|
+
)
|
214
|
+
# Optional. The canonicalized transparency log entry, used to
|
215
|
+
# reconstruct the Signed Entry Timestamp (SET) during verification.
|
216
|
+
# The contents of this field are the same as the `body` field in
|
217
|
+
# a Rekor response, meaning that it does **not** include the "full"
|
218
|
+
# canonicalized form (of log index, ID, etc.) which are
|
219
|
+
# exposed as separate fields. The verifier is responsible for
|
220
|
+
# combining the `canonicalized_body`, `log_index`, `log_id`,
|
221
|
+
# and `integrated_time` into the payload that the SET's signature
|
222
|
+
# is generated over.
|
223
|
+
# This field is intended to be used in cases where the SET cannot be
|
224
|
+
# produced determinisitically (e.g. inconsistent JSON field ordering,
|
225
|
+
# differing whitespace, etc).
|
226
|
+
#
|
227
|
+
# If set, clients MUST verify that the signature referenced in the
|
228
|
+
# `canonicalized_body` matches the signature provided in the
|
229
|
+
# `Bundle.content`.
|
230
|
+
# If not set, clients are responsible for constructing an equivalent
|
231
|
+
# payload from other sources to verify the signature.
|
232
|
+
optional(
|
233
|
+
7,
|
234
|
+
"canonicalized_body",
|
235
|
+
type: :bytes,
|
236
|
+
json_name: "canonicalizedBody",
|
237
|
+
proto3_optional: false
|
238
|
+
)
|
239
|
+
end
|
240
|
+
|
241
|
+
def self.register_sigstore_rekor_protos(registry)
|
242
|
+
Google::Api.register_field_behavior_protos(registry)
|
243
|
+
Sigstore::Common::V1.register_sigstore_common_protos(registry)
|
244
|
+
registry.register(Sigstore::Rekor::V1::KindVersion)
|
245
|
+
registry.register(Sigstore::Rekor::V1::Checkpoint)
|
246
|
+
registry.register(Sigstore::Rekor::V1::InclusionProof)
|
247
|
+
registry.register(Sigstore::Rekor::V1::InclusionPromise)
|
248
|
+
registry.register(Sigstore::Rekor::V1::TransparencyLogEntry)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
@@ -0,0 +1,346 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Code generated by protoc-gen-protobug. DO NOT EDIT.
|
4
|
+
|
5
|
+
# source: sigstore_trustroot.proto
|
6
|
+
# syntax: proto3
|
7
|
+
# package: dev.sigstore.trustroot.v1
|
8
|
+
# options:
|
9
|
+
# java_package: "dev.sigstore.proto.trustroot.v1"
|
10
|
+
# java_outer_classname: "TrustRootProto"
|
11
|
+
# java_multiple_files: true
|
12
|
+
# go_package: "github.com/sigstore/protobuf-specs/gen/pb-go/trustroot/v1"
|
13
|
+
# ruby_package: "Sigstore::TrustRoot::V1"
|
14
|
+
|
15
|
+
# Copyright 2022 The Sigstore Authors.
|
16
|
+
#
|
17
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
18
|
+
# you may not use this file except in compliance with the License.
|
19
|
+
# You may obtain a copy of the License at
|
20
|
+
#
|
21
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
22
|
+
#
|
23
|
+
# Unless required by applicable law or agreed to in writing, software
|
24
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
25
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
26
|
+
# See the License for the specific language governing permissions and
|
27
|
+
# limitations under the License.
|
28
|
+
|
29
|
+
require "protobug"
|
30
|
+
|
31
|
+
require "google/api/field_behavior_pb"
|
32
|
+
|
33
|
+
require_relative "../../common/v1/sigstore_common_pb"
|
34
|
+
|
35
|
+
module Sigstore
|
36
|
+
module TrustRoot
|
37
|
+
module V1
|
38
|
+
# TransparencyLogInstance describes the immutable parameters from a
|
39
|
+
# transparency log.
|
40
|
+
# See https://www.rfc-editor.org/rfc/rfc9162.html#name-log-parameters
|
41
|
+
# for more details.
|
42
|
+
# The included parameters are the minimal set required to identify a log,
|
43
|
+
# and verify an inclusion proof/promise.
|
44
|
+
class TransparencyLogInstance
|
45
|
+
extend Protobug::Message
|
46
|
+
|
47
|
+
self.full_name = "dev.sigstore.trustroot.v1.TransparencyLogInstance"
|
48
|
+
|
49
|
+
# The base URL at which can be used to URLs for the client.
|
50
|
+
optional(
|
51
|
+
1,
|
52
|
+
"base_url",
|
53
|
+
type: :string,
|
54
|
+
json_name: "baseUrl",
|
55
|
+
proto3_optional: false
|
56
|
+
)
|
57
|
+
# The hash algorithm used for the Merkle Tree.
|
58
|
+
optional(
|
59
|
+
2,
|
60
|
+
"hash_algorithm",
|
61
|
+
type: :enum,
|
62
|
+
enum_type: "dev.sigstore.common.v1.HashAlgorithm",
|
63
|
+
json_name: "hashAlgorithm",
|
64
|
+
proto3_optional: false
|
65
|
+
)
|
66
|
+
# The public key used to verify signatures generated by the log.
|
67
|
+
# This attribute contains the signature algorithm used by the log.
|
68
|
+
optional(
|
69
|
+
3,
|
70
|
+
"public_key",
|
71
|
+
type: :message,
|
72
|
+
message_type: "dev.sigstore.common.v1.PublicKey",
|
73
|
+
json_name: "publicKey",
|
74
|
+
proto3_optional: false
|
75
|
+
)
|
76
|
+
# The unique identifier for this transparency log.
|
77
|
+
# Represented as the SHA-256 hash of the log's public key,
|
78
|
+
# calculated over the DER encoding of the key represented as
|
79
|
+
# SubjectPublicKeyInfo.
|
80
|
+
# See https://www.rfc-editor.org/rfc/rfc6962#section-3.2
|
81
|
+
optional(
|
82
|
+
4,
|
83
|
+
"log_id",
|
84
|
+
type: :message,
|
85
|
+
message_type: "dev.sigstore.common.v1.LogId",
|
86
|
+
json_name: "logId",
|
87
|
+
proto3_optional: false
|
88
|
+
)
|
89
|
+
# The checkpoint key identifier for the log used in a checkpoint.
|
90
|
+
# Optional, not provided for logs that do not generate checkpoints.
|
91
|
+
# For logs that do generate checkpoints, if not set, assume
|
92
|
+
# log_id equals checkpoint_key_id.
|
93
|
+
# Follows the specification described here
|
94
|
+
# for ECDSA and Ed25519 signatures:
|
95
|
+
# https://github.com/C2SP/C2SP/blob/main/signed-note.md#signatures
|
96
|
+
# For RSA signatures, the key ID will match the ECDSA format, the
|
97
|
+
# hashed DER-encoded SPKI public key. Publicly witnessed logs MUST NOT
|
98
|
+
# use RSA-signed checkpoints, since witnesses do not support
|
99
|
+
# RSA signatures.
|
100
|
+
# This is provided for convenience. Clients can also calculate the
|
101
|
+
# checkpoint key ID given the log's public key.
|
102
|
+
# SHOULD be set for logs generating Ed25519 signatures.
|
103
|
+
# SHOULD be 4 bytes long, as a truncated hash.
|
104
|
+
optional(
|
105
|
+
5,
|
106
|
+
"checkpoint_key_id",
|
107
|
+
type: :message,
|
108
|
+
message_type: "dev.sigstore.common.v1.LogId",
|
109
|
+
json_name: "checkpointKeyId",
|
110
|
+
proto3_optional: false
|
111
|
+
)
|
112
|
+
end
|
113
|
+
|
114
|
+
# CertificateAuthority enlists the information required to identify which
|
115
|
+
# CA to use and perform signature verification.
|
116
|
+
class CertificateAuthority
|
117
|
+
extend Protobug::Message
|
118
|
+
|
119
|
+
self.full_name = "dev.sigstore.trustroot.v1.CertificateAuthority"
|
120
|
+
|
121
|
+
# The root certificate MUST be self-signed, and so the subject and
|
122
|
+
# issuer are the same.
|
123
|
+
optional(
|
124
|
+
1,
|
125
|
+
"subject",
|
126
|
+
type: :message,
|
127
|
+
message_type: "dev.sigstore.common.v1.DistinguishedName",
|
128
|
+
proto3_optional: false
|
129
|
+
)
|
130
|
+
# The URI identifies the certificate authority.
|
131
|
+
#
|
132
|
+
# It is RECOMMENDED that the URI is the base URL for the certificate
|
133
|
+
# authority, that can be provided to any SDK/client provided
|
134
|
+
# by the certificate authority to interact with the certificate
|
135
|
+
# authority.
|
136
|
+
optional(2, "uri", type: :string, proto3_optional: false)
|
137
|
+
# The certificate chain for this CA. The last certificate in the chain
|
138
|
+
# MUST be the trust anchor. The trust anchor MAY be a self-signed root
|
139
|
+
# CA certificate or MAY be an intermediate CA certificate.
|
140
|
+
optional(
|
141
|
+
3,
|
142
|
+
"cert_chain",
|
143
|
+
type: :message,
|
144
|
+
message_type: "dev.sigstore.common.v1.X509CertificateChain",
|
145
|
+
json_name: "certChain",
|
146
|
+
proto3_optional: false
|
147
|
+
)
|
148
|
+
# The time the *entire* chain was valid. This is at max the
|
149
|
+
# longest interval when *all* certificates in the chain were valid,
|
150
|
+
# but it MAY be shorter. Clients MUST check timestamps against *both*
|
151
|
+
# the `valid_for` time range *and* the entire certificate chain.
|
152
|
+
#
|
153
|
+
# The TimeRange should be considered valid *inclusive* of the
|
154
|
+
# endpoints.
|
155
|
+
optional(
|
156
|
+
4,
|
157
|
+
"valid_for",
|
158
|
+
type: :message,
|
159
|
+
message_type: "dev.sigstore.common.v1.TimeRange",
|
160
|
+
json_name: "validFor",
|
161
|
+
proto3_optional: false
|
162
|
+
)
|
163
|
+
end
|
164
|
+
|
165
|
+
# TrustedRoot describes the client's complete set of trusted entities.
|
166
|
+
# How the TrustedRoot is populated is not specified, but can be a
|
167
|
+
# combination of many sources such as TUF repositories, files on disk etc.
|
168
|
+
#
|
169
|
+
# The TrustedRoot is not meant to be used for any artifact verification, only
|
170
|
+
# to capture the complete/global set of trusted verification materials.
|
171
|
+
# When verifying an artifact, based on the artifact and policies, a selection
|
172
|
+
# of keys/authorities are expected to be extracted and provided to the
|
173
|
+
# verification function. This way the set of keys/authorities can be kept to
|
174
|
+
# a minimal set by the policy to gain better control over what signatures
|
175
|
+
# that are allowed.
|
176
|
+
#
|
177
|
+
# The embedded transparency logs, CT logs, CAs and TSAs MUST include any
|
178
|
+
# previously used instance -- otherwise signatures made in the past cannot
|
179
|
+
# be verified.
|
180
|
+
#
|
181
|
+
# All the listed instances SHOULD be sorted by the 'valid_for' in ascending
|
182
|
+
# order, that is, the oldest instance first. Only the last instance is
|
183
|
+
# allowed to have their 'end' timestamp unset. All previous instances MUST
|
184
|
+
# have a closed interval of validity. The last instance MAY have a closed
|
185
|
+
# interval. Clients MUST accept instances that overlaps in time, if not
|
186
|
+
# clients may experience problems during rotations of verification
|
187
|
+
# materials.
|
188
|
+
#
|
189
|
+
# To be able to manage planned rotations of either transparency logs or
|
190
|
+
# certificate authorities, clienst MUST accept lists of instances where
|
191
|
+
# the last instance have a 'valid_for' that belongs to the future.
|
192
|
+
# This should not be a problem as clients SHOULD first seek the trust root
|
193
|
+
# for a suitable instance before creating a per artifact trust root (that
|
194
|
+
# is, a sub-set of the complete trust root) that is used for verification.
|
195
|
+
class TrustedRoot
|
196
|
+
extend Protobug::Message
|
197
|
+
|
198
|
+
self.full_name = "dev.sigstore.trustroot.v1.TrustedRoot"
|
199
|
+
|
200
|
+
# MUST be application/vnd.dev.sigstore.trustedroot.v0.1+json
|
201
|
+
# when encoded as JSON.
|
202
|
+
# Clients MUST be able to process and parse content with the media
|
203
|
+
# type defined in the old format:
|
204
|
+
# application/vnd.dev.sigstore.trustedroot+json;version=0.1
|
205
|
+
optional(
|
206
|
+
1,
|
207
|
+
"media_type",
|
208
|
+
type: :string,
|
209
|
+
json_name: "mediaType",
|
210
|
+
proto3_optional: false
|
211
|
+
)
|
212
|
+
# A set of trusted Rekor servers.
|
213
|
+
repeated(
|
214
|
+
2,
|
215
|
+
"tlogs",
|
216
|
+
type: :message,
|
217
|
+
message_type: "dev.sigstore.trustroot.v1.TransparencyLogInstance"
|
218
|
+
)
|
219
|
+
# A set of trusted certificate authorities (e.g Fulcio), and any
|
220
|
+
# intermediate certificates they provide.
|
221
|
+
# If a CA is issuing multiple intermediate certificate, each
|
222
|
+
# combination shall be represented as separate chain. I.e, a single
|
223
|
+
# root cert may appear in multiple chains but with different
|
224
|
+
# intermediate and/or leaf certificates.
|
225
|
+
# The certificates are intended to be used for verifying artifact
|
226
|
+
# signatures.
|
227
|
+
repeated(
|
228
|
+
3,
|
229
|
+
"certificate_authorities",
|
230
|
+
type: :message,
|
231
|
+
message_type: "dev.sigstore.trustroot.v1.CertificateAuthority",
|
232
|
+
json_name: "certificateAuthorities"
|
233
|
+
)
|
234
|
+
# A set of trusted certificate transparency logs.
|
235
|
+
repeated(
|
236
|
+
4,
|
237
|
+
"ctlogs",
|
238
|
+
type: :message,
|
239
|
+
message_type: "dev.sigstore.trustroot.v1.TransparencyLogInstance"
|
240
|
+
)
|
241
|
+
# A set of trusted timestamping authorities.
|
242
|
+
repeated(
|
243
|
+
5,
|
244
|
+
"timestamp_authorities",
|
245
|
+
type: :message,
|
246
|
+
message_type: "dev.sigstore.trustroot.v1.CertificateAuthority",
|
247
|
+
json_name: "timestampAuthorities"
|
248
|
+
)
|
249
|
+
end
|
250
|
+
|
251
|
+
# SigningConfig represents the trusted entities/state needed by Sigstore
|
252
|
+
# signing. In particular, it primarily contains service URLs that a Sigstore
|
253
|
+
# signer may need to connect to for the online aspects of signing.
|
254
|
+
class SigningConfig
|
255
|
+
extend Protobug::Message
|
256
|
+
|
257
|
+
self.full_name = "dev.sigstore.trustroot.v1.SigningConfig"
|
258
|
+
|
259
|
+
# A URL to a Fulcio-compatible CA, capable of receiving
|
260
|
+
# Certificate Signing Requests (CSRs) and responding with
|
261
|
+
# issued certificates.
|
262
|
+
#
|
263
|
+
# This URL **MUST** be the "base" URL for the CA, which clients
|
264
|
+
# should construct an appropriate CSR endpoint on top of.
|
265
|
+
# For example, if `ca_url` is `https://example.com/ca`, then
|
266
|
+
# the client **MAY** construct the CSR endpoint as
|
267
|
+
# `https://example.com/ca/api/v2/signingCert`.
|
268
|
+
optional(
|
269
|
+
1,
|
270
|
+
"ca_url",
|
271
|
+
type: :string,
|
272
|
+
json_name: "caUrl",
|
273
|
+
proto3_optional: false
|
274
|
+
)
|
275
|
+
# A URL to an OpenID Connect identity provider.
|
276
|
+
#
|
277
|
+
# This URL **MUST** be the "base" URL for the OIDC IdP, which clients
|
278
|
+
# should perform well-known OpenID Connect discovery against.
|
279
|
+
optional(
|
280
|
+
2,
|
281
|
+
"oidc_url",
|
282
|
+
type: :string,
|
283
|
+
json_name: "oidcUrl",
|
284
|
+
proto3_optional: false
|
285
|
+
)
|
286
|
+
# One or more URLs to Rekor-compatible transparency log.
|
287
|
+
#
|
288
|
+
# Each URL **MUST** be the "base" URL for the transparency log,
|
289
|
+
# which clients should construct appropriate API endpoints on top of.
|
290
|
+
repeated(3, "tlog_urls", type: :string, json_name: "tlogUrls")
|
291
|
+
# One ore more URLs to RFC 3161 Time Stamping Authority (TSA).
|
292
|
+
#
|
293
|
+
# Each URL **MUST** be the **full** URL for the TSA, meaning that it
|
294
|
+
# should be suitable for submitting Time Stamp Requests (TSRs) to
|
295
|
+
# via HTTP, per RFC 3161.
|
296
|
+
repeated(4, "tsa_urls", type: :string, json_name: "tsaUrls")
|
297
|
+
end
|
298
|
+
|
299
|
+
# ClientTrustConfig describes the complete state needed by a client
|
300
|
+
# to perform both signing and verification operations against a particular
|
301
|
+
# instance of Sigstore.
|
302
|
+
class ClientTrustConfig
|
303
|
+
extend Protobug::Message
|
304
|
+
|
305
|
+
self.full_name = "dev.sigstore.trustroot.v1.ClientTrustConfig"
|
306
|
+
|
307
|
+
# MUST be application/vnd.dev.sigstore.clienttrustconfig.v0.1+json
|
308
|
+
optional(
|
309
|
+
1,
|
310
|
+
"media_type",
|
311
|
+
type: :string,
|
312
|
+
json_name: "mediaType",
|
313
|
+
proto3_optional: false
|
314
|
+
)
|
315
|
+
# The root of trust, which MUST be present.
|
316
|
+
optional(
|
317
|
+
2,
|
318
|
+
"trusted_root",
|
319
|
+
type: :message,
|
320
|
+
message_type: "dev.sigstore.trustroot.v1.TrustedRoot",
|
321
|
+
json_name: "trustedRoot",
|
322
|
+
proto3_optional: false
|
323
|
+
)
|
324
|
+
# Configuration for signing clients, which MUST be present.
|
325
|
+
optional(
|
326
|
+
3,
|
327
|
+
"signing_config",
|
328
|
+
type: :message,
|
329
|
+
message_type: "dev.sigstore.trustroot.v1.SigningConfig",
|
330
|
+
json_name: "signingConfig",
|
331
|
+
proto3_optional: false
|
332
|
+
)
|
333
|
+
end
|
334
|
+
|
335
|
+
def self.register_sigstore_trustroot_protos(registry)
|
336
|
+
Google::Api.register_field_behavior_protos(registry)
|
337
|
+
Sigstore::Common::V1.register_sigstore_common_protos(registry)
|
338
|
+
registry.register(Sigstore::TrustRoot::V1::TransparencyLogInstance)
|
339
|
+
registry.register(Sigstore::TrustRoot::V1::CertificateAuthority)
|
340
|
+
registry.register(Sigstore::TrustRoot::V1::TrustedRoot)
|
341
|
+
registry.register(Sigstore::TrustRoot::V1::SigningConfig)
|
342
|
+
registry.register(Sigstore::TrustRoot::V1::ClientTrustConfig)
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|