/
privatecacertificatetemplate_types.go
286 lines (226 loc) · 13.2 KB
/
privatecacertificatetemplate_types.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
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------
//
// *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
//
// ----------------------------------------------------------------------------
//
// This file is automatically generated by Config Connector and manual
// changes will be clobbered when the file is regenerated.
//
// ----------------------------------------------------------------------------
// *** DISCLAIMER ***
// Config Connector's go-client for CRDs is currently in ALPHA, which means
// that future versions of the go-client may include breaking changes.
// Please try it out and give us feedback!
package v1beta1
import (
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type CertificatetemplateAdditionalExtensions struct {
/* Optional. Indicates whether or not this extension is critical (i.e., if the client does not know how to handle this extension, the client should consider this to be an error). */
// +optional
Critical *bool `json:"critical,omitempty"`
/* Required. The OID for this X.509 extension. */
ObjectId CertificatetemplateObjectId `json:"objectId"`
/* Required. The value of this X.509 extension. */
Value string `json:"value"`
}
type CertificatetemplateBaseKeyUsage struct {
/* The key may be used to sign certificates. */
// +optional
CertSign *bool `json:"certSign,omitempty"`
/* The key may be used for cryptographic commitments. Note that this may also be referred to as "non-repudiation". */
// +optional
ContentCommitment *bool `json:"contentCommitment,omitempty"`
/* The key may be used sign certificate revocation lists. */
// +optional
CrlSign *bool `json:"crlSign,omitempty"`
/* The key may be used to encipher data. */
// +optional
DataEncipherment *bool `json:"dataEncipherment,omitempty"`
/* The key may be used to decipher only. */
// +optional
DecipherOnly *bool `json:"decipherOnly,omitempty"`
/* The key may be used for digital signatures. */
// +optional
DigitalSignature *bool `json:"digitalSignature,omitempty"`
/* The key may be used to encipher only. */
// +optional
EncipherOnly *bool `json:"encipherOnly,omitempty"`
/* The key may be used in a key agreement protocol. */
// +optional
KeyAgreement *bool `json:"keyAgreement,omitempty"`
/* The key may be used to encipher other keys. */
// +optional
KeyEncipherment *bool `json:"keyEncipherment,omitempty"`
}
type CertificatetemplateCaOptions struct {
/* Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this value is missing, the extension will be omitted from the CA certificate. */
// +optional
IsCa *bool `json:"isCa,omitempty"`
/* Optional. Refers to the path length restriction X.509 extension. For a CA certificate, this value describes the depth of subordinate CA certificates that are allowed. If this value is less than 0, the request will fail. If this value is missing, the max path length will be omitted from the CA certificate. */
// +optional
MaxIssuerPathLength *int `json:"maxIssuerPathLength,omitempty"`
}
type CertificatetemplateCelExpression struct {
/* Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
// +optional
Description *string `json:"description,omitempty"`
/* Textual representation of an expression in Common Expression Language syntax. */
// +optional
Expression *string `json:"expression,omitempty"`
/* Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
// +optional
Location *string `json:"location,omitempty"`
/* Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */
// +optional
Title *string `json:"title,omitempty"`
}
type CertificatetemplateExtendedKeyUsage struct {
/* Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW client authentication", though regularly used for non-WWW TLS. */
// +optional
ClientAuth *bool `json:"clientAuth,omitempty"`
/* Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of downloadable executable code client authentication". */
// +optional
CodeSigning *bool `json:"codeSigning,omitempty"`
/* Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email protection". */
// +optional
EmailProtection *bool `json:"emailProtection,omitempty"`
/* Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing OCSP responses". */
// +optional
OcspSigning *bool `json:"ocspSigning,omitempty"`
/* Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW server authentication", though regularly used for non-WWW TLS. */
// +optional
ServerAuth *bool `json:"serverAuth,omitempty"`
/* Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding the hash of an object to a time". */
// +optional
TimeStamping *bool `json:"timeStamping,omitempty"`
}
type CertificatetemplateIdentityConstraints struct {
/* Required. If this is true, the SubjectAltNames extension may be copied from a certificate request into the signed certificate. Otherwise, the requested SubjectAltNames will be discarded. */
AllowSubjectAltNamesPassthrough bool `json:"allowSubjectAltNamesPassthrough"`
/* Required. If this is true, the Subject field may be copied from a certificate request into the signed certificate. Otherwise, the requested Subject will be discarded. */
AllowSubjectPassthrough bool `json:"allowSubjectPassthrough"`
/* Optional. A CEL expression that may be used to validate the resolved X.509 Subject and/or Subject Alternative Name before a certificate is signed. To see the full allowed syntax and some examples, see https://cloud.google.com/certificate-authority-service/docs/using-cel */
// +optional
CelExpression *CertificatetemplateCelExpression `json:"celExpression,omitempty"`
}
type CertificatetemplateKeyUsage struct {
/* Describes high-level ways in which a key may be used. */
// +optional
BaseKeyUsage *CertificatetemplateBaseKeyUsage `json:"baseKeyUsage,omitempty"`
/* Detailed scenarios in which a key may be used. */
// +optional
ExtendedKeyUsage *CertificatetemplateExtendedKeyUsage `json:"extendedKeyUsage,omitempty"`
/* Used to describe extended key usages that are not listed in the KeyUsage.ExtendedKeyUsageOptions message. */
// +optional
UnknownExtendedKeyUsages []CertificatetemplateUnknownExtendedKeyUsages `json:"unknownExtendedKeyUsages,omitempty"`
}
type CertificatetemplateObjectId struct {
/* Required. The parts of an OID path. The most significant parts of the path come first. */
ObjectIdPath []int `json:"objectIdPath"`
}
type CertificatetemplatePassthroughExtensions struct {
/* Optional. A set of ObjectIds identifying custom X.509 extensions. Will be combined with known_extensions to determine the full set of X.509 extensions. */
// +optional
AdditionalExtensions []CertificatetemplateAdditionalExtensions `json:"additionalExtensions,omitempty"`
/* Optional. A set of named X.509 extensions. Will be combined with additional_extensions to determine the full set of X.509 extensions. */
// +optional
KnownExtensions []string `json:"knownExtensions,omitempty"`
}
type CertificatetemplatePolicyIds struct {
/* Required. The parts of an OID path. The most significant parts of the path come first. */
ObjectIdPath []int `json:"objectIdPath"`
}
type CertificatetemplatePredefinedValues struct {
/* Optional. Describes custom X.509 extensions. */
// +optional
AdditionalExtensions []CertificatetemplateAdditionalExtensions `json:"additionalExtensions,omitempty"`
/* Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the "Authority Information Access" extension in the certificate. */
// +optional
AiaOcspServers []string `json:"aiaOcspServers,omitempty"`
/* Optional. Describes options in this X509Parameters that are relevant in a CA certificate. */
// +optional
CaOptions *CertificatetemplateCaOptions `json:"caOptions,omitempty"`
/* Optional. Indicates the intended use for keys that correspond to a certificate. */
// +optional
KeyUsage *CertificatetemplateKeyUsage `json:"keyUsage,omitempty"`
/* Optional. Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4. */
// +optional
PolicyIds []CertificatetemplatePolicyIds `json:"policyIds,omitempty"`
}
type CertificatetemplateUnknownExtendedKeyUsages struct {
/* Required. The parts of an OID path. The most significant parts of the path come first. */
ObjectIdPath []int `json:"objectIdPath"`
}
type PrivateCACertificateTemplateSpec struct {
/* Optional. A human-readable description of scenarios this template is intended for. */
// +optional
Description *string `json:"description,omitempty"`
/* Optional. Describes constraints on identities that may be appear in Certificates issued using this template. If this is omitted, then this template will not add restrictions on a certificate's identity. */
// +optional
IdentityConstraints *CertificatetemplateIdentityConstraints `json:"identityConstraints,omitempty"`
/* Immutable. The location for the resource */
Location string `json:"location"`
/* Optional. Describes the set of X.509 extensions that may appear in a Certificate issued using this CertificateTemplate. If a certificate request sets extensions that don't appear in the passthrough_extensions, those extensions will be dropped. If the issuing CaPool's IssuancePolicy defines baseline_values that don't appear here, the certificate issuance request will fail. If this is omitted, then this template will not add restrictions on a certificate's X.509 extensions. These constraints do not apply to X.509 extensions set in this CertificateTemplate's predefined_values. */
// +optional
PassthroughExtensions *CertificatetemplatePassthroughExtensions `json:"passthroughExtensions,omitempty"`
/* Optional. A set of X.509 values that will be applied to all issued certificates that use this template. If the certificate request includes conflicting values for the same properties, they will be overwritten by the values defined here. If the issuing CaPool's IssuancePolicy defines conflicting baseline_values for the same properties, the certificate issuance request will fail. */
// +optional
PredefinedValues *CertificatetemplatePredefinedValues `json:"predefinedValues,omitempty"`
/* Immutable. The Project that this resource belongs to. */
ProjectRef v1alpha1.ResourceRef `json:"projectRef"`
/* Immutable. Optional. The name of the resource. Used for creation and acquisition. When unset, the value of `metadata.name` is used as the default. */
// +optional
ResourceID *string `json:"resourceID,omitempty"`
}
type PrivateCACertificateTemplateStatus struct {
/* Conditions represent the latest available observations of the
PrivateCACertificateTemplate's current state. */
Conditions []v1alpha1.Condition `json:"conditions,omitempty"`
/* Output only. The time at which this CertificateTemplate was created. */
// +optional
CreateTime *string `json:"createTime,omitempty"`
/* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */
// +optional
ObservedGeneration *int `json:"observedGeneration,omitempty"`
/* Output only. The time at which this CertificateTemplate was updated. */
// +optional
UpdateTime *string `json:"updateTime,omitempty"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=gcp,shortName=gcpprivatecacertificatetemplate;gcpprivatecacertificatetemplates
// +kubebuilder:subresource:status
// PrivateCACertificateTemplate is the Schema for the privateca API
// +k8s:openapi-gen=true
type PrivateCACertificateTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec PrivateCACertificateTemplateSpec `json:"spec,omitempty"`
Status PrivateCACertificateTemplateStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// PrivateCACertificateTemplateList contains a list of PrivateCACertificateTemplate
type PrivateCACertificateTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PrivateCACertificateTemplate `json:"items"`
}
func init() {
SchemeBuilder.Register(&PrivateCACertificateTemplate{}, &PrivateCACertificateTemplateList{})
}