-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathregister.proto
More file actions
51 lines (44 loc) · 1.94 KB
/
register.proto
File metadata and controls
51 lines (44 loc) · 1.94 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
// Copyright(c) 2017-2018 Zededa, Inc.
// All rights reserved.
syntax = "proto3";
package org.lfedge.eve.register;
option go_package = "github.com/lf-edge/eve-api/go/register";
option java_package = "org.lfedge.eve.register";
// This is imported from protoc-gen-validate
import "validate/validate.proto";
// This is the request payload for POST /api/v2/edgeDevice/register
// ZRegisterMsg carries the pem-encoded device certificate plus additional
// identifying information such as device serial number(s).
// The message is assumed to be protected by a TLS session bound to the
// onboarding certificate.
message ZRegisterMsg {
// Deprecated onboarding key field, kept for backward compatibility only
string onBoardKey = 1 [deprecated = true];
// PEM-encoded device certificate (required for device authentication)
// Must contain a valid X.509 certificate in PEM format
// Used to establish device identity and trust relationship with controller
bytes pemCert = 2 [
(validate.rules).bytes = {
min_len: 100, // Minimum reasonable PEM cert size
max_len: 10240 // Maximum reasonable PEM cert size (10KB)
}
];
// Hardware serial number (required for device identification),
// must be unique identifier from device hardware,
// combined with onboard certificate to ensure device uniqueness
string serial = 3 [
(validate.rules).string = {
max_len: 256, // Reasonable serial number length limit,
// since we don't control the serial number
// the validation rule is relaxed.
}
];
// Software serial number (optional additional device identifier),
// provides supplementary identification when available
string softSerial = 4 [
(validate.rules).string = {
max_len: 256, // Same limit as hardware serial
pattern: "^[a-zA-Z0-9_-]*$" // Same pattern as serial, but optional
}
];
}