Files
archie/proto/secretengine/v1/secretengine.proto
T

63 lines
2.0 KiB
Protocol Buffer

syntax = "proto3";
package secretengine.v1;
// SecretEngineService is the surface a secret-engine extension serves. The
// host launches one plugin process per enabled engine and resolves every
// SecretRef naming that engine through it.
service SecretEngineService {
// Configure hands the engine its settings once, right after launch and
// before any Resolve. It is the only channel for configuration: the plugin
// process does not inherit the host environment.
rpc Configure(ConfigureRequest) returns (ConfigureResponse);
// Describe names the engine's release and the settings it reads, which the
// dashboard renders as a form.
rpc Describe(DescribeRequest) returns (DescribeResponse);
// Resolve returns the value for key. An unknown key is NOT_FOUND.
rpc Resolve(ResolveRequest) returns (ResolveResponse);
}
message ConfigureRequest {
map<string, string> settings = 1;
// secrets are the engine's own credentials, such as the key that decrypts
// its store, resolved from the host's sealed credentials.
map<string, string> secrets = 2;
}
message ConfigureResponse {}
message DescribeRequest {}
message DescribeResponse {
// version is the engine's own release.
string version = 1;
repeated Setting settings = 2;
}
// Setting is one value an operator enters for an extension to run.
message Setting {
string key = 1;
string label = 2;
string description = 3;
// secret says the value is a secret reference, never the secret.
bool secret = 4;
bool required = 5;
// type decides how the value is entered and checked; unspecified is a
// string.
SettingType type = 6;
// options are the allowed values of a select setting.
repeated string options = 7;
}
enum SettingType {
SETTING_TYPE_UNSPECIFIED = 0;
SETTING_TYPE_STRING = 1;
SETTING_TYPE_NUMBER = 2;
SETTING_TYPE_BOOLEAN = 3;
SETTING_TYPE_DURATION = 4;
SETTING_TYPE_LIST = 5;
SETTING_TYPE_SELECT = 6;
SETTING_TYPE_TEXT = 7;
}
message ResolveRequest { string key = 1; }
message ResolveResponse { string value = 1; }