-
Notifications
You must be signed in to change notification settings - Fork 45
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
Minimal permission set for a talker and listener pair in the demo_cpp example #32
Comments
pinging @mikaelarguedas or @codebot |
Yeah that's something I faced recently as well. So far SROS 2 was targetting only ROS topics and not ROS services. Now that every node starts a parameter server automatically to allow the use of external clock ( Services also vary depending on the DDS implementation so providing a (not too lose) set of permissions for all DDS implementations may be challenging. In the case of RTI Connext we use the Service API (DDS-RPC) and leave it up to Connext to create the underlying topics, that leads to 2 surprising behaviors so far:
I'm surprised you couldn't get any permissions more restrictive than wildcarding everything... Simply adding empty partition to the list of allowed partitions for the service topics does the job for me (see example of permission file below).
Agreed. Though it will need special logic within each rmw implementation and will likely require either implementing the Logging security module or at least increase the verbosity of DDS implementations loggers. What you see in the console is the content of the exception message provided by RTI Connext and ROS 2 doesn't have any additional information than what is currently displayed. |
Aw, yes! That did the trick, adding the exception for an empty partition with the service topics was the missing permission in this case. Perhaps Connext expert from RTI could explain the issue there. I was about to breakout my debugger, as I couldn't tell how the resources were being access differently than from external discovery data.
🎉 Awesome! Combining the topic namespace and topic name will greatly simplify permission translations from keymint_ros packages to DDS permission files, i.e. less room for ambiguities. Presently, security profiles are quite convoluted, and results in large/verbose XML documents due to the orthogonal uses in logical circuits for policy definitions between DDS and what would been needed for Ardent. This change should also afford more straight forward compressions of collapsable rules that share common criterion. BTW @mikaelarguedas , what do you mean by "CTF" and the rest of this statement:
|
Yeah I considered contacting them but figured I'll look at how we create services first. I don't think it's an issue on our side so it may be worth contacting them. This will require a minimal pure Connext reproducible example (should be easily done by modifying their examples)
Yeah, though there are still things that we assume that are not in the spec (like the Request/Reply suffix) but as all ROS 2 supported vendors comply with it that should be fine.
Sorry typo, CFT => Content-Filtered Topics. For example if you look at one of the Reply topics in the rtiadminconsole, in the content_filter_property section you will see the topic name suffixed with the participan guid. I thought that originally the topic name itself was suffixed but maybe that's another thing that changed since a previous version. |
I'm trying to determine the minimal set of permissions for a talker and listener pair in the demo_cpp example in order to evaluate keymint's provisioning of permissions. I've checked the discovery data, and I looks like I've added everything they'd need in the permissions document, but apparently I've missed something the client library is needing, as this inevitably causes the failure in creating the DDS participant.
Bug report
Required Info:
Steps to reproduce issue
I've made a simple example that can quickly be create using keymint_tools. See the example section in the repo README for more details: https://github.com/keymint/keymint_tools#example
You can also find the resulting keystore here: https://github.com/ruffsl/keymint_ws/tree/7783f87783e27efcee80be7f6189ded1bce5869e
For example. here is the permissions file for the talker before signing:
https://github.com/ruffsl/keymint_ws/blob/7783f87783e27efcee80be7f6189ded1bce5869e/build/talker/permissions.xml
Expected behavior
From looking at the discovery data, we can collect the number of resources advertised. I'd expect collpacing this back down into the permissions files would be sufficient, but perhaps there are some requested resources from the client library to the dds vender that are not being advertised during a non-secure session, or are not captured by my DDS session monitor under secure sessions without access control.
For good measure, one can simple add this XML snippet to the beginning of the
allow_rule
for thegrant
specific to the node within the keymint package source, then rebuild the keymint package and all will work as expected. However, this use of wildcarding nullifies what we are trying to achieve here.Actual behavior
If attempting to use the keystore files as is, you'll get this error noting the creation of the participant has failed due to the RTI_Security_AccessControl_check_create_datawriter:endpoint recognizing that the policy is insufficient for resources requested by the client library.
Additional information
Here is a record of the decoverydata captured for the talker listener cpp demo. I've provided a simple script to collapse the topics and partitions access by each participant for clarity. The resources listed are what I've incorporated into the minimal permissions keystore example linked above.
https://gist.github.com/ruffsl/d914f68342f616c361d7f44b7332e6ae
It would be nice if the error message return some context for the failed creation of the participant.
E.g. what resources were attempted before failure, and which specifically resulted in insufficient privileges.
The text was updated successfully, but these errors were encountered: