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
This makes it difficult to provide any CLI the necessary root dir for its security artifacts at runtime.
I see a few solutions:
passing an argument to the cli to drop the use of its node_name_suffix, however the loss of a unique FQN could bing unintended consequences.
Add support for providing the exact path to the node_secure_root directory. This could be done by pre checking a new security environment variable that would take precedence over ROS_SECURITY_ROOT_DIRECTORY , e.g: ROS_SECURITY_NODE_DIRECTORY?
I like 2) as it would allow users to override the normal root lookup when using any CLI or debugging nodes with separate temporary credentials provisioned with super privileges, e.g "*" permissions for all topics.
Interesting points. I agree that (2) seems like a more general solution. I don't think there is any loss of security by going that route, since people could already change the node name during invocation anyway on the command line. Ideally it would also be possible to provide some "syntactic sugar" variable and/or command-line switch to handle the common case (namely, removing the PID suffix when looking up the node name in the security artifact directory tree).
Ideally it would also be possible to provide some "syntactic sugar" variable and/or command-line switch to handle the common case (namely, removing the PID suffix when looking up the node name in the security artifact directory tree).
I suppose we could signal and anonymous flag down to rcl, but it seems worth doing as it would simplify the use and organization of CLI utils that use PID suffixes. @codebot, would that be a use case for the cli_args argument?. Are there any other ROS2 examples of intentional anonymous node names?
Perhaps this an anonymous argument could specify the length of the prefix in the node name string to preserve, or some char mask list to normalise the node name string into a canonical form for security root lookup.
When using CLI tooling or debugging nodes, user may set ROS_SECURITY_NODE_DIRECTORY environment variable to overridingly specify the exact security artifacts path for the node is to use.
Next step is to document this feature and intended use pattern. Would the README file here be most appropriate, or would github.com/ros2/ros2_documentation more suited to hosting this.
Next step is to document this feature and intended use pattern. Would the README file here be most appropriate, or would github.com/ros2/ros2_documentation more suited to hosting this.
Looking at github.com/ros2/ros2_documentation just now, it seem like its in a peculiar state. I can't immediately recognize if its supposed to be a ROS2 wide wiki, or just a collection of unorganized docs for core ROS2 packages, or something else. I made a comment about it here:
Activity
codebot commentedon Sep 12, 2018
Interesting points. I agree that (2) seems like a more general solution. I don't think there is any loss of security by going that route, since people could already change the node name during invocation anyway on the command line. Ideally it would also be possible to provide some "syntactic sugar" variable and/or command-line switch to handle the common case (namely, removing the PID suffix when looking up the node name in the security artifact directory tree).
ruffsl commentedon Sep 12, 2018
That would also be a good idea! I did something similar in SROS1 to enable roslaunch/ros-topic/ros-etc, but it was sort of hacky and just searched for PID patterned suffixes and striped them:
https://github.com/ros/ros_comm/blob/f95b4a5de2acb4fb53f0e9a4cff47dcef928eac5/tools/rosgraph/src/rosgraph/security.py#L114-L118
I suppose we could signal and
anonymousflag down to rcl, but it seems worth doing as it would simplify the use and organization of CLI utils that use PID suffixes. @codebot, would that be a use case for thecli_argsargument?. Are there any other ROS2 examples of intentional anonymous node names?ruffsl commentedon Sep 12, 2018
Still not sure how to handle the service caller or topic publisher though:
https://github.com/ros2/ros2cli/search?utf8=%E2%9C%93&q=create_node&type=
Perhaps this an
anonymousargument could specify the length of the prefix in the node name string to preserve, or some char mask list to normalise the node name string into a canonical form for security root lookup.AAlon commentedon Oct 30, 2018
Hi, I've started a related discussion on Discoure: https://discourse.ros.org/t/ros2-security-cli-tools/6647 - would appreciate your input.
Adding override for ROS_SECURITY_NODE_DIRECTORY
Adding override for ROS_SECURITY_NODE_DIRECTORY
Adding override for ROS_SECURITY_NODE_DIRECTORY
Adding override for ROS_SECURITY_NODE_DIRECTORY
Adding override for ROS_SECURITY_NODE_DIRECTORY
Expand node_secure_root using local_namespace (#300)
ruffsl commentedon Nov 13, 2018
The following PRs addressing this issue have landed:
When using CLI tooling or debugging nodes, user may set
ROS_SECURITY_NODE_DIRECTORYenvironment variable to overridingly specify the exact security artifacts path for the node is to use.Next step is to document this feature and intended use pattern. Would the README file here be most appropriate, or would github.com/ros2/ros2_documentation more suited to hosting this.
ping @clalancette
clalancette commentedon Nov 14, 2018
I think putting it in https://github.com/ros2/ros2_documentation would give it the most visibility, so I'd vote for putting it there. @tfoote may have some further advice.
ruffsl commentedon Nov 15, 2018
Looking at github.com/ros2/ros2_documentation just now, it seem like its in a peculiar state. I can't immediately recognize if its supposed to be a ROS2 wide wiki, or just a collection of unorganized docs for core ROS2 packages, or something else. I made a comment about it here:
https://discourse.ros.org/t/ros-2-documentation-home-moving-to-index-ros-org-doc-ros2/6612/8
Expand node_secure_root using local_namespace (ros2#300)
mikaelarguedas commentedon Oct 24, 2019
As the relevant PRs have been merged for both the
MATCH_PREFIXbehavior and theROS_SECURITY_NODE_DIRECTORYand the behavior is documented at http://design.ros2.org/articles/ros2_dds_security.html I believe this can be closed.@ruffsl are there any remaining action items here?
ruffsl commentedon Oct 24, 2019
Mission accomplished 🚀
ros-discourse commentedon Jun 13, 2025
This issue has been mentioned on ROS Discourse. There might be relevant details there:
https://discourse.ros.org/t/ros2-security-cli-tools/6647/1