Debian Codegraph @

proto/spire/api/server/svid/v1/svid.proto

raw
1 syntax = "proto3";
2 package spire.api.server.svid.v1;
3 option go_package = "github.com/spiffe/spire-api-sdk/proto/spire/api/server/svid/v1;svidv1";
4
5 import "spire/api/types/jwtsvid.proto";
6 import "spire/api/types/spiffeid.proto";
7 import "spire/api/types/status.proto";
8 import "spire/api/types/x509svid.proto";
9 import "spire/api/types/witsvid.proto";
10
11 service SVID {
12 // Mints a one-off X509-SVID outside of the normal node/workload
13 // registration process.
14 //
15 // The caller must be local or present an admin X509-SVID.
16 rpc MintX509SVID(MintX509SVIDRequest) returns (MintX509SVIDResponse);
17
18 // Mints a one-off JWT-SVID outside of the normal node/workload
19 // registration process.
20 //
21 // The caller must be local or present an admin X509-SVID.
22 rpc MintJWTSVID(MintJWTSVIDRequest) returns (MintJWTSVIDResponse);
23
24 // Mints a one-off WIT-SVID outside of the normal node/workload
25 // registration process.
26 //
27 // The caller must be local or present an admin X509-SVID.
28 rpc MintWITSVID(MintWITSVIDRequest) returns (MintWITSVIDResponse);
29
30 // Creates one or more X509-SVIDs from registration entries.
31 //
32 // The caller must present an active agent X509-SVID that is authorized
33 // to mint the requested entries. See the Entry GetAuthorizedEntries RPC.
34 rpc BatchNewX509SVID(BatchNewX509SVIDRequest) returns (BatchNewX509SVIDResponse);
35
36 // Creates an JWT-SVID from a registration entry.
37 //
38 // The caller must present an active agent X509-SVID that is authorized
39 // to mint the requested entry. See the Entry GetAuthorizedEntries RPC.
40 rpc NewJWTSVID(NewJWTSVIDRequest) returns (NewJWTSVIDResponse);
41
42 // Creates one or more WIT-SVIDs from registration entries.
43 //
44 // The caller must present an active agent X509-SVID that is authorized
45 // to mint the requested entries. See the Entry GetAuthorizedEntries/SyncA RPC.
46 rpc BatchNewWITSVID(BatchNewWITSVIDRequest) returns (BatchNewWITSVIDResponse);
47
48 // Creates an X509 CA certificate appropriate for use by a downstream
49 // entity to mint X509-SVIDs.
50 //
51 // The caller must present a downstream X509-SVID.
52 rpc NewDownstreamX509CA(NewDownstreamX509CARequest) returns (NewDownstreamX509CAResponse);
53 }
54
55 message MintX509SVIDRequest {
56 // Required. ASN.1 DER encoded CSR. The CSR is used to convey the public
57 // key and the SPIFFE ID (via the URI SAN). Only one URI SAN can be set.
58 // Optionally, the subject and any number of DNS SANs can also be set.
59 bytes csr = 1;
60
61 // The desired TTL of the X509-SVID, in seconds. The server default will be
62 // used if unset. The TTL is advisory only. The actual lifetime of the
63 // X509-SVID may be lower depending on the remaining lifetime of the active
64 // SPIRE Server CA.
65 int32 ttl = 2;
66 }
67
68 message MintX509SVIDResponse {
69 // The newly issued X509-SVID.
70 spire.api.types.X509SVID svid = 1;
71 }
72
73 message MintWITSVIDRequest {
74 // Required. SPIFFE ID of the WIT-SVID.
75 spire.api.types.SPIFFEID id = 1;
76
77 // Required. The ASN.1 DER encoded public key.
78 bytes public_key = 2;
79
80 // Desired TTL of the WIT-SVID, in seconds. The server default will be used
81 // if unset. The TTL is advisory only. The actual lifetime of the WIT-SVID
82 // may be lower depending on the remaining lifetime of the active SPIRE
83 // Server CA.
84 int32 ttl = 3;
85
86 // Required. The signing algorithm to specify in the key. This must be one
87 // of the values supported by the WIT-SVID specification.
88 string signing_algorithm = 4;
89 }
90
91 message MintWITSVIDResponse {
92 // The newly issued WIT-SVID.
93 spire.api.types.WITSVID svid = 1;
94 }
95
96 message MintJWTSVIDRequest {
97 // Required. SPIFFE ID of the JWT-SVID.
98 spire.api.types.SPIFFEID id = 1;
99
100 // Required. List of audience claims to include in the JWT-SVID. At least one must
101 // be set.
102 repeated string audience = 2;
103
104 // Desired TTL of the JWT-SVID, in seconds. The server default will be used
105 // if unset. The TTL is advisory only. The actual lifetime of the JWT-SVID
106 // may be lower depending on the remaining lifetime of the active SPIRE
107 // Server CA.
108 int32 ttl = 3;
109 }
110
111 message MintJWTSVIDResponse {
112 // The newly issued JWT-SVID.
113 spire.api.types.JWTSVID svid = 1;
114 }
115
116 message BatchNewX509SVIDRequest {
117 // Required. One or more X509-SVID parameters for X509-SVID entries to
118 // be signed.
119 repeated NewX509SVIDParams params = 1;
120 }
121
122 message BatchNewX509SVIDResponse {
123 message Result {
124 // The status of creating the X509-SVID.
125 spire.api.types.Status status = 1;
126
127 // The newly created X509-SVID. This will be set if the status is OK.
128 spire.api.types.X509SVID svid = 2;
129 }
130
131 // Result for each X509-SVID requested (order is maintained).
132 repeated Result results = 1;
133 }
134
135 message NewJWTSVIDRequest {
136 // Required. The entry ID of the identity being requested.
137 string entry_id = 1;
138
139 // Required. List of audience claims to include in the JWT-SVID. At least
140 // one must be set.
141 repeated string audience = 2;
142 }
143
144
145 message BatchNewWITSVIDRequest {
146 // Required. One or more WIT-SVID parameters for WIT-SVID entries to
147 // be signed.
148 repeated NewWITSVIDParams params = 1;
149 }
150
151 message BatchNewWITSVIDResponse {
152 message Result {
153 // The status of creating the WIT-SVID.
154 spire.api.types.Status status = 1;
155
156 // The newly created WIT-SVID. This will be set if the status is OK.
157 spire.api.types.WITSVID svid = 2;
158 }
159
160 // Result for each WIT-SVID requested (order is maintained).
161 repeated Result results = 1;
162 }
163
164 message NewJWTSVIDResponse {
165 // The newly issued JWT-SVID
166 spire.api.types.JWTSVID svid = 1;
167 }
168
169 message NewDownstreamX509CARequest {
170 // Required. The ASN.1 DER encoded Certificate Signing Request (CSR). The
171 // CSR is only used to convey the public key; other fields in the CSR are
172 // ignored. The X509-SVID attributes are determined by the downstream entry.
173 bytes csr = 1;
174
175 // Optional. The TTL preferred by the downstream SPIRE Server for the
176 // signed intermediate CA. If zero, the upstream SPIRE Server will use its
177 // own default.
178 int32 preferred_ttl = 2;
179 }
180
181 message NewDownstreamX509CAResponse {
182 // CA certificate and any intermediates required to form a chain of trust
183 // back to the X.509 authorities (DER encoded). The CA certificate is the
184 // first.
185 repeated bytes ca_cert_chain = 1;
186
187 // X.509 authorities (DER encoded).
188 repeated bytes x509_authorities = 2;
189 }
190
191 message NewX509SVIDParams {
192 // Required. The entry ID for the identity being requested.
193 string entry_id = 1;
194
195 // Required. The ASN.1 DER encoded Certificate Signing Request (CSR). The
196 // CSR is only used to convey the public key; other fields in the CSR are
197 // ignored. The X509-SVID attributes are determined by the entry.
198 bytes csr = 2;
199 }
200
201 message NewWITSVIDParams {
202 // Required. The entry ID for the identity being requested.
203 string entry_id = 1;
204
205 // Required. The ASN.1 DER encoded public key.
206 bytes public_key = 2;
207
208 // Required. The signing algorithm to specify in the key. This must be one
209 // of the values supported by the WIT-SVID specification.
210 string signing_algorithm = 3;
211 }