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

place default keystore to install space #103

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

mikaelarguedas
Copy link
Member

This PR implements the keystore location in install space, based on discussion from #101 (comment)

The original implementation aimed at creating the default keystore in the sros2_cmake workspace install space under a ros2_security directory.

https://github.com/ross-desmond/sros2/blob/51fd900a1665bd6a4d760aa501488401f32946f3/sros2_cmake/sros2_cmakeConfig.cmake.in#L3-L5

In the case of installing from packages, this logic results in creating the keystore at /opt/ros/crystal/share/sros2_cmake/cmake/../../../ros2_security (which requires root access).

Changes from original implementation:

  • keystore is created in the current worskpace installation location
    • this requires the same permissions as the other install targets
    • is robust to the installation layout of sros2_cmake's workspace (aka results in the same directory whether the underlay was built in isolated install or merged install layout)
  • the keystore folder keys is renamed keystore

@ross-desmond
Does this match the expected behavior?
What files do we expect to be placed in the ros2_security folders other than the keystore? (user policy files maybe?). If none maybe 1 layer of subdirectory would be enough

Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
@mikaelarguedas mikaelarguedas added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Mar 29, 2019
@mikaelarguedas
Copy link
Member Author

@ross-desmond @mjcarroll gentle 🛎️

@mjcarroll
Copy link
Member

LGTM, @ross-desmond can you comment on Mikael's questions above?

@ross-desmond
Copy link
Contributor

@mikaelarguedas this does match the expected behaviour. I believe the comarmor xml policy files are more like a source, as they get compiled into DDS policy files and signed, and are therefore not included in the keystore. The keystore should be able to be generated from scratch to ensure deterministic compilation of security settings. What are your thoughts on that?

@mikaelarguedas
Copy link
Member Author

I believe the comarmor xml policy files are more like a source, as they get compiled into DDS policy files and signed

Yeah I agree with that. While I would expect most people to provide their policies via a package, they should be able to just put them in the install/ros2_security, delete install/ros2_security/keystore and regenerate. So keeping two directory levels for that use case sounds good to support that use case 👍

@mikaelarguedas
Copy link
Member Author

@mjcarroll I think we're on the same page here and this is ready to go. (thanks @ross-desmond for the comments 🙇‍♂️ )

@mjcarroll mjcarroll merged commit 97bc194 into ros2:master Apr 4, 2019
@mjcarroll mjcarroll removed the in review Waiting for review (Kanban column) label Apr 4, 2019
ryanewel pushed a commit to aws-ros-dev/sros2 that referenced this pull request Jun 12, 2019
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants