Debian Codegraph @

proto/spire/api/server/localauthority/v1/localauthority.proto

raw
1 syntax = "proto3";
2 package spire.api.server.localauthority.v1;
3 option go_package = "github.com/spiffe/spire-api-sdk/proto/spire/api/server/localauthority/v1;localauthorityv1";
4
5 // The LocalAuthority service provides a way to manage the signing keys (and
6 // related material) of the SPIRE Server exposing it.
7 service LocalAuthority {
8 // GetJWTAuthorityState returns the state of all locally configured
9 // JWT authorities.
10 rpc GetJWTAuthorityState(GetJWTAuthorityStateRequest) returns (GetJWTAuthorityStateResponse);
11
12 // PrepareJWTAuthority prepares a new JWT authority for use by
13 // generating a new key and injecting it into the bundle. This action
14 // will propagate the new public key cluster-wide.
15 rpc PrepareJWTAuthority(PrepareJWTAuthorityRequest) returns (PrepareJWTAuthorityResponse);
16
17 // ActivateJWTAuthority activates a prepared JWT authority for use,
18 // which will cause it to be used for all JWT signing operations
19 // serviced by this server going forward. If a new JWT authority has
20 // not already been prepared, a FailedPrecondition error will be returned.
21 rpc ActivateJWTAuthority(ActivateJWTAuthorityRequest) returns (ActivateJWTAuthorityResponse);
22
23 // TaintJWTAuthority marks the previously active JWT authority as
24 // being tainted. SPIRE Agents observing an authority to be tainted
25 // will perform proactive rotations of any key material related to
26 // the tainted authority. The result of this action will be observed
27 // cluster-wide.
28 // It can receive the Authority ID of an old JWT authority.
29 //
30 // If a previously active JWT authority does not exist (e.g. if one
31 // has been prepared but not activated yet), a FailedPrecondition
32 // error will be returned.
33 rpc TaintJWTAuthority(TaintJWTAuthorityRequest) returns (TaintJWTAuthorityResponse);
34
35 // RevokeJWTAuthority revokes the previously active JWT authority by
36 // removing it from the bundle and propagating this update throughout
37 // the cluster.
38 // It can receive the Authority ID of an old JWT authority.
39 //
40 // If a previously active JWT authority does not exist (e.g. if one
41 // has been prepared but not activated yet), a FailedPrecondition
42 // error will be returned.
43 rpc RevokeJWTAuthority(RevokeJWTAuthorityRequest) returns (RevokeJWTAuthorityResponse);
44
45 // GetX509AuthorityState returns the state of all locally configured
46 // X.509 authorities.
47 rpc GetX509AuthorityState(GetX509AuthorityStateRequest) returns (GetX509AuthorityStateResponse);
48
49 // PrepareX509Authority prepares a new X.509 authority for use by
50 // generating a new key and injecting the resulting CA certificate into
51 // the bundle. This action will propagate the new CA cluster-wide.
52 rpc PrepareX509Authority(PrepareX509AuthorityRequest) returns (PrepareX509AuthorityResponse);
53
54 // ActivateX509Authority activates a prepared X.509 authority for use,
55 // which will cause it to be used for all X.509 signing operations
56 // serviced by this server going forward. If a new X.509 authority has
57 // not already been prepared, a FailedPrecondition error will be returned.
58 rpc ActivateX509Authority(ActivateX509AuthorityRequest) returns (ActivateX509AuthorityResponse);
59
60 // TaintX509Authority marks the previously active X.509 authority as
61 // being tainted. SPIRE Agents observing an authority to be tainted
62 // will perform proactive rotations of any key material related to
63 // the tainted authority. The result of this action will be observed
64 // cluster-wide.
65 // The X.509 authority to taint is identified using the provided X.509 Subject Key
66 //
67 // If an upstream authority is configured then local authorities cannot be tainted,
68 // and a FailedPrecondition error will be returned.
69 //
70 // If a previously active X.509 authority does not exist (e.g. if one
71 // has been prepared but not activated yet), a FailedPrecondition
72 // error will be returned.
73 rpc TaintX509Authority(TaintX509AuthorityRequest) returns (TaintX509AuthorityResponse);
74
75 // TaintX509UpstreamAuthority marks the provided upstream authority as
76 // being tainted. SPIRE Agents observing a tainted authority
77 // will perform proactive rotations of any key material related to
78 // the tainted authority. The result of this action will be observed
79 // cluster-wide.
80 // It is important to change to a new active upstream authority before tainting the old one,
81 // since tainting will force the rotation of any bundle that is using
82 // the old upstream authority.
83 // The X.509 authority to taint is identified using the provided X.509 Subject Key
84 // Identifier (or SKID) of the old X.509 authority.
85 //
86 // If an X.509 upstream authority is not configured, or the identified upstream
87 // X.509 authority is active, a FailedPrecondition error will be returned.
88 rpc TaintX509UpstreamAuthority(TaintX509UpstreamAuthorityRequest) returns (TaintX509UpstreamAuthorityResponse);
89
90 // RevokeX509Authority revokes the previously active X.509 authority by
91 // removing it from the bundle and propagating this update throughout
92 // the cluster.
93 // It can receive the public key of an old X.509 authority.
94 //
95 // If a previously active X.509 authority does not exist (e.g. if one
96 // has been prepared but not activated yet), a FailedPrecondition
97 // error will be returned.
98 rpc RevokeX509Authority(RevokeX509AuthorityRequest) returns (RevokeX509AuthorityResponse);
99
100 // RevokeX509UpstreamAuthority revokes the previously active X.509 upstream authority by
101 // removing it from the bundle and propagating this update throughout
102 // the cluster.
103 // The X.509 authority to revoke is identified using the provided subject key ID of
104 // the authority's CA certificate.
105 //
106 // If a previously active X.509 upstream authority does not exist, a FailedPrecondition
107 // error will be returned.
108 rpc RevokeX509UpstreamAuthority(RevokeX509UpstreamAuthorityRequest) returns (RevokeX509UpstreamAuthorityResponse);
109
110 // GetWITAuthorityState returns the state of all locally configured
111 // WIT authorities.
112 rpc GetWITAuthorityState(GetWITAuthorityStateRequest) returns (GetWITAuthorityStateResponse);
113
114 // PrepareWITAuthority prepares a new WIT authority for use by
115 // generating a new key and injecting it into the bundle. This action
116 // will propagate the new public key cluster-wide.
117 rpc PrepareWITAuthority(PrepareWITAuthorityRequest) returns (PrepareWITAuthorityResponse);
118
119 // ActivateWITAuthority activates a prepared WIT authority for use,
120 // which will cause it to be used for all WIT signing operations
121 // serviced by this server going forward. If a new WIT authority has
122 // not already been prepared, a FailedPrecondition error will be returned.
123 rpc ActivateWITAuthority(ActivateWITAuthorityRequest) returns (ActivateWITAuthorityResponse);
124
125 // TaintWITAuthority marks the previously active WIT authority as
126 // being tainted. SPIRE Agents observing an authority to be tainted
127 // will perform proactive rotations of any key material related to
128 // the tainted authority. The result of this action will be observed
129 // cluster-wide.
130 // The WIT authority to taint is identified using the authority ID of
131 // the old WIT authority.
132 //
133 // If a previously active WIT authority does not exist (e.g. if one
134 // has been prepared but not activated yet), a FailedPrecondition
135 // error will be returned.
136 rpc TaintWITAuthority(TaintWITAuthorityRequest) returns (TaintWITAuthorityResponse);
137
138 // RevokeWITAuthority revokes the previously active WIT authority by
139 // removing it from the bundle and propagating this update throughout
140 // the cluster.
141 // The WIT authority to revoke is identified using the authority ID of
142 // the old WIT authority.
143 //
144 // If a previously active WIT authority does not exist (e.g. if one
145 // has been prepared but not activated yet), a FailedPrecondition
146 // error will be returned.
147 rpc RevokeWITAuthority(RevokeWITAuthorityRequest) returns (RevokeWITAuthorityResponse);
148 }
149
150 message GetJWTAuthorityStateRequest {}
151
152 message GetJWTAuthorityStateResponse {
153 // Authority currently being used for signing operations.
154 AuthorityState active = 1;
155
156 // Authority added on bundle but is not used yet.
157 AuthorityState prepared = 2;
158
159 // Authority in that was previously used for signing operations,
160 // but it is not longer.
161 AuthorityState old = 3;
162 }
163
164 message PrepareJWTAuthorityRequest {}
165
166 message PrepareJWTAuthorityResponse {
167 AuthorityState prepared_authority = 1;
168 }
169
170 message ActivateJWTAuthorityRequest {
171 // The authority ID of the local authority JWT authority to activate.
172 // This is the JWT Key ID.
173 string authority_id = 1;
174 }
175
176 message ActivateJWTAuthorityResponse {
177 AuthorityState activated_authority = 1;
178 }
179
180 message TaintJWTAuthorityRequest {
181 // The authority ID of the local authority JWT authority to taint.
182 // This is the JWT Key ID.
183 string authority_id = 1;
184 }
185
186 message TaintJWTAuthorityResponse {
187 AuthorityState tainted_authority = 1;
188 }
189
190 message RevokeJWTAuthorityRequest {
191 // The authority ID of the local authority JWT authority to revoke.
192 // This is the JWT Key ID.
193 string authority_id = 1;
194 }
195
196 message RevokeJWTAuthorityResponse {
197 AuthorityState revoked_authority = 1;
198 }
199
200 message GetX509AuthorityStateRequest {}
201
202 message GetX509AuthorityStateResponse {
203 // Authority currently being used for signing operations.
204 AuthorityState active = 1;
205
206 // Authority added on bundle but is not used yet.
207 AuthorityState prepared = 2;
208
209 // Authority in that was previously used for signing operations,
210 // but it is not longer.
211 AuthorityState old = 3;
212 }
213
214 message PrepareX509AuthorityRequest {}
215
216 message PrepareX509AuthorityResponse {
217 AuthorityState prepared_authority = 1;
218 }
219
220 message ActivateX509AuthorityRequest {
221 // The authority ID of the local X.509 authority to activate.
222 // This is the X.509 Subject Key Identifier (or SKID) of the
223 // authority's CA certificate, which is calculated by doing a
224 // SHA-1 hash over the ASN.1 encoding of the public key.
225 string authority_id = 1;
226 }
227
228 message ActivateX509AuthorityResponse {
229 AuthorityState activated_authority = 1;
230 }
231
232 message TaintX509AuthorityRequest {
233 // The authority ID of the local X.509 authority to taint.
234 // This is the X.509 Subject Key Identifier (or SKID) of the
235 // authority's CA certificate, which is calculated by doing a
236 // SHA-1 hash over the ASN.1 encoding of the public key.
237 string authority_id = 1;
238 }
239
240 message TaintX509AuthorityResponse {
241 AuthorityState tainted_authority = 1;
242 }
243
244 message TaintX509UpstreamAuthorityRequest {
245 // This is the X.509 Subject Key Identifier (or SKID) of the
246 // authority's CA certificate of the upstream X.509 authority to taint.
247 string subject_key_id = 1;
248 }
249
250 message TaintX509UpstreamAuthorityResponse {
251 // The Subject Key Identifier (or SKID) of the upstream authority
252 // tainted.
253 string upstream_authority_subject_key_id = 1;
254 }
255
256 message RevokeX509UpstreamAuthorityRequest {
257 // This is the X.509 Subject Key Identifier (or SKID) of the
258 // authority's CA certificate of the upstream X.509 authority to revoke.
259 string subject_key_id = 1;
260 }
261
262 message RevokeX509UpstreamAuthorityResponse {
263 // The Subject Key Identifier (or SKID) of the upstream authority
264 // revoked.
265 string upstream_authority_subject_key_id = 1;
266 }
267
268 message RevokeX509AuthorityRequest {
269 // The authority ID of the local X.509 authority to revoke.
270 // This is the X.509 Subject Key Identifier (or SKID) of the
271 // authority's CA certificate, which is calculated by doing a
272 // SHA-1 hash over the ASN.1 encoding of the public key.
273 string authority_id = 1;
274 }
275
276 message RevokeX509AuthorityResponse {
277 AuthorityState revoked_authority = 1;
278 }
279
280 message GetWITAuthorityStateRequest {}
281
282 message GetWITAuthorityStateResponse {
283 // Authority currently being used for signing operations.
284 AuthorityState active = 1;
285
286 // Authority added on bundle but is not used yet.
287 AuthorityState prepared = 2;
288
289 // Authority in that was previously used for signing operations,
290 // but it is not longer.
291 AuthorityState old = 3;
292 }
293
294 message PrepareWITAuthorityRequest {}
295
296 message PrepareWITAuthorityResponse {
297 AuthorityState prepared_authority = 1;
298 }
299
300 message ActivateWITAuthorityRequest {
301 // The authority ID of the local authority WIT authority to activate.
302 // This is the WIT Key ID.
303 string authority_id = 1;
304 }
305
306 message ActivateWITAuthorityResponse {
307 AuthorityState activated_authority = 1;
308 }
309
310 message TaintWITAuthorityRequest {
311 // The authority ID of the local authority WIT authority to taint.
312 // This is the WIT Key ID.
313 string authority_id = 1;
314 }
315
316 message TaintWITAuthorityResponse {
317 AuthorityState tainted_authority = 1;
318 }
319
320 message RevokeWITAuthorityRequest {
321 // The authority ID of the local authority WIT authority to revoke.
322 // This is the WIT Key ID.
323 string authority_id = 1;
324 }
325
326 message RevokeWITAuthorityResponse {
327 AuthorityState revoked_authority = 1;
328 }
329
330 message AuthorityState {
331 // The authority ID.
332 string authority_id = 1;
333
334 // Expiration timestamp (seconds since Unix epoch).
335 int64 expires_at = 2;
336
337 // The Subject Key Identifier (or SKID) of the upstream authority,
338 // applicable only for X.509 authorities.
339 string upstream_authority_subject_key_id = 3;
340 }