Skip to content

Use keystore root as security root directory, and not contexts folder - #410

Merged
ivanpauno merged 4 commits into
masterfrom
ivanpauno/correct-security-root-directory
Apr 9, 2020
Merged

ivanpauno merged 4 commits into
masterfrom
ivanpauno/correct-security-root-directory

Conversation

@ivanpauno

Copy link
Copy Markdown
Member

See ros2/rcl#607.
Both should be merged together.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno added the in review Waiting for review (Kanban column) label Apr 7, 2020
@ivanpauno ivanpauno self-assigned this Apr 7, 2020

@mikaelarguedas mikaelarguedas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hidmic hidmic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ruffsl ruffsl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@ivanpauno

Copy link
Copy Markdown
Member Author

I cannot reproduce the problem in my Windows VM, I will try to figure it out ...

@ivanpauno

Copy link
Copy Markdown
Member Author

I cannot reproduce the problem in my Windows VM, I will try to figure it out ...

I forgot -DSECURITY=ON 🤦‍♂️ .

Signed-off-by: Ivan S Paunovic <ivanpauno@gmail.com>
@ivanpauno
ivanpauno force-pushed the ivanpauno/correct-security-root-directory branch from 1aa8353 to ea42d08 Compare April 9, 2020 13:04
@ivanpauno

Copy link
Copy Markdown
Member Author

mikaelarguedas
mikaelarguedas previously approved these changes Apr 9, 2020

@mikaelarguedas mikaelarguedas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hooray! pretty confused as of why the path worked before in this package but this particular 'contexts' addition needed special handling 🤔

I forgot -DSECURITY=ON man_facepalming .

Yeah this should probably be removed from the test_security package completely... This is a Fast-RTPS flag and requiring to pass it to test security on any rmw implementation is not really warranted.

@mikaelarguedas

mikaelarguedas commented Apr 9, 2020

Copy link
Copy Markdown
Member

Were the linux and MacOS tests ran with that change too ? (the path modification seem to happen unconditionally / on all platforms)

@mikaelarguedas
mikaelarguedas dismissed their stale review April 9, 2020 14:43

question about platforms tested

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno

Copy link
Copy Markdown
Member Author

Where the linux and MacOS tests ran with that change too ? (the path modification seem to happen unconditionally / on all platforms)

Thank you!
New CI jobs here ros2/rcl#607 (comment).

Comment thread test_security/CMakeLists.txt Outdated
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
ivanpauno requested a review from mikaelarguedas April 9, 2020 16:28

@mikaelarguedas mikaelarguedas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, one non-blocking nit

Do you want to merge this and we'll do a follow-up for the enclave renaming ?

set(KEYSTORE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test/test_security_files")
set(VALID_ROS_SECURITY_ROOT_DIRECTORY "${KEYSTORE_DIRECTORY}/contexts")
if(WIN32)
string(REPLACE "/" "\\\\" KEYSTORE_DIRECTORY_NATIVE_PATH "${KEYSTORE_DIRECTORY}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit^10: this could be done in place removing the need for a new variable and an else cause here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this

file(REMOVE "${KEYSTORE_DIRECTORY}/contexts/publisher_missing_key/key.pem")

will continue working well, as it's a mixture of a cmake and a "native" path.

I'm going to left this as-is, as I don't want to come back to Windows to test.

@ivanpauno

Copy link
Copy Markdown
Member Author

Do you want to merge this and we'll do a follow-up for the enclave renaming ?

Yeah, the renaming should be addressed in a separate PR.

@ivanpauno
ivanpauno merged commit ce0a94d into master Apr 9, 2020
@delete-merged-branch
delete-merged-branch Bot deleted the ivanpauno/correct-security-root-directory branch April 9, 2020 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review Waiting for review (Kanban column)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants