Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast-DDS uses SHM transport by default, so network traffic cannot be … #3683

Merged
merged 4 commits into from
Jun 5, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion source/Tutorials/Advanced/Security/Examine-Traffic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ ROS 2 communications security is all about protecting communications between nod
Prior tutorials enabled security, but how can you **really** tell if traffic is being encrypted?
In this tutorial we'll take a look at capturing live network traffic to show the difference between encrypted and unencrypted traffic.

.. note::

Please go through this tutorial to use different host system for talker and listener with ``rmw_fastrtps_cpp``.
fujitatomoya marked this conversation as resolved.
Show resolved Hide resolved
fujitatomoya marked this conversation as resolved.
Show resolved Hide resolved
``rmw_fastrtps_cpp`` uses `Shared Memory Transport <https://fast-dds.docs.eprosima.com/en/latest/fastdds/transport/shared_memory/shared_memory.html>`_ by default to improve the performance in the transport layer when the endpoints are in the same host system.
Security enclaves still can be applied, effective and data will be encrypted, but we cannot capture live network traffic since the data will not be on the network interface.
fujitatomoya marked this conversation as resolved.
Show resolved Hide resolved

Run the demo
------------
Expand All @@ -50,6 +55,9 @@ The security environment variables are not set so security is not enabled for th

.. code-block:: bash

# Disable ROS Security for both terminals
unset ROS_SECURITY_ENABLE

# In terminal 1:
ros2 run demo_nodes_cpp talker --ros-args --enclave /talker_listener/talker

Expand Down Expand Up @@ -198,7 +206,7 @@ A typical data packet looks like the following::
0x0150: 42ae f04d 0559 84c5 7116 1c51 91ba 3799 B..M.Y..q..Q..7.
0x0160: 0000 0000 ....

The data in this RTPS packet is all encrpyted.
The data in this RTPS packet is all encrypted.

In addition to this data packet, you should see additional packets with node and enclave names; these support other ROS features such as parameters and services.
Encryption options for these packets can also be controlled by security policy.