-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
resources.proto
1497 lines (1271 loc) · 64.5 KB
/
resources.proto
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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 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.
syntax = "proto3";
package google.cloud.security.privateca.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/type/expr.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1";
option go_package = "cloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb";
option java_multiple_files = true;
option java_outer_classname = "PrivateCaResourcesProto";
option java_package = "com.google.cloud.security.privateca.v1";
option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1";
option ruby_package = "Google::Cloud::Security::PrivateCA::V1";
// A
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// represents an individual Certificate Authority. A
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// can be used to create
// [Certificates][google.cloud.security.privateca.v1.Certificate].
message CertificateAuthority {
option (google.api.resource) = {
type: "privateca.googleapis.com/CertificateAuthority"
pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}"
};
// The type of a
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
// indicating its issuing chain.
enum Type {
// Not specified.
TYPE_UNSPECIFIED = 0;
// Self-signed CA.
SELF_SIGNED = 1;
// Subordinate CA. Could be issued by a Private CA
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// or an unmanaged CA.
SUBORDINATE = 2;
}
// The state of a
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
// indicating if it can be used.
enum State {
// Not specified.
STATE_UNSPECIFIED = 0;
// Certificates can be issued from this CA. CRLs will be generated for this
// CA. The CA will be part of the
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
// will be used to issue certificates from the
// [CaPool][google.cloud.security.privateca.v1.CaPool].
ENABLED = 1;
// Certificates cannot be issued from this CA. CRLs will still be generated.
// The CA will be part of the
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
// will not be used to issue certificates from the
// [CaPool][google.cloud.security.privateca.v1.CaPool].
DISABLED = 2;
// Certificates can be issued from this CA. CRLs will be generated for this
// CA. The CA will be part of the
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
// will not be used to issue certificates from the
// [CaPool][google.cloud.security.privateca.v1.CaPool].
STAGED = 3;
// Certificates cannot be issued from this CA. CRLs will not be generated.
// The CA will not be part of the
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
// will not be used to issue certificates from the
// [CaPool][google.cloud.security.privateca.v1.CaPool].
AWAITING_USER_ACTIVATION = 4;
// Certificates cannot be issued from this CA. CRLs will not be generated.
// The CA may still be recovered by calling
// [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority]
// before
// [expire_time][google.cloud.security.privateca.v1.CertificateAuthority.expire_time].
// The CA will not be part of the
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
// will not be used to issue certificates from the
// [CaPool][google.cloud.security.privateca.v1.CaPool].
DELETED = 5;
}
// URLs where a
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// will publish content.
message AccessUrls {
// The URL where this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CA certificate is published. This will only be set for CAs that have been
// activated.
string ca_certificate_access_url = 1;
// The URLs where this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CRLs are published. This will only be set for CAs that have been
// activated.
repeated string crl_access_urls = 2;
}
// A Cloud KMS key configuration that a
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// will use.
message KeyVersionSpec {
oneof KeyVersion {
// The resource name for an existing Cloud KMS CryptoKeyVersion in the
// format
// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
// This option enables full flexibility in the key's capabilities and
// properties.
string cloud_kms_key_version = 1;
// The algorithm to use for creating a managed Cloud KMS key for a for a
// simplified experience. All managed keys will be have their
// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
SignHashAlgorithm algorithm = 2;
}
}
// The algorithm of a Cloud KMS CryptoKeyVersion of a
// [CryptoKey][google.cloud.kms.v1.CryptoKey] with the
// [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value
// `ASYMMETRIC_SIGN`. These values correspond to the
// [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
// values. For RSA signing algorithms, the PSS algorithms should be preferred,
// use PKCS1 algorithms if required for compatibility. For further
// recommendations, see
// https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations.
enum SignHashAlgorithm {
// Not specified.
SIGN_HASH_ALGORITHM_UNSPECIFIED = 0;
// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
RSA_PSS_2048_SHA256 = 1;
// maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
RSA_PSS_3072_SHA256 = 2;
// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
RSA_PSS_4096_SHA256 = 3;
// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256
RSA_PKCS1_2048_SHA256 = 6;
// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256
RSA_PKCS1_3072_SHA256 = 7;
// maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256
RSA_PKCS1_4096_SHA256 = 8;
// maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
EC_P256_SHA256 = 4;
// maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
EC_P384_SHA384 = 5;
}
// Output only. The resource name for this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. Immutable. The
// [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
// this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
Type type = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Required. Immutable. The config used to create a self-signed X.509
// certificate or CSR.
CertificateConfig config = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Required. Immutable. The desired lifetime of the CA certificate. Used to
// create the "not_before_time" and "not_after_time" fields inside an X.509
// certificate.
google.protobuf.Duration lifetime = 4 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Required. Immutable. Used when issuing certificates for this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
// If this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// is a self-signed CertificateAuthority, this key is also used to sign the
// self-signed CA certificate. Otherwise, it is used to sign a CSR.
KeyVersionSpec key_spec = 5 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Optional. If this is a subordinate
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
// this field will be set with the subordinate configuration, which describes
// its issuers. This may be updated, but this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// must continue to validate.
SubordinateConfig subordinate_config = 6
[(google.api.field_behavior) = OPTIONAL];
// Output only. The
// [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
// [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
CaPool.Tier tier = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The
// [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
// this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. This
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// certificate chain, including the current
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// certificate. Ordered such that the root issuer is the final element
// (consistent with RFC 5246). For a self-signed CA, this will only list the
// current
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// certificate.
repeated string pem_ca_certificates = 9
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. A structured description of this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CA certificate and its issuers. Ordered as self-to-root.
repeated CertificateDescription ca_certificate_descriptions = 10
[(google.api.field_behavior) = OUTPUT_ONLY];
// Immutable. The name of a Cloud Storage bucket where this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// will publish content, such as the CA certificate and CRLs. This must be a
// bucket name, without any prefixes (such as `gs://`) or suffixes (such as
// `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
// would simply specify `my-bucket`. If not specified, a managed bucket will
// be created.
string gcs_bucket = 11 [(google.api.field_behavior) = IMMUTABLE];
// Output only. URLs for accessing content published by this CA, such as the
// CA certificate and CRLs.
AccessUrls access_urls = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// was created.
google.protobuf.Timestamp create_time = 13
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// was last updated.
google.protobuf.Timestamp update_time = 14
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// was soft deleted, if it is in the
// [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
// state.
google.protobuf.Timestamp delete_time = 15
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// will be permanently purged, if it is in the
// [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
// state.
google.protobuf.Timestamp expire_time = 16
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Labels with user-defined metadata.
map<string, string> labels = 17 [(google.api.field_behavior) = OPTIONAL];
}
// A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
// [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]
// that form a trust anchor. A
// [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage
// issuance policies for one or more
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// resources and to rotate CA certificates in and out of the trust anchor.
message CaPool {
option (google.api.resource) = {
type: "privateca.googleapis.com/CaPool"
pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}"
};
// The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool],
// indicating its supported functionality and/or billing SKU.
enum Tier {
// Not specified.
TIER_UNSPECIFIED = 0;
// Enterprise tier.
ENTERPRISE = 1;
// DevOps tier.
DEVOPS = 2;
}
// Options relating to the publication of each
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CA certificate and CRLs and their inclusion as extensions in issued
// [Certificates][google.cloud.security.privateca.v1.Certificate]. The options
// set here apply to certificates issued by any
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// in the [CaPool][google.cloud.security.privateca.v1.CaPool].
message PublishingOptions {
// Supported encoding formats for publishing.
enum EncodingFormat {
// Not specified. By default, PEM format will be used.
ENCODING_FORMAT_UNSPECIFIED = 0;
// The
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CA certificate and CRLs will be published in PEM format.
PEM = 1;
// The
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CA certificate and CRLs will be published in DER format.
DER = 2;
}
// Optional. When true, publishes each
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CA certificate and includes its URL in the "Authority Information Access"
// X.509 extension in all issued
// [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
// is false, the CA certificate will not be published and the corresponding
// X.509 extension will not be written in issued certificates.
bool publish_ca_cert = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. When true, publishes each
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
// CRL and includes its URL in the "CRL Distribution Points" X.509 extension
// in all issued
// [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
// is false, CRLs will not be published and the corresponding X.509
// extension will not be written in issued certificates. CRLs will expire 7
// days from their creation. However, we will rebuild daily. CRLs are also
// rebuilt shortly after a certificate is revoked.
bool publish_crl = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Specifies the encoding format of each
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// resource's CA certificate and CRLs. If this is omitted, CA certificates
// and CRLs will be published in PEM.
EncodingFormat encoding_format = 3 [(google.api.field_behavior) = OPTIONAL];
}
// Defines controls over all certificate issuance within a
// [CaPool][google.cloud.security.privateca.v1.CaPool].
message IssuancePolicy {
// Describes a "type" of key that may be used in a
// [Certificate][google.cloud.security.privateca.v1.Certificate] issued from
// a [CaPool][google.cloud.security.privateca.v1.CaPool]. Note that a single
// [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
// may refer to either a fully-qualified key algorithm, such as RSA 4096, or
// a family of key algorithms, such as any RSA key.
message AllowedKeyType {
// Describes an RSA key that may be used in a
// [Certificate][google.cloud.security.privateca.v1.Certificate] issued
// from a [CaPool][google.cloud.security.privateca.v1.CaPool].
message RsaKeyType {
// Optional. The minimum allowed RSA modulus size (inclusive), in bits.
// If this is not set, or if set to zero, the service-level min RSA
// modulus size will continue to apply.
int64 min_modulus_size = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. The maximum allowed RSA modulus size (inclusive), in bits.
// If this is not set, or if set to zero, the service will not enforce
// an explicit upper bound on RSA modulus sizes.
int64 max_modulus_size = 2 [(google.api.field_behavior) = OPTIONAL];
}
// Describes an Elliptic Curve key that may be used in a
// [Certificate][google.cloud.security.privateca.v1.Certificate] issued
// from a [CaPool][google.cloud.security.privateca.v1.CaPool].
message EcKeyType {
// Describes an elliptic curve-based signature algorithm that may be
// used in a
// [Certificate][google.cloud.security.privateca.v1.Certificate] issued
// from a [CaPool][google.cloud.security.privateca.v1.CaPool].
enum EcSignatureAlgorithm {
// Not specified. Signifies that any signature algorithm may be used.
EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0;
// Refers to the Elliptic Curve Digital Signature Algorithm over the
// NIST P-256 curve.
ECDSA_P256 = 1;
// Refers to the Elliptic Curve Digital Signature Algorithm over the
// NIST P-384 curve.
ECDSA_P384 = 2;
// Refers to the Edwards-curve Digital Signature Algorithm over curve
// 25519, as described in RFC 8410.
EDDSA_25519 = 3;
}
// Optional. A signature algorithm that must be used. If this is
// omitted, any EC-based signature algorithm will be allowed.
EcSignatureAlgorithm signature_algorithm = 1
[(google.api.field_behavior) = OPTIONAL];
}
oneof key_type {
// Represents an allowed RSA key type.
RsaKeyType rsa = 1;
// Represents an allowed Elliptic Curve key type.
EcKeyType elliptic_curve = 2;
}
}
// [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
// specifies the allowed ways in which
// [Certificates][google.cloud.security.privateca.v1.Certificate] may be
// requested from this [CaPool][google.cloud.security.privateca.v1.CaPool].
message IssuanceModes {
// Optional. When true, allows callers to create
// [Certificates][google.cloud.security.privateca.v1.Certificate] by
// specifying a CSR.
bool allow_csr_based_issuance = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. When true, allows callers to create
// [Certificates][google.cloud.security.privateca.v1.Certificate] by
// specifying a
// [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
bool allow_config_based_issuance = 2
[(google.api.field_behavior) = OPTIONAL];
}
// Optional. If any
// [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
// is specified, then the certificate request's public key must match one of
// the key types listed here. Otherwise, any key may be used.
repeated AllowedKeyType allowed_key_types = 1
[(google.api.field_behavior) = OPTIONAL];
// Optional. The maximum lifetime allowed for issued
// [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
// if the issuing
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// expires before a
// [Certificate][google.cloud.security.privateca.v1.Certificate] resource's
// requested maximum_lifetime, the effective lifetime will be explicitly
// truncated to match it.
google.protobuf.Duration maximum_lifetime = 2
[(google.api.field_behavior) = OPTIONAL];
// Optional. If specified, then only methods allowed in the
// [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
// may be used to issue
// [Certificates][google.cloud.security.privateca.v1.Certificate].
IssuanceModes allowed_issuance_modes = 3
[(google.api.field_behavior) = OPTIONAL];
// Optional. A set of X.509 values that will be applied to all certificates
// issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
// If a certificate request includes conflicting values for the same
// properties, they will be overwritten by the values defined here. If a
// certificate request uses a
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// that defines conflicting
// [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
// for the same properties, the certificate issuance request will fail.
X509Parameters baseline_values = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes constraints on identities that may appear in
// [Certificates][google.cloud.security.privateca.v1.Certificate] issued
// through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
// is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
// will not add restrictions on a certificate's identity.
CertificateIdentityConstraints identity_constraints = 5
[(google.api.field_behavior) = OPTIONAL];
// Optional. Describes the set of X.509 extensions that may appear in a
// [Certificate][google.cloud.security.privateca.v1.Certificate] issued
// through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
// certificate request sets extensions that don't appear in the
// [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
// those extensions will be dropped. If a certificate request uses a
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// with
// [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
// that don't appear here, the certificate issuance request will fail. If
// this is omitted, then this
// [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
// restrictions on a certificate's X.509 extensions. These constraints do
// not apply to X.509 extensions set in this
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s
// [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
CertificateExtensionConstraints passthrough_extensions = 6
[(google.api.field_behavior) = OPTIONAL];
}
// Output only. The resource name for this
// [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
// `projects/*/locations/*/caPools/*`.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. Immutable. The
// [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
// [CaPool][google.cloud.security.privateca.v1.CaPool].
Tier tier = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Optional. The
// [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
// to control how
// [Certificates][google.cloud.security.privateca.v1.Certificate] will be
// issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
IssuancePolicy issuance_policy = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The
// [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
// to follow when issuing
// [Certificates][google.cloud.security.privateca.v1.Certificate] from any
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// in this [CaPool][google.cloud.security.privateca.v1.CaPool].
PublishingOptions publishing_options = 4
[(google.api.field_behavior) = OPTIONAL];
// Optional. Labels with user-defined metadata.
map<string, string> labels = 5 [(google.api.field_behavior) = OPTIONAL];
}
// A
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
// corresponds to a signed X.509 certificate Revocation List (CRL). A CRL
// contains the serial numbers of certificates that should no longer be trusted.
message CertificateRevocationList {
option (google.api.resource) = {
type: "privateca.googleapis.com/CertificateRevocationList"
pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}"
};
// Describes a revoked
// [Certificate][google.cloud.security.privateca.v1.Certificate].
message RevokedCertificate {
// The resource name for the
// [Certificate][google.cloud.security.privateca.v1.Certificate] in the
// format `projects/*/locations/*/caPools/*/certificates/*`.
string certificate = 1 [(google.api.resource_reference) = {
type: "privateca.googleapis.com/Certificate"
}];
// The serial number of the
// [Certificate][google.cloud.security.privateca.v1.Certificate].
string hex_serial_number = 2;
// The reason the
// [Certificate][google.cloud.security.privateca.v1.Certificate] was
// revoked.
RevocationReason revocation_reason = 3;
}
// The state of a
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList],
// indicating if it is current.
enum State {
// Not specified.
STATE_UNSPECIFIED = 0;
// The
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
// is up to date.
ACTIVE = 1;
// The
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
// is no longer current.
SUPERSEDED = 2;
}
// Output only. The resource name for this
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
// in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/
// certificateRevocationLists/*`.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The CRL sequence number that appears in pem_crl.
int64 sequence_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The revoked serial numbers that appear in pem_crl.
repeated RevokedCertificate revoked_certificates = 3
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The PEM-encoded X.509 CRL.
string pem_crl = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The location where 'pem_crl' can be accessed.
string access_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The
// [State][google.cloud.security.privateca.v1.CertificateRevocationList.State]
// for this
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
// was created.
google.protobuf.Timestamp create_time = 7
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
// was updated.
google.protobuf.Timestamp update_time = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The revision ID of this
// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
// A new revision is committed whenever a new CRL is published. The format is
// an 8-character hexadecimal string.
string revision_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Labels with user-defined metadata.
map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL];
}
// A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
// to a signed X.509 certificate issued by a
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
message Certificate {
option (google.api.resource) = {
type: "privateca.googleapis.com/Certificate"
pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}"
};
// Describes fields that are relavent to the revocation of a
// [Certificate][google.cloud.security.privateca.v1.Certificate].
message RevocationDetails {
// Indicates why a
// [Certificate][google.cloud.security.privateca.v1.Certificate] was
// revoked.
RevocationReason revocation_state = 1;
// The time at which this
// [Certificate][google.cloud.security.privateca.v1.Certificate] was
// revoked.
google.protobuf.Timestamp revocation_time = 2;
}
// Output only. The resource name for this
// [Certificate][google.cloud.security.privateca.v1.Certificate] in the format
// `projects/*/locations/*/caPools/*/certificates/*`.
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "privateca.googleapis.com/Certificate"
}
];
// The config used to create a signed X.509 certificate.
oneof certificate_config {
// Immutable. A pem-encoded X.509 certificate signing request (CSR).
string pem_csr = 2 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. A description of the certificate and key that does not require
// X.509 or ASN.1.
CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE];
}
// Output only. The resource name of the issuing
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
string issuer_certificate_authority = 4 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "privateca.googleapis.com/CertificateAuthority"
}
];
// Required. Immutable. The desired lifetime of a certificate. Used to create
// the "not_before_time" and "not_after_time" fields inside an X.509
// certificate. Note that the lifetime may be truncated if it would extend
// past the life of any certificate authority in the issuing chain.
google.protobuf.Duration lifetime = 5 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Immutable. The resource name for a
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// used to issue this certificate, in the format
// `projects/*/locations/*/certificateTemplates/*`.
// If this is specified, the caller must have the necessary permission to
// use this template. If this is omitted, no template will be used.
// This template must be in the same location as the
// [Certificate][google.cloud.security.privateca.v1.Certificate].
string certificate_template = 6 [
(google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference) = {
type: "privateca.googleapis.com/CertificateTemplate"
}
];
// Immutable. Specifies how the
// [Certificate][google.cloud.security.privateca.v1.Certificate]'s identity
// fields are to be decided. If this is omitted, the `DEFAULT` subject mode
// will be used.
SubjectRequestMode subject_mode = 7 [(google.api.field_behavior) = IMMUTABLE];
// Output only. Details regarding the revocation of this
// [Certificate][google.cloud.security.privateca.v1.Certificate]. This
// [Certificate][google.cloud.security.privateca.v1.Certificate] is considered
// revoked if and only if this field is present.
RevocationDetails revocation_details = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The pem-encoded, signed X.509 certificate.
string pem_certificate = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. A structured description of the issued X.509 certificate.
CertificateDescription certificate_description = 10
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The chain that may be used to verify the X.509 certificate.
// Expected to be in issuer-to-root order according to RFC 5246.
repeated string pem_certificate_chain = 11
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [Certificate][google.cloud.security.privateca.v1.Certificate] was created.
google.protobuf.Timestamp create_time = 12
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [Certificate][google.cloud.security.privateca.v1.Certificate] was updated.
google.protobuf.Timestamp update_time = 13
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Labels with user-defined metadata.
map<string, string> labels = 14 [(google.api.field_behavior) = OPTIONAL];
}
// A
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// refers to a managed template for certificate issuance.
message CertificateTemplate {
option (google.api.resource) = {
type: "privateca.googleapis.com/CertificateTemplate"
pattern: "projects/{project}/locations/{location}/certificateTemplates/{certificate_template}"
};
// Output only. The resource name for this
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// in the format `projects/*/locations/*/certificateTemplates/*`.
string name = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "privateca.googleapis.com/CertificateTemplate"
}
];
// Optional. The maximum lifetime allowed for issued
// [Certificates][google.cloud.security.privateca.v1.Certificate] that use
// this template. If the issuing
// [CaPool][google.cloud.security.privateca.v1.CaPool] resource's
// [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
// specifies a
// [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime]
// the minimum of the two durations will be the maximum lifetime for issued
// [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
// if the issuing
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// expires before a
// [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
// maximum_lifetime, the effective lifetime will be explicitly truncated
// to match it.
google.protobuf.Duration maximum_lifetime = 9
[(google.api.field_behavior) = OPTIONAL];
// 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][google.cloud.security.privateca.v1.CaPool]'s
// [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
// defines conflicting
// [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values]
// for the same properties, the certificate issuance request will fail.
X509Parameters predefined_values = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes constraints on identities that may be appear in
// [Certificates][google.cloud.security.privateca.v1.Certificate] issued using
// this template. If this is omitted, then this template will not add
// restrictions on a certificate's identity.
CertificateIdentityConstraints identity_constraints = 3
[(google.api.field_behavior) = OPTIONAL];
// Optional. Describes the set of X.509 extensions that may appear in a
// [Certificate][google.cloud.security.privateca.v1.Certificate] issued using
// this
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
// If a certificate request sets extensions that don't appear in the
// [passthrough_extensions][google.cloud.security.privateca.v1.CertificateTemplate.passthrough_extensions],
// those extensions will be dropped. If the issuing
// [CaPool][google.cloud.security.privateca.v1.CaPool]'s
// [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
// defines
// [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.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][google.cloud.security.privateca.v1.CertificateTemplate]'s
// [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values].
CertificateExtensionConstraints passthrough_extensions = 4
[(google.api.field_behavior) = OPTIONAL];
// Optional. A human-readable description of scenarios this template is
// intended for.
string description = 5 [(google.api.field_behavior) = OPTIONAL];
// Output only. The time at which this
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// was created.
google.protobuf.Timestamp create_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time at which this
// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
// was updated.
google.protobuf.Timestamp update_time = 7
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Labels with user-defined metadata.
map<string, string> labels = 8 [(google.api.field_behavior) = OPTIONAL];
}
// An [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] is
// used to describe certain fields of an X.509 certificate, such as the key
// usage fields, fields specific to CA certificates, certificate policy
// extensions and custom extensions.
message X509Parameters {
// Describes values that are relevant in a CA certificate.
message CaOptions {
// 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 bool is_ca = 1 [(google.api.field_behavior) = OPTIONAL];
// 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 int32 max_issuer_path_length = 2
[(google.api.field_behavior) = OPTIONAL];
}
// Describes the X.509 name constraints extension, per
// https://tools.ietf.org/html/rfc5280#section-4.2.1.10
message NameConstraints {
// Indicates whether or not the name constraints are marked critical.
bool critical = 1;
// Contains permitted DNS names. Any DNS name that can be
// constructed by simply adding zero or more labels to
// the left-hand side of the name satisfies the name constraint.
// For example, `example.com`, `www.example.com`, `www.sub.example.com`
// would satisfy `example.com` while `example1.com` does not.
repeated string permitted_dns_names = 2;
// Contains excluded DNS names. Any DNS name that can be
// constructed by simply adding zero or more labels to
// the left-hand side of the name satisfies the name constraint.
// For example, `example.com`, `www.example.com`, `www.sub.example.com`
// would satisfy `example.com` while `example1.com` does not.
repeated string excluded_dns_names = 3;
// Contains the permitted IP ranges. For IPv4 addresses, the ranges
// are expressed using CIDR notation as specified in RFC 4632.
// For IPv6 addresses, the ranges are expressed in similar encoding as IPv4
// addresses.
repeated string permitted_ip_ranges = 4;
// Contains the excluded IP ranges. For IPv4 addresses, the ranges
// are expressed using CIDR notation as specified in RFC 4632.
// For IPv6 addresses, the ranges are expressed in similar encoding as IPv4
// addresses.
repeated string excluded_ip_ranges = 5;
// Contains the permitted email addresses. The value can be a particular
// email address, a hostname to indicate all email addresses on that host or
// a domain with a leading period (e.g. `.example.com`) to indicate
// all email addresses in that domain.
repeated string permitted_email_addresses = 6;
// Contains the excluded email addresses. The value can be a particular
// email address, a hostname to indicate all email addresses on that host or
// a domain with a leading period (e.g. `.example.com`) to indicate
// all email addresses in that domain.
repeated string excluded_email_addresses = 7;
// Contains the permitted URIs that apply to the host part of the name.
// The value can be a hostname or a domain with a
// leading period (like `.example.com`)
repeated string permitted_uris = 8;
// Contains the excluded URIs that apply to the host part of the name.
// The value can be a hostname or a domain with a
// leading period (like `.example.com`)
repeated string excluded_uris = 9;
}
// Optional. Indicates the intended use for keys that correspond to a
// certificate.
KeyUsage key_usage = 1 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes options in this
// [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] that
// are relevant in a CA certificate.
CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes the X.509 certificate policy object identifiers, per
// https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes Online Certificate Status Protocol (OCSP) endpoint
// addresses that appear in the "Authority Information Access" extension in
// the certificate.
repeated string aia_ocsp_servers = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes the X.509 name constraints extension.
NameConstraints name_constraints = 6 [(google.api.field_behavior) = OPTIONAL];
// Optional. Describes custom X.509 extensions.
repeated X509Extension additional_extensions = 5
[(google.api.field_behavior) = OPTIONAL];
}
// Describes a subordinate CA's issuers. This is either a resource name to a
// known issuing
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
// or a PEM issuer certificate chain.
message SubordinateConfig {
// This message describes a subordinate CA's issuer certificate chain. This
// wrapper exists for compatibility reasons.
message SubordinateConfigChain {
// Required. Expected to be in leaf-to-root order according to RFC 5246.
repeated string pem_certificates = 1
[(google.api.field_behavior) = REQUIRED];
}
oneof subordinate_config {
// Required. This can refer to a
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
// that was used to create a subordinate
// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
// This field is used for information and usability purposes only. The
// resource name is in the format
// `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
string certificate_authority = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "privateca.googleapis.com/CertificateAuthority"
}
];