-
Notifications
You must be signed in to change notification settings - Fork 243
Expand file tree
/
Copy pathedge_cmd.proto
More file actions
522 lines (455 loc) · 11 KB
/
edge_cmd.proto
File metadata and controls
522 lines (455 loc) · 11 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
syntax = "proto3";
package ziti.edge_cmd.pb;
option go_package = "github.com/openziti/edge/pb/edge_cmd_pb";
import "google/protobuf/timestamp.proto";
enum CommandType {
Zero = 0;
CreateEdgeTerminatorType = 1000;
ReplaceEnrollmentWithAuthenticatorType = 1001;
CreateEdgeRouterType = 1002;
CreateTransitRouterType = 1003;
CreateIdentityWithEnrollmentsType = 1004;
UpdateServiceConfigsType = 1005;
ReEnrollEdgeRouterType = 1006;
CreateIdentityWithAuthenticatorsType = 1007;
DeleteRevocationsBatchType = 1008;
CreateRevocationsBatchType = 1009;
}
message ChangeContext {
map<string, string> attributes = 1;
uint64 raftIndex = 2;
}
message CreateEdgeTerminatorCommand {
bytes terminatorData = 1;
ChangeContext ctx = 2;
}
message TagValue {
oneof value {
bool boolValue = 1;
string stringValue = 2;
double fpValue = 3;
bool nilValue = 4;
}
}
message JsonMap {
map<string, JsonValue> value = 1;
}
message JsonList {
repeated JsonValue value = 1;
}
message JsonValue {
oneof value {
bool boolValue = 1;
string stringValue = 2;
double fpValue = 3;
int64 int64Value = 4;
bool nilValue = 5;
JsonMap mapValue = 6;
JsonList listValue = 7;
}
}
// Authenticators
message Authenticator {
message Cert {
string fingerprint = 1;
string pem = 2;
string unverifiedFingerprint = 3;
string unverifiedPem = 4;
bool isIssuedByNetwork = 5;
bool isExtendRequested = 6;
bool isKeyRollRequested = 7;
google.protobuf.Timestamp extendRequestedAt = 8;
string publicKeyPrint = 9;
bool lastExtendPublicKeyChanged = 10;
bool lastAuthResolvedToRoot = 11;
}
message Updb {
string username = 1;
string password = 2;
string salt = 3;
}
string id = 1;
map<string, TagValue> tags = 2;
string identityId = 3;
oneof subtype {
Cert cert = 4;
Updb updb = 5;
}
}
// Auth Policies
message AuthPolicy {
message Primary {
message Cert {
bool allowed = 1;
bool allowExpiredCerts = 2;
}
message Updb {
bool allowed = 1;
int64 MinPasswordLength = 2;
bool RequireSpecialChar = 3;
bool requireNumberChar = 4;
bool RequireMixedCase = 5;
int64 MaxAttempts = 6;
int64 LockoutDurationMinutes = 7;
}
message ExtJwt {
bool allowed = 1;
bool allowAllSigners = 2;
repeated string allowedExtJwtSigners = 3;
}
Cert cert = 1;
Updb updb = 2;
ExtJwt extJwt = 3;
}
message Secondary {
bool requireTotp = 1;
optional string requiredExtJwtSigner = 2;
}
string id = 1;
string name = 2;
Primary primary = 3;
Secondary secondary = 4;
map<string, TagValue> tags = 5;
}
// CAs
message Ca {
message ExternalIdClaim {
string location = 1;
string matcher = 2;
string MatcherCriteria = 3;
string Parser = 4;
string ParserCriteria = 5;
int64 Index = 6;
}
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string fingerprint = 4;
string certPem = 5;
bool isVerified = 6;
string verificationToken = 7;
bool isAutoCaEnrollmentEnabled = 8;
bool isOttCaEnrollmentEnabled = 9;
bool isAuthEnabled = 10;
repeated string identityRoles = 11;
string identityNameFormat = 12;
optional ExternalIdClaim externalIdClaim = 13;
}
// Configs
message Config {
string id = 1;
string name = 2;
string configTypeId = 3;
bytes data = 4;
map<string, TagValue> tags = 5;
}
// Config Types
message ConfigType {
string id = 1;
string name = 2;
bytes schema = 3;
map<string, TagValue> tags = 4;
}
// Controllers
message Controller {
string id = 1;
string name = 2;
string address = 3;
string certPem = 4;
string fingerprint = 5;
bool isOnline = 6;
google.protobuf.Timestamp lastJoinedAt = 7;
map<string, TagValue> tags = 8;
map<string, ApiAddressList> apiAddresses = 9;
bool isPreferredLeader = 10;
}
message ApiAddressList {
repeated ApiAddress addresses = 1;
}
message ApiAddress {
string Url = 1;
string Version = 2;
}
message Interface {
string name = 1;
string hardwareAddress = 2;
int64 mtu = 3;
int64 index = 4;
uint64 flags = 5;
repeated string addresses = 6;
}
message CtrlChanListenerDetail {
repeated string groups = 1;
}
// Edge Routers
message EdgeRouter {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
repeated string roleAttributes = 4;
bool isVerified = 5;
optional string fingerprint = 6;
optional string certPem = 7;
optional string hostname = 8;
bool isTunnelerEnabled = 9;
bytes appData = 10;
optional string unverifiedFingerprint = 11;
optional string unverifiedCertPem = 12;
uint32 cost = 13;
bool noTraversal = 14;
bool disabled = 15;
repeated Interface interfaces = 16;
map<string, CtrlChanListenerDetail> ctrlChanListeners = 17;
}
message ReEnrollEdgeRouterCmd {
string edgeRouterId = 1;
ChangeContext ctx = 2;
}
message CreateEdgeRouterCmd {
EdgeRouter edgeRouter = 1;
Enrollment enrollment = 2;
ChangeContext ctx = 3;
}
// Edge Router Policies
message EdgeRouterPolicy {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string semantic = 4;
repeated string edgeRouterRoles = 5;
repeated string identityRoles = 6;
}
// Enrollments
message Enrollment {
string id = 1;
map<string, TagValue> tags = 2;
string method = 3;
optional string identityId = 4;
optional string transitRouterId = 5;
optional string edgeRouterId = 6;
string token = 7;
google.protobuf.Timestamp issuedAt = 8;
google.protobuf.Timestamp expiresAt = 9;
string jwt = 10;
optional string caId = 11;
optional string username = 12;
}
message ReplaceEnrollmentWithAuthenticatorCmd {
string enrollmentId = 1;
Authenticator authenticator = 2;
ChangeContext ctx = 3;
}
// External JWT Signers
message ExternalJwtSigner {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
optional string certPem = 4;
optional string jwksEndpoint = 5;
optional string kid = 6;
bool enabled = 7;
optional string externalAuthUrl = 8;
bool useExternalId = 9;
optional string claimsProperty = 10;
optional string issuer = 11;
optional string audience = 12;
string commonName = 13;
optional string fingerprint = 14;
google.protobuf.Timestamp notAfter = 15;
google.protobuf.Timestamp notBefore = 16;
optional string clientId = 17;
repeated string scopes = 18;
string targetToken = 19;
bool enrollToCertEnabled = 20;
bool enrollToTokenEnabled = 21;
string enrollAuthPolicyId = 22;
string enrollNameClaimSelector = 23;
string enrollAttributeClaimsSelector = 24;
}
// Identities
message Identity {
message EnvInfo {
string Arch = 1;
string Os = 2;
string OsRelease = 3;
string OsVersion = 4;
string Domain = 5;
string Hostname = 6;
}
message SdkInfo {
string AppId = 1;
string AppVersion = 2;
string Branch = 3;
string Revision = 4;
string Type = 5;
string Version = 6;
}
message ServiceConfig {
string serviceId = 1;
string configTypeId = 2;
string configId = 3;
}
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string identityTypeId = 4;
bool isDefaultAdmin = 5;
bool isAdmin = 6;
repeated string roleAttributes = 7;
optional EnvInfo envInfo = 8;
optional SdkInfo sdkInfo = 9;
uint32 defaultHostingPrecedence = 10;
uint32 defaultHostingCost = 11;
map<string, uint32> serviceHostingPrecedences = 12;
map<string, uint32> serviceHostingCosts = 13;
bytes appData = 14;
string authPolicyId = 15;
optional string externalId = 16;
bool disabled = 17;
optional google.protobuf.Timestamp disabledAt = 18;
optional google.protobuf.Timestamp disabledUntil = 19;
repeated ServiceConfig serviceConfigs = 20;
repeated Interface interfaces = 21;
repeated string permissions = 22;
}
message CreateIdentityWithEnrollmentsCmd {
Identity identity = 1;
repeated Enrollment enrollments = 2;
ChangeContext ctx = 3;
}
message CreateIdentityWithAuthenticatorsCmd {
Identity identity = 1;
repeated Authenticator authenticators = 2;
ChangeContext ctx = 3;
}
// MFA
message Mfa {
string id = 1;
map<string, TagValue> tags = 2;
bool isVerified = 3;
string identityId = 4;
string secret = 5;
repeated string recoveryCodes = 6;
}
// Posture Checks
/*
*/
message PostureCheck {
message Mac {
repeated string macAddresses = 1;
}
message Mfa {
int64 TimeoutSeconds = 1;
bool PromptOnWake = 2;
bool PromptOnUnlock = 3;
bool IgnoreLegacyEndpoints = 4;
}
message Os {
string OsType = 1;
repeated string OsVersions = 2;
}
message OsList {
repeated Os osList = 1;
}
message Process {
string OsType = 1;
string Path = 2;
repeated string Hashes = 3;
repeated string Fingerprints = 4;
}
message ProcessMulti {
string semantic = 1;
repeated Process processes = 2;
}
message Domains {
repeated string domains = 1;
}
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string typeId = 4;
int64 version = 5;
repeated string roleAttributes = 6;
oneof subtype {
Mac mac = 7;
Mfa mfa = 8;
OsList osList = 9;
Process process = 10;
ProcessMulti processMulti = 11;
Domains domains = 12;
};
}
message Revocation {
string id = 1;
google.protobuf.Timestamp expiresAt = 2;
map<string, TagValue> tags = 3;
string type = 4;
}
message DeleteRevocationsBatchCommand {
repeated string entityIds = 1;
ChangeContext ctx = 2;
}
message CreateRevocationsBatchCommand {
repeated Revocation revocations = 1;
ChangeContext ctx = 2;
}
// Services
message Service {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string terminatorStrategy = 4;
repeated string roleAttributes = 5;
repeated string configs = 6;
bool encryptionRequired = 7;
int64 maxIdleTime = 8;
}
// Service Edge Router Policies
message ServiceEdgeRouterPolicy {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string semantic = 4;
repeated string edgeRouterRoles = 5;
repeated string serviceRoles = 6;
}
// Service Policies
message ServicePolicy {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
string semantic = 4;
repeated string identityRoles = 5;
repeated string serviceRoles = 6;
repeated string postureCheckRoles = 7;
string policyType = 8;
}
// Transit Routers
message TransitRouter {
string id = 1;
string name = 2;
map<string, TagValue> tags = 3;
bool isVerified = 4;
optional string fingerprint = 5;
optional string unverifiedFingerprint = 6;
optional string unverifiedCertPem = 7;
uint32 cost = 8;
bool noTraversal = 9;
bool disabled = 10;
map<string, CtrlChanListenerDetail> ctrlChanListeners = 11;
}
message CreateTransitRouterCmd {
TransitRouter router = 1;
Enrollment enrollment = 2;
ChangeContext ctx = 3;
}
message UpdateServiceConfigsCmd {
message ServiceConfig {
string serviceId = 1;
string configId = 2;
}
string identityId = 1;
bool add = 2;
repeated ServiceConfig serviceConfigs = 3;
ChangeContext ctx = 4;
}