google-cloud-binary_authorization-v1beta1 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.
@@ -0,0 +1,283 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # name_descriptor: {
37
+ # pattern: "projects/{project}/topics/{topic}"
38
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
+ # parent_name_extractor: "projects/{project}"
40
+ # }
41
+ # };
42
+ # }
43
+ #
44
+ # The ResourceDescriptor Yaml config will look like:
45
+ #
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
+ #
53
+ # Sometimes, resources have multiple patterns, typically because they can
54
+ # live under multiple parents.
55
+ #
56
+ # Example:
57
+ #
58
+ # message LogEntry {
59
+ # option (google.api.resource) = {
60
+ # type: "logging.googleapis.com/LogEntry"
61
+ # name_descriptor: {
62
+ # pattern: "projects/{project}/logs/{log}"
63
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
+ # parent_name_extractor: "projects/{project}"
65
+ # }
66
+ # name_descriptor: {
67
+ # pattern: "folders/{folder}/logs/{log}"
68
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
+ # parent_name_extractor: "folders/{folder}"
70
+ # }
71
+ # name_descriptor: {
72
+ # pattern: "organizations/{organization}/logs/{log}"
73
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
+ # parent_name_extractor: "organizations/{organization}"
75
+ # }
76
+ # name_descriptor: {
77
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
+ # parent_type: "billing.googleapis.com/BillingAccount"
79
+ # parent_name_extractor: "billingAccounts/{billing_account}"
80
+ # }
81
+ # };
82
+ # }
83
+ #
84
+ # The ResourceDescriptor Yaml config will look like:
85
+ #
86
+ # resources:
87
+ # - type: 'logging.googleapis.com/LogEntry'
88
+ # name_descriptor:
89
+ # - pattern: "projects/{project}/logs/{log}"
90
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
+ # parent_name_extractor: "projects/{project}"
92
+ # - pattern: "folders/{folder}/logs/{log}"
93
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
+ # parent_name_extractor: "folders/{folder}"
95
+ # - pattern: "organizations/{organization}/logs/{log}"
96
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
+ # parent_name_extractor: "organizations/{organization}"
98
+ # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
+ # parent_type: "billing.googleapis.com/BillingAccount"
100
+ # parent_name_extractor: "billingAccounts/{billing_account}"
101
+ #
102
+ # For flexible resources, the resource name doesn't contain parent names, but
103
+ # the resource itself has parents for policy evaluation.
104
+ #
105
+ # Example:
106
+ #
107
+ # message Shelf {
108
+ # option (google.api.resource) = {
109
+ # type: "library.googleapis.com/Shelf"
110
+ # name_descriptor: {
111
+ # pattern: "shelves/{shelf}"
112
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
+ # }
114
+ # name_descriptor: {
115
+ # pattern: "shelves/{shelf}"
116
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
+ # }
118
+ # };
119
+ # }
120
+ #
121
+ # The ResourceDescriptor Yaml config will look like:
122
+ #
123
+ # resources:
124
+ # - type: 'library.googleapis.com/Shelf'
125
+ # name_descriptor:
126
+ # - pattern: "shelves/{shelf}"
127
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
+ # - pattern: "shelves/{shelf}"
129
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
+ # @!attribute [rw] type
131
+ # @return [::String]
132
+ # The resource type. It must be in the format of
133
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
+ # singular and must not include version numbers.
135
+ #
136
+ # Example: `storage.googleapis.com/Bucket`
137
+ #
138
+ # The value of the resource_type_kind must follow the regular expression
139
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
140
+ # should use PascalCase (UpperCamelCase). The maximum number of
141
+ # characters allowed for the `resource_type_kind` is 100.
142
+ # @!attribute [rw] pattern
143
+ # @return [::Array<::String>]
144
+ # Optional. The relative resource name pattern associated with this resource
145
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
146
+ #
147
+ # The path pattern must follow the syntax, which aligns with HTTP binding
148
+ # syntax:
149
+ #
150
+ # Template = Segment { "/" Segment } ;
151
+ # Segment = LITERAL | Variable ;
152
+ # Variable = "{" LITERAL "}" ;
153
+ #
154
+ # Examples:
155
+ #
156
+ # - "projects/\\{project}/topics/\\{topic}"
157
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
158
+ #
159
+ # The components in braces correspond to the IDs for each resource in the
160
+ # hierarchy. It is expected that, if multiple patterns are provided,
161
+ # the same component name (e.g. "project") refers to IDs of the same
162
+ # type of resource.
163
+ # @!attribute [rw] name_field
164
+ # @return [::String]
165
+ # Optional. The field on the resource that designates the resource name
166
+ # field. If omitted, this is assumed to be "name".
167
+ # @!attribute [rw] history
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
+ # Optional. The historical or future-looking state of the resource pattern.
170
+ #
171
+ # Example:
172
+ #
173
+ # // The InspectTemplate message originally only supported resource
174
+ # // names with organization, and project was added later.
175
+ # message InspectTemplate {
176
+ # option (google.api.resource) = {
177
+ # type: "dlp.googleapis.com/InspectTemplate"
178
+ # pattern:
179
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
180
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
181
+ # history: ORIGINALLY_SINGLE_PATTERN
182
+ # };
183
+ # }
184
+ # @!attribute [rw] plural
185
+ # @return [::String]
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
190
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
194
+ # @!attribute [rw] singular
195
+ # @return [::String]
196
+ # The same concept of the `singular` field in k8s CRD spec
197
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
198
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
204
+ class ResourceDescriptor
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+
208
+ # A description of the historical or future-looking state of the
209
+ # resource pattern.
210
+ module History
211
+ # The "unset" value.
212
+ HISTORY_UNSPECIFIED = 0
213
+
214
+ # The resource originally had one pattern and launched as such, and
215
+ # additional patterns were added later.
216
+ ORIGINALLY_SINGLE_PATTERN = 1
217
+
218
+ # The resource has one pattern, but the API owner expects to add more
219
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
220
+ # that from being necessary once there are multiple patterns.)
221
+ FUTURE_MULTI_PATTERN = 2
222
+ end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
239
+ end
240
+
241
+ # Defines a proto annotation that describes a string field that refers to
242
+ # an API resource.
243
+ # @!attribute [rw] type
244
+ # @return [::String]
245
+ # The resource type that the annotated field references.
246
+ #
247
+ # Example:
248
+ #
249
+ # message Subscription {
250
+ # string topic = 2 [(google.api.resource_reference) = {
251
+ # type: "pubsub.googleapis.com/Topic"
252
+ # }];
253
+ # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
265
+ # @!attribute [rw] child_type
266
+ # @return [::String]
267
+ # The resource type of a child collection that the annotated field
268
+ # references. This is useful for annotating the `parent` field that
269
+ # doesn't have a fixed resource type.
270
+ #
271
+ # Example:
272
+ #
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
278
+ class ResourceReference
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
+ end
282
+ end
283
+ end
@@ -0,0 +1,317 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module BinaryAuthorization
23
+ module V1beta1
24
+ # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for container image binary authorization.
25
+ # @!attribute [r] name
26
+ # @return [::String]
27
+ # Output only. The resource name, in the format `projects/*/policy`. There is
28
+ # at most one policy per project.
29
+ # @!attribute [rw] description
30
+ # @return [::String]
31
+ # Optional. A descriptive comment.
32
+ # @!attribute [rw] global_policy_evaluation_mode
33
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy::GlobalPolicyEvaluationMode]
34
+ # Optional. Controls the evaluation of a Google-maintained global admission
35
+ # policy for common system-level images. Images not covered by the global
36
+ # policy will be subject to the project admission policy. This setting
37
+ # has no effect when specified inside a global admission policy.
38
+ # @!attribute [rw] admission_whitelist_patterns
39
+ # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern>]
40
+ # Optional. Admission policy whitelisting. A matching admission request will
41
+ # always be permitted. This feature is typically used to exclude Google or
42
+ # third-party infrastructure images from Binary Authorization policies.
43
+ # @!attribute [rw] cluster_admission_rules
44
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}]
45
+ # Optional. Per-cluster admission rules. Cluster spec format:
46
+ # `location.clusterId`. There can be at most one admission rule per cluster
47
+ # spec.
48
+ # A `location` is either a compute zone (e.g. us-central1-a) or a region
49
+ # (e.g. us-central1).
50
+ # For `clusterId` syntax restrictions see
51
+ # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
52
+ # @!attribute [rw] default_admission_rule
53
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule]
54
+ # Required. Default admission rule for a cluster without a per-cluster, per-
55
+ # kubernetes-service-account, or per-istio-service-identity admission rule.
56
+ # @!attribute [r] update_time
57
+ # @return [::Google::Protobuf::Timestamp]
58
+ # Output only. Time when the policy was last updated.
59
+ class Policy
60
+ include ::Google::Protobuf::MessageExts
61
+ extend ::Google::Protobuf::MessageExts::ClassMethods
62
+
63
+ # @!attribute [rw] key
64
+ # @return [::String]
65
+ # @!attribute [rw] value
66
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule]
67
+ class ClusterAdmissionRulesEntry
68
+ include ::Google::Protobuf::MessageExts
69
+ extend ::Google::Protobuf::MessageExts::ClassMethods
70
+ end
71
+
72
+ module GlobalPolicyEvaluationMode
73
+ # Not specified: DISABLE is assumed.
74
+ GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0
75
+
76
+ # Enables global policy evaluation.
77
+ ENABLE = 1
78
+
79
+ # Disables global policy evaluation.
80
+ DISABLE = 2
81
+ end
82
+ end
83
+
84
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission whitelist pattern} exempts images
85
+ # from checks by {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rules}.
86
+ # @!attribute [rw] name_pattern
87
+ # @return [::String]
88
+ # An image name pattern to whitelist, in the form `registry/path/to/image`.
89
+ # This supports a trailing `*` as a wildcard, but this is allowed only in
90
+ # text after the `registry/` part.
91
+ class AdmissionWhitelistPattern
92
+ include ::Google::Protobuf::MessageExts
93
+ extend ::Google::Protobuf::MessageExts::ClassMethods
94
+ end
95
+
96
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} specifies either that all container images
97
+ # used in a pod creation request must be attested to by one or more
98
+ # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod creations will be allowed, or that all
99
+ # pod creations will be denied.
100
+ #
101
+ # Images matching an {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission whitelist pattern}
102
+ # are exempted from admission rules and will never block a pod creation.
103
+ # @!attribute [rw] evaluation_mode
104
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode]
105
+ # Required. How this admission rule will be evaluated.
106
+ # @!attribute [rw] require_attestations_by
107
+ # @return [::Array<::String>]
108
+ # Optional. The resource names of the attestors that must attest to
109
+ # a container image, in the format `projects/*/attestors/*`. Each
110
+ # attestor must exist before a policy can reference it. To add an attestor
111
+ # to a policy the principal issuing the policy change request must be able
112
+ # to read the attestor resource.
113
+ #
114
+ # Note: this field must be non-empty when the evaluation_mode field specifies
115
+ # REQUIRE_ATTESTATION, otherwise it must be empty.
116
+ # @!attribute [rw] enforcement_mode
117
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EnforcementMode]
118
+ # Required. The action when a pod creation is denied by the admission rule.
119
+ class AdmissionRule
120
+ include ::Google::Protobuf::MessageExts
121
+ extend ::Google::Protobuf::MessageExts::ClassMethods
122
+
123
+ module EvaluationMode
124
+ # Do not use.
125
+ EVALUATION_MODE_UNSPECIFIED = 0
126
+
127
+ # This rule allows all all pod creations.
128
+ ALWAYS_ALLOW = 1
129
+
130
+ # This rule allows a pod creation if all the attestors listed in
131
+ # 'require_attestations_by' have valid attestations for all of the
132
+ # images in the pod spec.
133
+ REQUIRE_ATTESTATION = 2
134
+
135
+ # This rule denies all pod creations.
136
+ ALWAYS_DENY = 3
137
+ end
138
+
139
+ # Defines the possible actions when a pod creation is denied by an admission
140
+ # rule.
141
+ module EnforcementMode
142
+ # Do not use.
143
+ ENFORCEMENT_MODE_UNSPECIFIED = 0
144
+
145
+ # Enforce the admission rule by blocking the pod creation.
146
+ ENFORCED_BLOCK_AND_AUDIT_LOG = 1
147
+
148
+ # Dryrun mode: Audit logging only. This will allow the pod creation as if
149
+ # the admission request had specified break-glass.
150
+ DRYRUN_AUDIT_LOG_ONLY = 2
151
+ end
152
+ end
153
+
154
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests to container image
155
+ # artifacts. An existing attestor cannot be modified except where
156
+ # indicated.
157
+ # @!attribute [rw] name
158
+ # @return [::String]
159
+ # Required. The resource name, in the format:
160
+ # `projects/*/attestors/*`. This field may not be updated.
161
+ # @!attribute [rw] description
162
+ # @return [::String]
163
+ # Optional. A descriptive comment. This field may be updated.
164
+ # The field may be displayed in chooser dialogs.
165
+ # @!attribute [rw] user_owned_drydock_note
166
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote]
167
+ # A Drydock ATTESTATION_AUTHORITY Note, created by the user.
168
+ # @!attribute [r] update_time
169
+ # @return [::Google::Protobuf::Timestamp]
170
+ # Output only. Time when the attestor was last updated.
171
+ class Attestor
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+ end
175
+
176
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote user owned drydock note} references a Drydock
177
+ # ATTESTATION_AUTHORITY Note created by the user.
178
+ # @!attribute [rw] note_reference
179
+ # @return [::String]
180
+ # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
181
+ # created by the user, in the format: `projects/*/notes/*` (or the legacy
182
+ # `providers/*/notes/*`). This field may not be updated.
183
+ #
184
+ # An attestation by this attestor is stored as a Drydock
185
+ # ATTESTATION_AUTHORITY Occurrence that names a container image and that
186
+ # links to this Note. Drydock is an external dependency.
187
+ # @!attribute [rw] public_keys
188
+ # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey>]
189
+ # Optional. Public keys that verify attestations signed by this
190
+ # attestor. This field may be updated.
191
+ #
192
+ # If this field is non-empty, one of the specified public keys must
193
+ # verify that an attestation was signed by this attestor for the
194
+ # image specified in the admission request.
195
+ #
196
+ # If this field is empty, this attestor always returns that no
197
+ # valid attestations exist.
198
+ # @!attribute [r] delegation_service_account_email
199
+ # @return [::String]
200
+ # Output only. This field will contain the service account email address
201
+ # that this Attestor will use as the principal when querying Container
202
+ # Analysis. Attestor administrators must grant this service account the
203
+ # IAM role needed to read attestations from the [note_reference][Note] in
204
+ # Container Analysis (`containeranalysis.notes.occurrences.viewer`).
205
+ #
206
+ # This email address is fixed for the lifetime of the Attestor, but callers
207
+ # should not make any other assumptions about the service account email;
208
+ # future versions may use an email based on a different naming pattern.
209
+ class UserOwnedDrydockNote
210
+ include ::Google::Protobuf::MessageExts
211
+ extend ::Google::Protobuf::MessageExts::ClassMethods
212
+ end
213
+
214
+ # A public key in the PkixPublicKey format (see
215
+ # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
216
+ # Public keys of this type are typically textually encoded using the PEM
217
+ # format.
218
+ # @!attribute [rw] public_key_pem
219
+ # @return [::String]
220
+ # A PEM-encoded public key, as described in
221
+ # https://tools.ietf.org/html/rfc7468#section-13
222
+ # @!attribute [rw] signature_algorithm
223
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey::SignatureAlgorithm]
224
+ # The signature algorithm used to verify a message against a signature using
225
+ # this key.
226
+ # These signature algorithm must match the structure and any object
227
+ # identifiers encoded in `public_key_pem` (i.e. this algorithm must match
228
+ # that of the public key).
229
+ class PkixPublicKey
230
+ include ::Google::Protobuf::MessageExts
231
+ extend ::Google::Protobuf::MessageExts::ClassMethods
232
+
233
+ # Represents a signature algorithm and other information necessary to verify
234
+ # signatures with a given public key.
235
+ # This is based primarily on the public key types supported by Tink's
236
+ # PemKeyType, which is in turn based on KMS's supported signing algorithms.
237
+ # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz
238
+ # might support additional public key types independently of Tink and/or KMS.
239
+ module SignatureAlgorithm
240
+ # Not specified.
241
+ SIGNATURE_ALGORITHM_UNSPECIFIED = 0
242
+
243
+ # RSASSA-PSS 2048 bit key with a SHA256 digest.
244
+ RSA_PSS_2048_SHA256 = 1
245
+
246
+ # RSASSA-PSS 3072 bit key with a SHA256 digest.
247
+ RSA_PSS_3072_SHA256 = 2
248
+
249
+ # RSASSA-PSS 4096 bit key with a SHA256 digest.
250
+ RSA_PSS_4096_SHA256 = 3
251
+
252
+ # RSASSA-PSS 4096 bit key with a SHA512 digest.
253
+ RSA_PSS_4096_SHA512 = 4
254
+
255
+ # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
256
+ RSA_SIGN_PKCS1_2048_SHA256 = 5
257
+
258
+ # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
259
+ RSA_SIGN_PKCS1_3072_SHA256 = 6
260
+
261
+ # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
262
+ RSA_SIGN_PKCS1_4096_SHA256 = 7
263
+
264
+ # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
265
+ RSA_SIGN_PKCS1_4096_SHA512 = 8
266
+
267
+ # ECDSA on the NIST P-256 curve with a SHA256 digest.
268
+ ECDSA_P256_SHA256 = 9
269
+
270
+ # ECDSA on the NIST P-384 curve with a SHA384 digest.
271
+ ECDSA_P384_SHA384 = 10
272
+
273
+ # ECDSA on the NIST P-521 curve with a SHA512 digest.
274
+ ECDSA_P521_SHA512 = 11
275
+ end
276
+ end
277
+
278
+ # An {::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey attestor public key} that will be used to verify
279
+ # attestations signed by this attestor.
280
+ # @!attribute [rw] comment
281
+ # @return [::String]
282
+ # Optional. A descriptive comment. This field may be updated.
283
+ # @!attribute [rw] id
284
+ # @return [::String]
285
+ # The ID of this public key.
286
+ # Signatures verified by BinAuthz must include the ID of the public key that
287
+ # can be used to verify them, and that ID must match the contents of this
288
+ # field exactly.
289
+ # Additional restrictions on this field can be imposed based on which public
290
+ # key type is encapsulated. See the documentation on `public_key` cases below
291
+ # for details.
292
+ # @!attribute [rw] ascii_armored_pgp_public_key
293
+ # @return [::String]
294
+ # ASCII-armored representation of a PGP public key, as the entire output by
295
+ # the command `gpg --export --armor foo@example.com` (either LF or CRLF
296
+ # line endings).
297
+ # When using this field, `id` should be left blank. The BinAuthz API
298
+ # handlers will calculate the ID and fill it in automatically. BinAuthz
299
+ # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
300
+ # upper-case hex. If `id` is provided by the caller, it will be
301
+ # overwritten by the API-calculated ID.
302
+ # @!attribute [rw] pkix_public_key
303
+ # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey]
304
+ # A raw PKIX SubjectPublicKeyInfo format public key.
305
+ #
306
+ # NOTE: `id` may be explicitly provided by the caller when using this
307
+ # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
308
+ # blank, a default one will be computed based on the digest of the DER
309
+ # encoding of the public key.
310
+ class AttestorPublicKey
311
+ include ::Google::Protobuf::MessageExts
312
+ extend ::Google::Protobuf::MessageExts::ClassMethods
313
+ end
314
+ end
315
+ end
316
+ end
317
+ end