-
Notifications
You must be signed in to change notification settings - Fork 21
/
config.proto
64 lines (51 loc) · 2.13 KB
/
config.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
syntax = "proto3";
package spire.service.common.config.v1;
option go_package = "github.com/spiffe/spire-plugin-sdk/proto/spire/service/common/config/v1;configv1";
service Config {
// Configure is called by SPIRE to configure the plugin with the plugin
// specific configuration data and a set of SPIRE core configuration. It is
// currently called when the plugin is first loaded after it has been
// initialized. At a future point, it may be called to reconfigure the
// plugin during runtime. Implementations should therefore expect that
// calls to Configure can happen concurrently with other RPCs against the
// plugin.
rpc Configure(ConfigureRequest) returns (ConfigureResponse);
// Validate is called by SPIRE with a potential specific configuration for
// the plugin to determine if it is usable.
rpc Validate(ValidateRequest) returns (ValidateResponse);
}
message ConfigureRequest {
// Required. Core SPIRE configuration.
CoreConfiguration core_configuration = 1;
// Required. HCL encoded plugin configuration.
string hcl_configuration = 2;
}
message ConfigureResponse {
}
message ValidateRequest {
// Required. Core SPIRE configuration.
CoreConfiguration core_configuration = 1;
// Required. HCL encoded plugin configuration.
string hcl_configuration = 2;
}
message ValidateResponse {
// Required. True when the plugin deems the configuration usable.
bool valid = 1;
// Optional. Zero or more notes providing feedback to an end user.
// Examples of valid configuration notes include:
// - "configuration valid"
// - "please ensure port 23423 is open"
// - "check access to (whatever) from the deployment environment"
// etc.
// Examples of invalid configuration notes include:
// - value for "plugin.port" is not a number.
// - missing field "plugin.user"
// - specified SPIFFE ID in "plugin.spiffe_id" is not within system trust domain.
// - etc.
repeated string notes = 2;
}
message CoreConfiguration {
// Required. The trust domain name SPIRE is configured with (e.g.
// "example.org").
string trust_domain = 1;
}