-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Option of using OpenSSL for authentication between RTI and federates #1432
Conversation
# Conflicts: # org.lflang/src/lib/c/reactor-c # org.lflang/src/org/lflang/TargetProperty.java
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.
.
@@ -43,6 +43,8 @@ jobs: | |||
- name: Install dependencies OS X | |||
run: | | |||
brew install coreutils | |||
brew install openssl | |||
brew link openssl --force |
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.
Only adding export OPENSSL_ROOT_DIR="/usr/local/opt/openssl" does not work, because it seems that every run opens a new bash.
@lhstrh @edwardalee Would you please check out this PR when available? Thanks! |
Thanks for the reminder, @Jakio815, will put in a review soon. |
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.
This looks good to me. To accompany this merge, let's update the documentation here:
https://www.lf-lang.org/docs/handbook/target-declaration
Perhaps a new page in the Reference section of the handbook would be a good idea, rather than putting everything in the above file? Then point to that page from the above?
The description in this PR would be an excellent starting point for that page.
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.
This looks good to me!
NOTE: Please note that there's an issue with CI tests, mentioned at the bottom of this description.
Overview
This PR is the first step to add security to LF, by including OpenSSL in the C target.
This PR is related to the PR lf-lang/reactor-c#105 and resolves #1146. Both PRs should be merged to work.
The main idea is in #1146, and this PR is an implementation of
Approach
This option includes OpenSSL libraries, and use HMAC authentications between the RTI and the federates. It creates a random nonce and creates a HMAC tag, and they process a 3 way handshake starting from the RTI. The details of the 3-way handshake is in lf-lang/reactor-c#105. The option is currently implemented as a boolean option.
The main protocol is like the following.
1. RTI_HELLO (RTI -> Federate)
2. FED_RESPONSE (Federate -> RTI)
3. RTI_RESPONSE (RTI -> Federate)
For test, build the RTI.
There is a simple test .lf file.
RTI does not include OpenSSL libraries when -DAUTH=ON is not commanded. It is set OFF on default.
runlfc
command also does not include OpenSSL libraries iftarget C { auth: true }
is not coded.For clarification between lf-lang/reactor-c#105 and this PR, this PR is about,
auth
options.test/C/src/federated/SimpleFederatedAuth.lf
PR lf-lang/reactor-c#105 will be the details of the 3-way handshake.
CI Tests
cpp-ros2 tests and serialization tests are not passing. I sent an issue #1483.