forked from project-oak/oak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplication.proto
156 lines (139 loc) · 5.62 KB
/
application.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
//
// Copyright 2018 The Project Oak Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package oak.application;
import "google/protobuf/wrappers.proto";
// An ApplicationConfiguration represents a unit of deployment in Oak.
//
// A running Oak Application instance is built from a collection of
// interconnected Nodes.
//
// Nodes are created dynamically at runtime, with the exception of the specified
// initial Node (which is created by the Oak runtime when instantiating the Oak
// Application).
//
// WebAssembly Nodes in particular can only run the code described by an entry
// in this configuration.
message ApplicationConfiguration {
// Map from Wasm module names to their bytecode representation.
//
// See https://webassembly.org/docs/binary-encoding/ .
//
// Any developer-authored code running as part of an Oak Application must
// appear in this map.
//
// Entries in this map may be referenced by instances of
// WebAssemblyConfiguration objects.
map<string, bytes> wasm_modules = 1;
// Indication of what configuration the initial Node should run.
//
// Usually a NodeConfiguration entry that holds a WebAssemblyConfiguration
// object.
NodeConfiguration initial_node_configuration = 2;
}
// NodeConfiguration indicates the configuration of a created Node.
message NodeConfiguration {
// Display name of the newly created node instance, for debugging purposes.
//
// Does not need to be unique.
string name = 1;
oneof config_type {
WebAssemblyConfiguration wasm_config = 2;
LogConfiguration log_config = 3;
StorageProxyConfiguration storage_config = 4;
GrpcServerConfiguration grpc_server_config = 5;
GrpcClientConfiguration grpc_client_config = 6;
RoughtimeClientConfiguration roughtime_client_config = 7;
HttpServerConfiguration http_server_config = 8;
}
}
// WebAssemblyConfiguration describes the configuration of a Web Assembly based
// Node.
message WebAssemblyConfiguration {
// The name of one of the entries in the
// `ApplicationConfiguration.wasm_modules` field.
string wasm_module_name = 1;
// The name of an exported WebAssembly function to invoke as the Node entry
// point.
string wasm_entrypoint_name = 2;
}
// LogConfiguration describes the configuration of a logging pseudo-Node (which
// is provided by the Oak Runtime).
message LogConfiguration {}
// StorageProxyConfiguration describes the configuration of a storage proxy
// pseudo-Node (which is provided by the Oak Runtime), connected to a specific
// storage provider.
message StorageProxyConfiguration {
// The address of the external storage provider.
string address = 1;
}
// GrpcServerConfiguration describes the configuration of a gRPC server
// pseudo-Node (which is provided by the Oak Runtime), that processes gRPC
// requests from external (non-Oak) clients.
message GrpcServerConfiguration {
// The endpoint address for the gRPC server to listen on.
// `address` is represented as an "ip_address:tcp_port" string.
string address = 1;
}
// GrpcClientConfiguration describes the configuration of a gRPC client
// pseudo-Node (which is provided by the Oak Runtime), connected to a specific
// external (non-Oak) gRPC service.
message GrpcClientConfiguration {
// The URI component of a gRPC server endpoint. Must contain the "Host"
// element. https://docs.rs/tonic/0.2.1/tonic/transport/struct.Uri.html
string uri = 1;
}
// RoughtimeClientConfiguration describes the configuration of a Roughtime
// client pseudo-Node (which is provided by the Oak Runtime), with the
// given external Roughtime servers and connection parameters.
message RoughtimeClientConfiguration {
// The collection of Roughtime servers to query. A default set of servers
// will be used if this is empty.
repeated RoughtimeServer servers = 1;
// Connection parameters; default values will be used if any parameter is
// unset.
google.protobuf.UInt32Value min_overlapping_intervals = 2;
google.protobuf.UInt32Value timeout_seconds = 3;
google.protobuf.UInt32Value server_retries = 4;
google.protobuf.UInt32Value max_radius_microseconds = 5;
}
// HttpServerConfiguration describes the configuration of an HTTP server
// pseudo-Node (which is provided by the Oak Runtime), that processes HTTP/2
// requests from external (non-Oak) clients.
message HttpServerConfiguration {
// The endpoint address for the HTTP server to listen on.
// `address` is represented as an "ip_address:tcp_port" string.
string address = 1;
}
// Information to identify a particular Roughtime server.
// Only UDP and Ed25519 public keys are currently supported.
message RoughtimeServer {
string name = 1;
string host = 2;
uint32 port = 3;
string public_key_base64 = 4;
}
// A serialized list of key-value pairs that are specified as command line flags
// to the Oak Loader binary, and are made available to the initial Node of the
// running Oak Application.
//
// Keys are human readable strings and usually correspond to file names.
//
// Values are raw binary blobs and usually correspond to file contents, which
// must be interpreted by the running Oak Application.
message ConfigMap {
map<string, bytes> items = 1;
}