-
Notifications
You must be signed in to change notification settings - Fork 47
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
Update generate_policy verb for enclaves #203
Conversation
Signed-off-by: ruffsl <[email protected]>
Signed-off-by: ruffsl <[email protected]>
Signed-off-by: ruffsl <[email protected]>
Signed-off-by: ruffsl <[email protected]>
There shouldn't be much more to this, but I'm not sure why I'm seeing
Are one of our Update I think that xmlrpc issues as from my cli daemon being out of sync with my current workspace. |
Signed-off-by: ruffsl <[email protected]>
It looks like the ros2 daemon uses xmlrpc and needs explicit registration of functions to use to know how to deal with them, I opened ros2/ros2cli#501 that seems to address that problem. Now I get more "normal" XSL errors:
|
concat take 2+ args, only @path is needed to sort enclaves Signed-off-by: ruffsl <[email protected]>
@mikaelarguedas , I found that too, and fixed it in 7baa7aa . Now the policy output looks good: <policy version="0.2.0">
<enclaves>
<enclave path="/">
<profiles>
<profile node="listener" ns="/">
<services reply="ALLOW">
<service>~/describe_parameters</service>
<service>~/get_parameter_types</service>
<service>~/get_parameters</service>
<service>~/list_parameters</service>
<service>~/set_parameters</service>
<service>~/set_parameters_atomically</service>
</services>
<topics subscribe="ALLOW">
<topic>chatter</topic>
<topic>parameter_events</topic>
</topics>
<topics publish="ALLOW">
<topic>parameter_events</topic>
<topic>rosout</topic>
</topics>
</profile>
<profile node="talker" ns="/">
<services reply="ALLOW">
<service>~/describe_parameters</service>
<service>~/get_parameter_types</service>
<service>~/get_parameters</service>
<service>~/list_parameters</service>
<service>~/set_parameters</service>
<service>~/set_parameters_atomically</service>
</services>
<topics subscribe="ALLOW">
<topic>parameter_events</topic>
</topics>
<topics publish="ALLOW">
<topic>chatter</topic>
<topic>parameter_events</topic>
<topic>rosout</topic>
</topics>
</profile>
</profiles>
</enclave>
</enclaves>
</policy> |
yeah it seems to work with Is it expected ? otherwise looks good 👍 (as a side note there is a |
I think sros2/sros2/sros2/verb/generate_policy.py Lines 168 to 170 in 7baa7aa
Try setting the include_hidden_nodes to True. |
yeah it used to be exposed in most cli before but is not the case anymore. We could consider exposing it in the future if we want to support these use cases |
Those hidden node names from the CLI are normally unique with an ephemeral UID at the end anyhow. Not sure it's a big issue given those UIDs would have to be manually edited to deal with. |
Not sure how much we care about the suffix though, what you want are the permissions associated with it. the actual node name will not impact the fact that a participant using these policies wil be able to behave the same way right ? even if the node name is different? It does seem weird to have a Both these points are features and unrelated to this bugfix so they should not impact this PR |
Signed-off-by: Mikael Arguedas <[email protected]>
57c194e
to
ff3503b
Compare
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
===========================================
+ Coverage 60.00% 77.48% +17.48%
===========================================
Files 16 16
Lines 565 573 +8
Branches 52 53 +1
===========================================
+ Hits 339 444 +105
+ Misses 212 109 -103
- Partials 14 20 +6
Continue to review full report at Codecov.
|
Another linux build to confirm the cosmetic commit didnt break anything: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with green ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for this @ruffsl !
Considering that sros2
is a leaf package, and the verb modified here (generate_policies
) isn't covered by any of the tutorials, I think it's safe to merge this.
@jacobperron as rosboss for approval.
@ruffsl According to the checks, |
This is because the automatic checks don't use ros2/ros2cli#501 I launched a round of CI in #203 (comment) that leverage the fix on |
sros2/test/sros2/commands/security/verbs/test_generate_policy.py
Outdated
Show resolved
Hide resolved
sros2/test/sros2/commands/security/verbs/test_generate_policy.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Mikael Arguedas <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks guys!
This PR is also re-enabling the verb. |
Updates policy auto generation now that ros2/rclpy#529 is merged. Was disabled in #177.
Related: