Skip to content

Commit 8781a27

Browse files
authored
add unsupport none security in opcus (#1081)
1 parent b9fa377 commit 8781a27

10 files changed

Lines changed: 339 additions & 45 deletions

File tree

90.3 KB
Loading
16.7 KB
Loading

src/UserGuide/Master/Tree/API/Programming-OPC-UA_timecho.md

Lines changed: 78 additions & 16 deletions
Large diffs are not rendered by default.

src/UserGuide/V1.3.x/API/Programming-OPC-UA_timecho.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,16 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
9292
2. Install UAExpert and fill in your own certificate information.
9393

9494
#### Quick Start
95+
##### Scenarios Supporting the None Security Policy
9596

9697
1. Use the following SQL to create and start the OPC UA Sink in client-server mode. For detailed syntax, please refer to: [IoTDB OPC Server Syntax](#syntax)
9798

9899
```sql
99-
create pipe p1 with sink ('sink'='opc-ua-sink');
100+
create pipe p1 with sink ('sink'='opc-ua-sink', 'opcua.security-policy'='AES128_SHA256_RSAOAEP, AES256_SHA256_RSAPSS, BASIC256SHA256, NONE');
100101
```
101102

103+
Note: Since version V1.3.7.2, None is no longer supported by default. To use it, you must manually enable it via the security-policy parameter as shown above.
104+
102105
2. Write some data.
103106

104107
```sql
@@ -135,6 +138,9 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
135138

136139
:::
137140

141+
Note: Since the SecurityPolicy is set to None, mutual certificate trust is not required. For production environments, it is recommended to use a non-None SecurityPolicy for connection, which requires mutual certificate trust. For operations, refer to the Pub/Sub mode section below. In the Client/Server certificate directory (search for the keyword keyStore in the printed logs), move the contents in reject to trusted/certs. Follow the sequence: connect → move server directory → connect → move client directory → connect.
142+
143+
138144
5. You can drag the node on the left to the center and display the latest value of that node:
139145

140146
::: center
@@ -143,6 +149,32 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
143149

144150
:::
145151

152+
##### Scenarios Not Supporting the None Security Policy
153+
1. Use the following SQL to create and start the OPC UA service.
154+
```SQL
155+
create pipe p1 with sink ('sink'='opc-ua-sink');
156+
```
157+
158+
Note: Since version V1.3.7.2, OpcUaSink no longer supports None mode by default for security considerations.
159+
160+
2. Insert some test data.
161+
```SQL
162+
insert into root.test.db(time, s2) values(now(), 2);
163+
```
164+
165+
3. Configure the IoTDB connection in UAExpert:
166+
167+
- Do not access the URL directly; endpoints must be discovered using the Discover method
168+
- The client first sends a GetEndpoints request with the None policy to retrieve the endpoint list
169+
- It then selects the corresponding encrypted endpoint based on the configured Basic256Sha256 + SignAndEncrypt to establish an encrypted connection
170+
171+
![](/img/opc-ua-un-none-1.png)
172+
173+
4. Use the same username and password configuration as above. After selecting the relevant connection mode (Sign / Sign & Encrypt), if the following prompt appears, click Ignore to connect directly.
174+
175+
![](/img/opc-ua-un-none-2.png)
176+
177+
146178
### Pub / Sub Mode
147179

148180
In this mode, IoTDB's stream processing engine sends data change events to the OPC UA Server through an OPC UA Sink. These events are published to the server's message queue and managed through Event Nodes. Other OPC UA Clients can subscribe to these Event Nodes to receive notifications upon data changes.

src/UserGuide/dev-1.3/API/Programming-OPC-UA_timecho.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,16 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
9292
2. Install UAExpert and fill in your own certificate information.
9393

9494
#### Quick Start
95+
##### Scenarios Supporting the None Security Policy
9596

9697
1. Use the following SQL to create and start the OPC UA Sink in client-server mode. For detailed syntax, please refer to: [IoTDB OPC Server Syntax](#syntax)
9798

9899
```sql
99-
create pipe p1 with sink ('sink'='opc-ua-sink');
100+
create pipe p1 with sink ('sink'='opc-ua-sink', 'opcua.security-policy'='AES128_SHA256_RSAOAEP, AES256_SHA256_RSAPSS, BASIC256SHA256, NONE');
100101
```
101102

103+
Note: Since version V1.3.7.2, None is no longer supported by default. To use it, you must manually enable it via the security-policy parameter as shown above.
104+
102105
2. Write some data.
103106

104107
```sql
@@ -135,6 +138,9 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
135138

136139
:::
137140

141+
Note: Since the SecurityPolicy is set to None, mutual certificate trust is not required. For production environments, it is recommended to use a non-None SecurityPolicy for connection, which requires mutual certificate trust. For operations, refer to the Pub/Sub mode section below. In the Client/Server certificate directory (search for the keyword keyStore in the printed logs), move the contents in reject to trusted/certs. Follow the sequence: connect → move server directory → connect → move client directory → connect.
142+
143+
138144
5. You can drag the node on the left to the center and display the latest value of that node:
139145

140146
::: center
@@ -143,6 +149,32 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
143149

144150
:::
145151

152+
##### Scenarios Not Supporting the None Security Policy
153+
1. Use the following SQL to create and start the OPC UA service.
154+
```SQL
155+
create pipe p1 with sink ('sink'='opc-ua-sink');
156+
```
157+
158+
Note: Since version V1.3.7.2, OpcUaSink no longer supports None mode by default for security considerations.
159+
160+
2. Insert some test data.
161+
```SQL
162+
insert into root.test.db(time, s2) values(now(), 2);
163+
```
164+
165+
3. Configure the IoTDB connection in UAExpert:
166+
167+
- Do not access the URL directly; endpoints must be discovered using the Discover method
168+
- The client first sends a GetEndpoints request with the None policy to retrieve the endpoint list
169+
- It then selects the corresponding encrypted endpoint based on the configured Basic256Sha256 + SignAndEncrypt to establish an encrypted connection
170+
171+
![](/img/opc-ua-un-none-1.png)
172+
173+
4. Use the same username and password configuration as above. After selecting the relevant connection mode (Sign / Sign & Encrypt), if the following prompt appears, click Ignore to connect directly.
174+
175+
![](/img/opc-ua-un-none-2.png)
176+
177+
146178
### Pub / Sub Mode
147179

148180
In this mode, IoTDB's stream processing engine sends data change events to the OPC UA Server through an OPC UA Sink. These events are published to the server's message queue and managed through Event Nodes. Other OPC UA Clients can subscribe to these Event Nodes to receive notifications upon data changes.

src/UserGuide/latest/API/Programming-OPC-UA_timecho.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,13 @@ In this mode, IoTDB's stream processing engine establishes a connection with the
110110
2. Install UAExpert and configure certificate information.
111111

112112
##### 2.2.1.2 Quick Start
113-
113+
###### 2.2.1.2.1 Scenarios Supporting the None Security Policy
114114
1. Start OPC UA service using SQL (detailed syntax see [IoTDB OPC Server Syntax](./Programming-OPC-UA_timecho.md#_2-1-语法)):
115115

116116
```SQL
117-
CREATE PIPE p1 WITH SINK ('sink'='opc-ua-sink');
117+
create pipe p1 with sink ('sink'='opc-ua-sink', 'opcua.security-policy'='AES128_SHA256_RSAOAEP, AES256_SHA256_RSAPSS, BASIC256SHA256, NONE');
118118
```
119+
Note: Since version V2.0.8.1, None is no longer supported by default. To use it, you must manually enable it via the security-policy parameter as shown above.
119120

120121
2. Write some data:
121122

@@ -124,9 +125,70 @@ INSERT INTO root.test.db(time, s2) VALUES(NOW(), 2);
124125
```
125126

126127
3. Configure UAExpert to connect to IoTDB (password matches `sink.password` configured above, e.g., root/TimechoDB@2021):
128+
129+
::: center
130+
131+
<img src="/img/OPCUA18.png" alt="" style="width: 60%;"/>
132+
133+
:::
134+
135+
::: center
136+
137+
<img src="/img/OPCUA04.png" alt="" style="width: 60%;"/>
138+
139+
:::
140+
127141
4. Trust the server certificate, then view written data under Objects folder on the left:
142+
143+
::: center
144+
145+
<img src="/img/OPCUA05.png" alt="" style="width: 60%;"/>
146+
147+
:::
148+
149+
::: center
150+
151+
<img src="/img/OPCUA17.png" alt="" style="width: 60%;"/>
152+
153+
:::
154+
155+
Note: Since the SecurityPolicy is set to None, mutual certificate trust is not required. For production environments, it is recommended to use a non-None SecurityPolicy for connection, which requires mutual certificate trust. For operations, refer to the Pub/Sub mode section below. In the Client/Server certificate directory (search for the keyword keyStore in the printed logs), move the contents in reject to trusted/certs. Follow the sequence: connect → move server directory → connect → move client directory → connect.
156+
157+
128158
5. Drag left nodes to the middle to display latest value:
129159

160+
::: center
161+
162+
<img src="/img/OPCUA07.png" alt="" style="width: 60%;"/>
163+
164+
:::
165+
166+
###### 2.2.1.2.2 Scenarios Not Supporting the None Security Policy
167+
1. Use the following SQL to create and start the OPC UA service.
168+
```SQL
169+
create pipe p1 with sink ('sink'='opc-ua-sink');
170+
```
171+
172+
Note: Since version V2.0.8.1, OpcUaSink no longer supports None mode by default for security considerations.
173+
174+
2. Insert some test data.
175+
```SQL
176+
insert into root.test.db(time, s2) values(now(), 2);
177+
```
178+
179+
3. Configure the IoTDB connection in UAExpert:
180+
181+
- Do not access the URL directly; endpoints must be discovered using the Discover method
182+
- The client first sends a GetEndpoints request with the None policy to retrieve the endpoint list
183+
- It then selects the corresponding encrypted endpoint based on the configured Basic256Sha256 + SignAndEncrypt to establish an encrypted connection
184+
185+
![](/img/opc-ua-un-none-1.png)
186+
187+
4. Use the same username and password configuration as above. After selecting the relevant connection mode (Sign / Sign & Encrypt), if the following prompt appears, click Ignore to connect directly.
188+
189+
![](/img/opc-ua-un-none-2.png)
190+
191+
130192
#### 2.2.2 Pub/Sub Mode
131193

132194
In this mode, IoTDB's stream processing engine sends data change events to the OPC UA Server (Server) via OPC UA Sink. These events are published to the server's message queue and managed via Event Nodes. Other OPC UA clients (Clients) can subscribe to these Event Nodes to receive notifications when data changes.

0 commit comments

Comments
 (0)