[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users


Hey guys,
I was wondering if there was a technical document for SROS2. I'm very much interested in what it offers and want to get to understand its inner workings. I also understand that the project currently is able to create signed certificates. How are the certificates and private keys getting saved? I was planning on using secure keystores to do that. Would something like that be valuable?





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users


Hello @narayave,

The current way the certificates are being constructed is quite basic: via subprocess commands to openssl's CLI. Once you exicute the [`create_keystore`](https://github.com/ros2/sros2/blob/bc8b86a8a8f0f5b2d50ce4aa400ea4d2018b9044/SROS2_Linux.md#generate-a-keystore) command via the SROS CLI, an [api](https://github.com/ros2/sros2/blob/b0d6934f15a71c1cf1f1f61d18d9ed7052ffd11d/sros2/api/__init__.py#L164) is triggered to bootstrap the openssl configuration files, then calls upon openssl command to generate the private keys, and singe the necessary public certificates.

Later, should you decide to invoke access control, the [`create_permission`](https://github.com/ros2/sros2/blob/bc8b86a8a8f0f5b2d50ce4aa400ea4d2018b9044/SROS2_Linux.md#access-control-rti-connext-only-from-source-only) command will again use the keystore to sing governance and permission files consumed by the vendor specific middle ware to enable access control enforcement as defined in the [OMG DDS-SECURITY](http://www.omg.org/spec/DDS-SECURITY/1.0/) spec.

I'm working on refactoring this to use something like a modern python library such as [cryptography](https://cryptography.io/en/latest/) to more pragmatically control the key generation and signing of certificate authorities, like I did for SROS1. Last year I did spend a brief amount of time exploring more rigorous keystore solutions, such as open source projects like Vault:

https://www.hashicorp.com/products/vault/

However, in the end I figured most end users would not enjoy installing and learning a host of other dependencies and frameworks, and would more likely impeded the ease of use and adoption of SROS. So I went with the simple method of optionally ciphering the private keys to disk. Most PKI frameworks support loading ciphered keys via secrets that can be supplied at runtime, as used in SROS1 [here](http://wiki.ros.org/SROS/EnvironmentVariables#SROS_PASSWORD). End users can easily take additional steps from there to guard private keys via additional custom solutions if need be.

What secure keystores methods where you looking at? It would still be nice if we could design SROS2 to interoperate easily with other 3rd party keystores methods.





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


@ruffsl,

In all honesty, I'm still in the process of figuring it out. My idea was creating a package that would help users make use of a TPM to secure the certificates and keys. This work is meant to go towards my Master's research.
Once again, this is just an idea and hasn't fully taken shape yet.





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


@narayave Good point, can you share more details regarding your enabling to TPM ? thank you . :slight_smile:





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


I have another question for the SROS2, you know, the SROS supports AppArmor, why is it dropped from the SROS2 ? is it not necessary to protect from the system level now from your perspective ? thank you !





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


@Roser Thanks for your interest in SROS and SROS2.

[quote="Roser, post:5, topic:2400"]
SROS supports AppArmor, why is it dropped from the SROS2 ?
[/quote]

The development of SROS2 has been focused on the communication security rather than the system security so far. I wouldn't say that system-security is "dropped" but rather "not implemented" yet.
As you may know ROS2 targets a wider variety of platforms (non-Linux or non-posix) and applications than ROS1. Currently SROS2 has been geared towards providing secure communication at the lowest level of the ros client library (rcl) to allow users to leverage it regardless of the programming language, platform or implementation of the communication protocol. Currently we test on Ubuntu, MacOS and Windows, in C++ and Python, and with eProsima's FastRTPS and RTI's Connext.

We haven't yet looked into the best way to interface system security tools to the current SROS2 implementation but we definitely want to do it in the future. Given that it is pretty orthogonal to the encryption of the communication it can be addressed separately. While Apparmor is awesome, it is Linux only and thus will target only one of our supported platforms. Ideally SROS2 will provide a way to define the permissions of your application in a platforms-agnostic manner and be extensible to implement generators that will provide "configuration files" or "profiles" according to the tool or platform you want to use. And the tool on Linux can very well be AppArmor.





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/6) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


As @marguedas well put it, AppArmor support has not necessarily been dropped from SROS2, but rather not yet implemented. My present focus has been integrating ROS2 with DDS Security, and have not yet had time to expand upon the apparmor profile to support ROS2. Another reason is that I haven't yet surveyed ROS2's installation structure yet, as the majority of the apparmor profile library for ROS1 helps users to author profiles of there own by abstracting the ROS1 file directory layout.

However, as mentioned before, apparmor support is somewhat orthogonal to SROS2 interrogation with DDS Security, and so could be developed in parallel. I would certainly invite contributions and pull requests from the rest of the community to add support for ROS2, or help review what [currently exists for ROS1](https://github.com/ros-infrastructure/apparmor_profiles/issues/1).

https://github.com/ros-infrastructure/apparmor_profiles





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/7) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


Hmm... What literature have you found on the subject of Trusted Platform Module and robotics? I do like the idea of having the private credentials used for SROS2 isolated from the host OS, but that may require coding 3'rd party plugin, as the default DDS crypto plugin must load the private key from a path on disk, or serialized PEM string.

Funny you should mention TPM though, as last week or so when I was at the RoboCub 2017 Symposium, I met a PhD student, Sarah Haas from Graz University of Technology, who was presenting work on a similar topic:

Secure Authentication for Industrial Mobile Robots using Biometric Data

https://pdfwww.gakkai-web.net/gakkai/inter/robocup2017symposium/contents/html/papers/pdf/RoboCup_Symposium_2017_paper_4.pdf

You may want to investigate the lab Sarah is from. I recall some of Sara's peers working on using TPM for the Diffie-Hellman key exchange and establish a symmetric session key without revealing the private key to the network host.

![20170731_113144|281x500](/uploads/ros/original/1X/412077763251c582d10b69f5a8092a19b2bd77c8.jpg)





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/8) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


@marguedas @ruffsl thanks for your infomation, let me have an basic gap/work evaluation to implement the AppArmor to SROS2 and I may try to enable that if no conflicts after evaluation :slight_smile:





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/9) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] SROS2 - Securing certs and keys

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


It seems that this solution focus more on external authentication to an IMR(Industrial Mobile Robot), you know, now the ROS nodes can employ the key/certificate produced using SROS2 to authenticate/encrypt/access control for the nodes/topics etc, but do you think it's necessary to provide the security to the key/certificate itself ? now they're placed on the disk without any protection, that means it's easy to be accessed or tampered.
BTW, you know more details regarding the details of SROS2 implementation, so could u please help double confirm/clarify the following questions:
1. Keystore: does it support key exchange between publisher / subscriber, etc? Can keystore be changed?
2. Encryption of data AES-GCM-GMAC: used to have license issue on GCM, has its license model been changed?
3. Tools to create keystore, certificates: are they out-of-band tool that user needs to use this tool to create keystore manually first then pass it to DDS? How does the whole solution work?
4. Is there any access control for SROS2: tools, encryption, etc?

Many thanks
BRs





---
[Visit Topic](https://discourse.ros.org/t/sros2-securing-certs-and-keys/2400/10) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Loading...