Debian Codegraph @

proto/spire/api/server/trustdomain/v1/trustdomain.proto

raw
1 syntax = "proto3";
2 package spire.api.server.trustdomain.v1;
3 option go_package = "github.com/spiffe/spire-api-sdk/proto/spire/api/server/trustdomain/v1;trustdomain";
4
5 import "google/protobuf/empty.proto";
6 import "spire/api/types/federationrelationship.proto";
7 import "spire/api/types/status.proto";
8
9 // Manages the federation relationships with foreign trust domains.
10 service TrustDomain {
11 // Lists federation relationships with foreign trust domains.
12 //
13 // The caller must be local or present an admin X509-SVID.
14 rpc ListFederationRelationships(ListFederationRelationshipsRequest) returns (ListFederationRelationshipsResponse);
15
16 // Gets a federation relationship with a foreign trust domain.
17 // If there is no federation relationship with the specified
18 // trust domain, NOT_FOUND is returned.
19 //
20 // The caller must be local or present an admin X509-SVID.
21 rpc GetFederationRelationship(GetFederationRelationshipRequest) returns (spire.api.types.FederationRelationship);
22
23 // Batch creates one or more federation relationships with
24 // foreign trust domains.
25 //
26 // The caller must be local or present an admin X509-SVID.
27 rpc BatchCreateFederationRelationship(BatchCreateFederationRelationshipRequest) returns (BatchCreateFederationRelationshipResponse);
28
29 // Batch updates one or more federation relationships with
30 // foreign trust domains.
31 //
32 // The caller must be local or present an admin X509-SVID.
33 rpc BatchUpdateFederationRelationship(BatchUpdateFederationRelationshipRequest) returns (BatchUpdateFederationRelationshipResponse);
34
35 // Batch deletes federation relationships with foreign trust domains.
36 //
37 // The caller must be local or present an admin X509-SVID.
38 rpc BatchDeleteFederationRelationship(BatchDeleteFederationRelationshipRequest) returns (BatchDeleteFederationRelationshipResponse);
39
40 // Refreshes the bundle from the specified federated trust domain.
41 // If there is not a federation relationship configured with the
42 // specified trust domain, NOT_FOUND is returned.
43 //
44 // The caller must be local or present an admin X509-SVID.
45 rpc RefreshBundle(RefreshBundleRequest) returns (google.protobuf.Empty);
46 }
47
48 message ListFederationRelationshipsRequest {
49 // An output mask indicating which federation replationship fields
50 // are set in the response.
51 spire.api.types.FederationRelationshipMask output_mask = 1;
52
53 // The maximum number of results to return. The server may further
54 // constrain this value, or if zero, choose its own.
55 int32 page_size = 2;
56
57 // The next_page_token value returned from a previous request, if any.
58 string page_token = 3;
59 }
60
61 message ListFederationRelationshipsResponse {
62 // The federation relationships with foreign trust domains.
63 repeated spire.api.types.FederationRelationship federation_relationships = 1;
64
65 // The page token for the next request. Empty if there are no more results.
66 // This field should be checked by clients even when a page_size was not
67 // requested, since the server may choose its own (see page_size).
68 string next_page_token = 2;
69 }
70
71 message GetFederationRelationshipRequest {
72 // Required. The trust domain name of the federation relationship
73 // (e.g., "example.org").
74 string trust_domain = 1;
75
76 // An output mask indicating which federation relationship fields
77 // are set in the response.
78 spire.api.types.FederationRelationshipMask output_mask = 2;
79 }
80
81 message BatchCreateFederationRelationshipRequest {
82 // The federation relationships to be created.
83 repeated spire.api.types.FederationRelationship federation_relationships = 1;
84
85 // An output mask indicating the federation relationship fields set in the response.
86 spire.api.types.FederationRelationshipMask output_mask = 2;
87 }
88
89 message BatchCreateFederationRelationshipResponse {
90 message Result {
91 // The status of creating the federation relationship.
92 // Status code will be ALREADY_EXISTS if there is already a
93 // federation relationship with the specified trust domain.
94 spire.api.types.Status status = 1;
95
96 // The federation relationship that was created.
97 // This will be set if the status is OK.
98 spire.api.types.FederationRelationship federation_relationship = 2;
99 }
100
101 // Result for each federation relationship in the request (order is maintained).
102 repeated Result results = 1;
103 }
104
105 message BatchUpdateFederationRelationshipRequest {
106 // The federation relationships to be updated.
107 repeated spire.api.types.FederationRelationship federation_relationships = 1;
108
109 // An input mask indicating what federation relationship fields should be updated.
110 spire.api.types.FederationRelationshipMask input_mask = 2;
111
112 // An output mask indicating what federation relationship fields are set in the response.
113 spire.api.types.FederationRelationshipMask output_mask = 3;
114 }
115
116 message BatchUpdateFederationRelationshipResponse {
117 message Result {
118 // The status of updating the federation relationship.
119 spire.api.types.Status status = 1;
120
121 // The federation relationship that was updated.
122 // This will be set if the status is OK.
123 spire.api.types.FederationRelationship federation_relationship = 2;
124 }
125
126 // Result for each federation relationship in the request (order is maintained).
127 repeated Result results = 1;
128 }
129
130 message BatchDeleteFederationRelationshipRequest {
131 // Required. The trust domain names of the federation relationships
132 // to delete.
133 repeated string trust_domains = 1;
134 }
135
136 message BatchDeleteFederationRelationshipResponse {
137 message Result {
138 // The status of delating the federation relationship.
139 spire.api.types.Status status = 1;
140
141 // The trust domain name of the federation relationship
142 // that was deleted.
143 string trust_domain = 2;
144 }
145
146 // Result for each trust domain name in the request (order is maintained).
147 repeated Result results = 1;
148 }
149
150 message RefreshBundleRequest {
151 // Required. The federated trust domain name of the
152 // bundle to refresh (e.g., "example.org").
153 string trust_domain = 1;
154 }