You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- to prepare for Edgeview-UI, controller side certificate signed
Edgeview commands
- extend the Edgeview JWT token to include 'Authen Type'
- implement device side verifying Edgeview commands using controller's
signing certs
- implement remote user using SSH key pairs authentication for Edgeview
commands
- SSH public key can for authentication can use ConfigItem
'edgeview.authen.publickey'
- Edgeview command is logged, and this patch adds the user-info either
the username from controller side, or the info in the SSH public key
comment
Signed-off-by: naiming-zededa <[email protected]>
Copy file name to clipboardExpand all lines: docs/CONFIG-PROPERTIES.md
+1
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,7 @@
75
75
| msrv.prometheus.metrics.rps | integer | 1 | The maximum number of requests per second (RPS) for the Prometheus metrics endpoint. |
76
76
| msrv.prometheus.metrics.burst | integer | 10 | The maximum burst size for the Prometheus metrics endpoint. |
77
77
| msrv.prometheus.metrics.idletimeout.seconds | integer | 240 | The idle timeout in seconds for the Prometheus metrics endpoint. If the connection is idle for this duration, the limit is reset. |
78
+
| edgeview.authen.publickey | string | "" | Specifies SSH RSA public keys for Edgeview client command authentication. The user must provide the path to the SSH private key in the client script, and the device verifies the command using one of the configured public keys. Separate multiple public keys with newline characters. |
Copy file name to clipboardExpand all lines: docs/EDGEVIEW-CONTAINER-API.md
+66
Original file line number
Diff line number
Diff line change
@@ -23,3 +23,69 @@ For security reasons, the Edge-View container has all the volumes mounted in 're
23
23
## Logging to Event
24
24
25
25
Edge-View logging is similar to other containers. For any user command received by Edge-View, it will log the client endpoint(IP address/port), the command and its parameters. The log entry will also be tagged with object-type of `log-to-event`, and the controller can optionally process those log entries and generate them as device events or alerts.
26
+
27
+
## Edge-View Client Authentication
28
+
29
+
To address limitations in controlling and tracking user access to Edge-View commands, the authentication enhancements to Edge-View aim to strengthen user authentication, enforce stricter access controls, and improve user tracking.
30
+
31
+
### Key Enhancements
32
+
33
+
1.**Authentication Enhancements**
34
+
Stricter authentication methods will be implemented to ensure that commands originate from authorized sources. These sources include the Controller webpage session or authenticated remote users. JWT token is extended to support types of client authentication.
35
+
36
+
2.**Edgeview Policy Addition**
37
+
A new optional "Controller Auth Only" item will be added to the controller Edge-View policy. This policy, definable at the project level, enforces that Edgeview commands must originate from the Controller.
38
+
39
+
3.**Client Authentication (Controller Cert Signed Type)**
40
+
Commands issued from the Edge-View UI will be signed by the Zedcloud/Controller's private signing key, if the policy requires it. The device will verify these commands using the corresponding public certificate from the controller.
41
+
42
+
4.**Remote User Authentication (SSH Key Pairs Type)**
43
+
Remote users can authenticate using SSH RSA keys, providing an additional secure access method for Edge-View. These public keys will be installed via the Edge-node ConfigItem "edgeview.authen.publickey". If there are changes to the "edgeview.authen.publickey" ConfigItem, any active Edge-View sessions on the Edge-node will be terminated. Users will need to re-enable the Edge-View session to apply the updated authentication settings. This ensures that only authorized keys are used for remote access.
44
+
45
+
5.**UserInfo Logging**
46
+
A new "UserInfo" field will be added to the Edge-View command payload. This field logs the username of the user issuing the command, improving accountability and tracking. For the remote users using SSH key for authentication, the user public key comment field will be logged for the user tracking.
47
+
48
+
6.**Struct Definition Changes**
49
+
Updates to the Zedcloud protocol buffers definition include:
50
+
- Adding an `EvAuthType` enum in the `EvjwtInfo` struct to support different authentication methods (e.g., Controller Cert, SSH Keys).
51
+
- Introducing a new `EvjwtInfo` struct to encapsulate JWT-related information with enhanced authentication support. The struct is defined as follows:
52
+
53
+
```go
54
+
typeEvjwtInfostruct {
55
+
Depstring`json:"dep"`// dispatcher end-point string e.g. ip:port
56
+
Substring`json:"sub"`// jwt subject, the device UUID string
57
+
Expuint64`json:"exp"`// expiration time for the token
58
+
Keystring`json:"key"`// key or nonce for payload hmac authentication
59
+
Numuint8`json:"num"`// number of instances, default is 1
60
+
Encbool`json:"enc"`// payload with encryption, default is authentication
61
+
AutEvAuthType`json:"aut"`// authentication type
62
+
}
63
+
```
64
+
65
+
- The`EvAuthType` enum defines the supported authentication types forEdge-View:
66
+
67
+
```go
68
+
// EvAuthType - enum for authentication type of edge-view
69
+
type EvAuthType int32
70
+
71
+
const (
72
+
EvAuthTypeUnspecified EvAuthType = iota
73
+
EvAuthTypeControllerCert
74
+
EvAuthTypeSshRsaKeys
75
+
)
76
+
```
77
+
78
+
These additions enhance the flexibility and security of the Edge-View authentication mechanism by supporting multiple authentication methods and encapsulating JWT-related details in a structured format.
79
+
80
+
7. **Command PayloadSigning and Verifying**
81
+
WhenEdgeview authentication is enabled, the Edgeview command payload will include a new `username` field to carry the user name from the controller side. Additionally, the original `Hash auth` field will be used as the `Signature`, which is signed using either the controller's private signing key or the SSH private key, depending on the authentication type.
82
+
83
+
On the Edge-node side, the authentication will be verified using either the controller's public signing key or the SSH public key. This ensures secure and authenticated communication between the controller and the Edge-node.
84
+
85
+
Below is the diagram for the authentication type of `Controller Cert`.
0 commit comments