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

Request service permissions should be included in generated policies #94

Closed
ruffsl opened this issue Mar 8, 2019 · 3 comments · Fixed by ros2/rmw#179
Closed

Request service permissions should be included in generated policies #94

ruffsl opened this issue Mar 8, 2019 · 3 comments · Fixed by ros2/rmw#179
Assignees
Labels
enhancement New feature or request

Comments

@ruffsl
Copy link
Member

ruffsl commented Mar 8, 2019

Feature request

Opening this ticket for feedback on the approach before starting implementation

Feature description

Improve the generate_policy verb to ensure service permissions for request are accounted for.

Context:

As mentioned in #91 (review) , policy files that auto generated by the generate_policy verb do not provision sufficient permissions for services, and instead only provision reply permissions when determined necessary via quiring the ros2 graph API.

Problems it will solve:
  • Startime failures: nodes may otherwise crash at runtime when failing to initialize a client due to insufficient privileges.
  • Runtime failures: nodes may also fail when remote servers refuse to accept requests from initialized client interfaces

Implementation considerations

This derives from the fact that the present ros2 graph API does not provide an interface to query for what services a node is assuming the client role. Although expanding the ros2 graph API could resolve this absence of information, in general a larger issue remains in that client interfaces may be temporally created, and thus harder to observe via a singular snapshot observation of the graph's current state. Alternate methods for modeling access control policies, such as inferring requirements from log event files like in AppArmor, could prove more complete in generating sufficient permissions for a target application.

Any feedback on the approach will be very appreciated :)

@jacobperron
Copy link
Member

in general a larger issue remains in that client interfaces may be temporally created, and thus harder to observe via a singular snapshot observation of the graph's current state.

Does this also apply to subscriptions/publishers? Sounds like it deserves a separate issue for discussion.

On the surface of it, expanding the graph API seems like a reasonable solution. I haven't put too much thought into it, but I can imagine the graph API being used by a long-running process that observes a ROS system over its lifetime and then generates a policy at the end. This would solve the issue of missing any short-lived ROS entities.

@jacobperron jacobperron added the enhancement New feature or request label Mar 12, 2019
@ruffsl
Copy link
Member Author

ruffsl commented Mar 12, 2019

Does this also apply to subscriptions/publishers? Sounds like it deserves a separate issue for discussion.

Yes, this would also apply to pub/sub just as well; topics used by short lived action clients comes to mind. I'll try and write up a separate issue for it then.

imagine the graph API being used by a long-running process that observes a ROS system over its lifetime and then generates a policy at the end. This would solve the issue of missing any short-lived ROS entities.

Perhaps. I suppose something akin to the daemon used by ros2cli for queries about the graph could work in the short run. In sros1 we used the master node for the same purpose. However I feel relying upon a single monitoring process does not scale well for distributed and decoupled environments, e.g. when the system deployment does not persist on a single network interfaces/transport. I'd rather see policies being generated from audit trails of log information like with AppArmor, e.g aa-logprof , when a multitude of sources and observations may be curated by the generation tool and policy authority outside of any runtime.

@mjcarroll
Copy link
Member

@ruffsl I'm moving this to backlog for now based on our waffle triage process, but if you start an implementation, feel free to move to "in progress"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants