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
Copy file name to clipboardexpand all lines: source/Tutorials/Advanced/Security/Introducing-ros2-security.rst
+59-1
Original file line number
Diff line number
Diff line change
@@ -241,7 +241,65 @@ Note: You can switch between the C++ (demo_nodes_cpp) and Python (demo_nodes_py)
241
241
242
242
These nodes are able to communicate because we have created the appropriate keys and certificates for them.
243
243
244
-
Leave both nodes running as you answer the questions below.
244
+
Leave both nodes running as you use ``ros2cli`` and answer the questions below.
245
+
246
+
247
+
6\. Use ``ros2cli`` with security
248
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
249
+
250
+
To use ``ros2cli`` to iterate with ROS 2 secured network, you need to provide it with override enclave by ``ROS_SECURITY_ENCLAVE_OVERRIDE`` environmental variable.
251
+
Open an another terminal and set up the following environmental variables.
Now you can use ``ros2cli`` to communicate with ROS 2 secured network.
284
+
285
+
.. code-block:: bash
286
+
287
+
ros2 node list --no-daemon --spin-time 3
288
+
[INFO] [1733862009.410918416] [rcl]: Found security directory: /root/ros2_ws/colcon_ws/demo_keystore/enclaves/talker_listener/talker
289
+
/listener
290
+
/talker
291
+
292
+
.. code-block:: bash
293
+
294
+
ros2 topic list --no-daemon --spin-time 3
295
+
[INFO] [1733861998.562163611] [rcl]: Found security directory: /root/ros2_ws/colcon_ws/demo_keystore/enclaves/talker_listener/talker
296
+
/chatter
297
+
/parameter_events
298
+
/rosout
299
+
300
+
.. note::
301
+
302
+
Avoid using ros2 daemon because it may not have security enclaves, and enough time duration should be given for the discovery in ROS 2 secured network.
0 commit comments