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

Secure DDS interoperability | Connection issues with RTI Connext [3539] #250

Closed
ruffsl opened this issue Aug 31, 2018 · 19 comments
Closed

Comments

@ruffsl
Copy link

ruffsl commented Aug 31, 2018

I haven't looked at it too closely yet, but when using the exact same security files, I'm not able to get Fast-RTPS and Connext to talk to each other using the default security plugins provided by each vendor. Thus SROS2 users are limited in not able to use mix with other rwm implementations at runtime.

To isolate this issue from SROS2, I went and modified the eProsima ShapesDemo to use the same files like so: ruffsl/ShapesDemo@176c79c

Example files:
https://github.com/ros2/system_tests/tree/0bd47e8892a450ffb293eac7a89e30499fc35a88/test_security/test/test_security_files/publisher

Across eProsima ShapesDemo instances, it all works fine, but between Fast-RTPS and Connext, neither ever connect to each other's shape topics, even though they connect fine when security is disabled.

@JaimeMartin
Copy link
Member

Hi ruffsl,

We know about these secure connectivity issues. The Security spec has evolved from the very first release, and we need to update slightly our implementation and run a set of interoperability tests to ensure compatibility.

This is planned for this year.

@JaimeMartin
Copy link
Member

Hi @ruffsl ,

As an update, we finished today the update to the latest security spec. and we will run the DDS Security interoperability tests next week.

@ruffsl
Copy link
Author

ruffsl commented Nov 8, 2018

It nice to see that #275 has now landed, however, I was trying out interoperability with a fresh source build, and I still can't get the two RMW implementations to communicate. Are there some new changes that need to be done to rmw_fastrtps done prior?

Here is a dockerized example use can use to test it out interoperability.
https://github.com/ruffsl/ros2_docker_demos/tree/master/sros2

Just swap out the install to instead build from source, using master .repo file instead of release-latest:

https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos

https://github.com/osrf/docker_images/blob/55f03de3a06991c28a897982652dbafcb09d5592/ros2/source/source/Dockerfile#L66

@MiguelCompany
Copy link
Member

Hi @ruffsl

#275 has landed on develop. We are merging into master through #304 and applying some changes to rmw_fastrtps on ros2/rmw_fastrtps#233

We still have some cmake related issues to be solved in order for the new release to work with ROS2. When those are solved we will report back here.

@ruffsl
Copy link
Author

ruffsl commented Nov 12, 2018

@MiguelCompany , thanks for the correction, before I was attempting to use the wrong branches. I've since tested interoperability again using #304 and ros2/rmw_fastrtps#233. All builds fine, but when I use rmw_fastrtps_cpp with rmw_connext_cpp for the ros2 talker and listener examples respectively, or vis vera, I only seem to get this:

$ ros2 run demo_nodes_cpp listener
2018-11-12 14:22:46.650 [SECURITY_CRYPTO Error] Not valid SecureDataTag submessage id -> Function decode_rtps_message
2018-11-12 14:22:46.651 [SECURITY_CRYPTO Error] Not valid SecureDataTag submessage id -> Function decode_rtps_message
2018-11-12 14:22:46.653 [SECURITY_CRYPTO Error] Not valid SecureDataTag submessage id -> Function decode_rtps_message
2018-11-12 14:22:46.654 [SECURITY_CRYPTO Error] Not valid SecureDataTag submessage id -> Function decode_rtps_message
...

Looking with the debugger, I see these error messages are originating from:

https://github.com/eProsima/Fast-RTPS/blob/b07c4b9a8e968657ac1ce198df1f1f900fa477b9/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp#L706-L709

image

@MiguelCompany
Copy link
Member

@ruffsl It seems you are using the only case that the official tests doesn't cover: Full RTPS message protection without encryption (authentication only).

I will address this today but, in the meantime, could you try with other protection kind?

@ruffsl
Copy link
Author

ruffsl commented Nov 13, 2018

@MiguelCompany , I tried changing rtps_protection_kind in the governance file from SIGN to ENCRYPT, but I get the same error messages. Here is the entire governance file for completeness:

<?xml version="1.0" encoding="utf-8"?>
<dds>
  <domain_access_rules>
    <domain_rule>
      <domains>
        <id>0</id>
      </domains>
      <allow_unauthenticated_participants>false</allow_unauthenticated_participants>
      <enable_join_access_control>true</enable_join_access_control>
      <discovery_protection_kind>ENCRYPT</discovery_protection_kind>
      <liveliness_protection_kind>ENCRYPT</liveliness_protection_kind>
      <rtps_protection_kind>ENCRYPT</rtps_protection_kind>
      <topic_access_rules>
        <topic_rule>
          <topic_expression>*</topic_expression>
          <enable_discovery_protection>true</enable_discovery_protection>
          <enable_liveliness_protection>true</enable_liveliness_protection>
          <enable_read_access_control>true</enable_read_access_control>
          <enable_write_access_control>true</enable_write_access_control>
          <metadata_protection_kind>ENCRYPT</metadata_protection_kind>
          <data_protection_kind>ENCRYPT</data_protection_kind>
        </topic_rule>
      </topic_access_rules>
    </domain_rule>
  </domain_access_rules>
</dds>

https://github.com/ruffsl/keymint_ws/blob/cc9306117b12a61989466c2e728304ccd54dc65c/install/talker/governance.p7s#L9-L34

@MiguelCompany
Copy link
Member

@ruffsl PR #321 should fix the issue. I have checked both with SIGN and ENCRYPT rtps protection kinds and I could interoperate with Connext.

@ruffsl
Copy link
Author

ruffsl commented Nov 14, 2018

Now I'm getting a number of errors using only rmw_fastrtps_cpp.
I'll whip up a Dockerfile to reproduce this. rtps_protection_kind as SIGN.

$ ros2 run demo_nodes_cpp listener
2018-11-14 09:51:32.262 [SECURITY Error] Cannot find remote reader 9a.dd.34.40.e7.49.e8.ca.d9.2c.27.d|ff.2.0.c7 -> Function encode_writer_submessage
2018-11-14 09:51:32.262 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer a0.4f.5e.5c.56.16.b2.6f.34.7c.29.1|ff.2.0.c2 -> Function add_heartbeat
2018-11-14 09:51:32.262 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-14 09:51:32.262 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-14 09:51:32.263 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-14 09:51:32.263 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-14 09:51:32.263 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-14 09:51:32.263 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-14 09:51:32.263 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
...
$ ros2 run demo_nodes_cpp talker
2018-11-14 09:57:53.144 [SECURITY Error] Cannot find remote reader a0.4f.5e.5c.56.16.48.96.9.9d.6b.1b|ff.2.0.c7 -> Function encode_writer_submessage
2018-11-14 09:57:53.144 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer 9a.dd.34.40.e7.49.99.67.da.de.64.eb|ff.2.0.c2 -> Function add_heartbeat
2018-11-14 09:57:53.146 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-14 09:57:53.146 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-14 09:57:53.146 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-14 09:57:53.146 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-14 09:57:53.146 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-14 09:57:53.146 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-14 09:57:53.148 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
...

Update we'll I can't reproduce the errors above from a clean docker image, but even a fresh docker image Connext and Fast-RTPS still don't seem interoperable via secure DDS. I modified a branch to build the entire stack from source and launch an interoperable example via docker-compose. See the README for details.

https://github.com/ruffsl/ros2_docker_demos/tree/fastrtps-1.7.0/sros2

@MiguelCompany
Copy link
Member

Hi @ruffsl

We have fixed a few things and release 1.7 is ready to be merged. The errors shown on your last comment have been fixed, and I have checked direct communications with connext.

Please test on your side

@ruffsl
Copy link
Author

ruffsl commented Nov 22, 2018

Latest attempt using the gist from the CI tested here,
using the talker listener examples over combination of vendors and directions,
connext doen't

\/ publish | subscribe > connext fast-rtps
connext fast-rtps listener prints errors when connext listener is on same topic [2]
fast-rtps connext listener prints no messages from fast-rtps talker; fast-rtps listener prints errors when connext listener is on same topic [1]

[1]

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
$ ros2 run demo_nodes_cpp talker
[INFO] [talker]: Publishing: 'Hello World: 1'
[INFO] [talker]: Publishing: 'Hello World: 2'
[INFO] [talker]: Publishing: 'Hello World: 3'
[INFO] [talker]: Publishing: 'Hello World: 4'
[INFO] [talker]: Publishing: 'Hello World: 5'
...
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
$ ros2 run demo_nodes_cpp listener
2018-11-22 15:03:27.403 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.403 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.403 [RTPS_WRITER Error] Error sending change 34 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.404 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.404 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.404 [RTPS_WRITER Error] Error sending change 35 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.404 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.404 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.404 [RTPS_WRITER Error] Error sending change 36 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Error sending change 37 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Error sending change 38 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.405 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.406 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.406 [RTPS_WRITER Error] Error sending change 39 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.406 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.406 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.406 [RTPS_WRITER Error] Error sending change 40 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.476 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.476 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.476 [RTPS_WRITER Error] Error sending change 41 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.482 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.482 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.482 [RTPS_WRITER Error] Error sending change 42 -> Function unsent_change_added_to_history
2018-11-22 15:03:27.492 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:03:27.492 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_data
2018-11-22 15:03:27.492 [RTPS_WRITER Error] Error sending change 43 -> Function unsent_change_added_to_history
2018-11-22 15:03:29.888 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer a0.4f.5e.5c.56.16.d6.b2.ba.74.d7.8c|ff.2.2.c3 -> Function add_heartbeat
...
export RMW_IMPLEMENTATION=rmw_connext_cpp
$ ros2 run demo_nodes_cpp listener
RTI Data Distribution Service Nonprofit License issued to University of California San Diego [email protected] For non-production use only.
Expires on 06-sep-2019 See www.rti.com for more information.
RTI Security Plugins Nonprofit License issued to University of California San Diego [email protected] For non-production use only.
Expires on 06-sep-2019 See www.rti.com for more information.
RTI_Security_Authentication_process_handshake:received unexpected handshake message
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!security function process_handshake returned VALIDATION_FAILED
RTI_Security_CertHelper_verifyCertSignature:EVP_DigestVerifyFinal
RTI_Security_Authentication_process_final_handshake_message:failed to verify challenge signature
RTI_Security_Authentication_process_handshake:failed to process remote final signature
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!failed to verify challenge signature
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
PRESPsService_processEndpointCryptoTokens:!precondition: !((&participant->_parent.guid.prefix)->hostId == (&localGuid->prefix)->hostId && (&participant->_parent.guid.prefix)->appId == (&localGuid->prefix)->appId && (&participant->_parent.guid.prefix)->instanceId == (&localGuid->prefix)->instanceId )
^Csignal_handler(2)

[2]

export RMW_IMPLEMENTATION=rmw_connext_cpp
$ ros2 run demo_nodes_cpp talker
[INFO] [talker]: Publishing: 'Hello World: 1'
[INFO] [talker]: Publishing: 'Hello World: 2'
[INFO] [talker]: Publishing: 'Hello World: 3'
[INFO] [talker]: Publishing: 'Hello World: 4'
[INFO] [talker]: Publishing: 'Hello World: 5'
...
export RMW_IMPLEMENTATION=rmw_connext_cpp
ros2 run demo_nodes_cpp listener
[INFO] [listener]: I heard: [Hello World: 6]
[INFO] [listener]: I heard: [Hello World: 7]
[INFO] [listener]: I heard: [Hello World: 8]
[INFO] [listener]: I heard: [Hello World: 9]
[INFO] [listener]: I heard: [Hello World: 10]
[INFO] [listener]: I heard: [Hello World: 11]
[INFO] [listener]: I heard: [Hello World: 12]
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
$ ros2 run demo_nodes_cpp listener                                                                                                                                                [15/1423]
2018-11-22 15:15:09.977 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer                                              
2018-11-22 15:15:09.978 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data                                                           
2018-11-22 15:15:09.978 [RTPS_WRITER Error] Error sending change 8 -> Function unsent_change_added_to_history                                                                                                      
2018-11-22 15:15:09.979 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer                                              
2018-11-22 15:15:09.979 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data                                                           
2018-11-22 15:15:09.980 [RTPS_WRITER Error] Error sending change 9 -> Function unsent_change_added_to_history                                                                                                      
2018-11-22 15:15:09.980 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer                                              
2018-11-22 15:15:09.980 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data                                                           
2018-11-22 15:15:09.980 [RTPS_WRITER Error] Error sending change 10 -> Function unsent_change_added_to_history                                                                                                     
2018-11-22 15:15:09.981 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer                                              
2018-11-22 15:15:09.981 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data                                                           
2018-11-22 15:15:09.981 [RTPS_WRITER Error] Error sending change 11 -> Function unsent_change_added_to_history                                                                                                     
2018-11-22 15:15:09.981 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer                                              
2018-11-22 15:15:09.982 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data                                                           
2018-11-22 15:15:09.982 [RTPS_WRITER Error] Error sending change 12 -> Function unsent_change_added_to_history                                                                                                     
2018-11-22 15:15:09.983 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:15:09.983 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data
2018-11-22 15:15:09.983 [RTPS_WRITER Error] Error sending change 13 -> Function unsent_change_added_to_history
2018-11-22 15:15:09.983 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:15:09.984 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data
2018-11-22 15:15:09.984 [RTPS_WRITER Error] Error sending change 14 -> Function unsent_change_added_to_history
2018-11-22 15:15:09.985 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-22 15:15:09.985 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-22 15:15:09.985 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-22 15:15:09.985 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-22 15:15:09.985 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-22 15:15:09.986 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-22 15:15:09.986 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-22 15:15:09.986 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-22 15:15:09.986 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-22 15:15:09.986 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-22 15:15:09.986 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-22 15:15:09.986 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-22 15:15:09.986 [SECURITY_CRYPTO Error] Unable to decode the payload. EVP_DecryptFinal function returns an error -> Function deserialize_SecureDataBody
2018-11-22 15:15:09.987 [SECURITY_CRYPTO Error] Error decoding content -> Function decode_datawriter_submessage
2018-11-22 15:15:09.987 [SECURITY Error] Cannot decode writer RTPS submessage () -> Function decode_rtps_submessage
2018-11-22 15:15:10.028 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:15:10.029 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data
2018-11-22 15:15:10.029 [RTPS_WRITER Error] Error sending change 15 -> Function unsent_change_added_to_history
2018-11-22 15:15:12.971 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_heartbeat
2018-11-22 15:15:12.989 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:15:12.989 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data
2018-11-22 15:15:12.989 [RTPS_WRITER Error] Error sending change 16 -> Function unsent_change_added_to_history
2018-11-22 15:15:12.998 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_info_ts_in_buffer
2018-11-22 15:15:12.998 [RTPS_WRITER Error] Cannot encrypt DATA submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_data
2018-11-22 15:15:12.998 [RTPS_WRITER Error] Error sending change 17 -> Function unsent_change_added_to_history
2018-11-22 15:15:15.971 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_heartbeat
2018-11-22 15:15:18.971 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_heartbeat
2018-11-22 15:15:21.971 [RTPS_WRITER Error] Cannot encrypt HEARTBEAT submessage for writer a0.4f.5e.5c.56.16.cb.9b.ee.8d.d4.9b|ff.2.2.c3 -> Function add_heartbeat
[INFO] [listener]: I heard: [Hello World: 298]

@MiguelCompany
Copy link
Member

Hi @ruffsl

We have just merged #341 that should solve this issue. We are now adding a regression test on #342.

Please test on your side.

@ruffsl
Copy link
Author

ruffsl commented Nov 30, 2018

@MiguelCompany , using the latest pull from the PR above, I'm still experiencing the same issues: mainly FastRTPS can publish and subscribe to FastRTPS and Connext, but Connext can still not subscribe to FastRTPS one-on-one. No error or warnings, just silence from Connext subscribes printing to stdout.

However, upon starting a FastRTPS subscriber to join an existing Connext publisher and subscriber, Connext will output the following to stdout:

$ export RMW_IMPLEMENTATION=rmw_connext_cpp
$ ./install/demo_nodes_cpp/lib/demo_nodes_cpp/talker
...
[INFO] [talker]: Publishing: 'Hello World: 46'
RTI_Security_Authentication_process_handshake:received unexpected handshake message
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!security function process_handshake returned VALIDATION_FAILED
[INFO] [talker]: Publishing: 'Hello World: 47'
$ export RMW_IMPLEMENTATION=rmw_connext_cpp
$ ./install/demo_nodes_cpp/lib/demo_nodes_cpp/listener
...
[INFO] [listener]: I heard: [Hello World: 47]
RTI_Security_CertHelper_verifyCertSignature:EVP_DigestVerifyFinal
RTI_Security_Authentication_process_final_handshake_message:failed to verify challenge signature
RTI_Security_Authentication_process_handshake:failed to process remote reply signature
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!failed to verify challenge signature
[INFO] [listener]: I heard: [Hello World: 48]
$ export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
$ ./install/demo_nodes_cpp/lib/demo_nodes_cpp/listener
[INFO] [listener]: I heard: [Hello World: 46]
[INFO] [listener]: I heard: [Hello World: 47]
[INFO] [listener]: I heard: [Hello World: 48]

governance.xml used:

<?xml version="1.0" encoding="UTF-8"?>
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.omg.org/spec/DDS-SECURITY/20170901/omg_shared_ca_governance.xsd">
    <domain_access_rules>
        <domain_rule>
            <domains>
              <id>0</id>
            </domains>
            <allow_unauthenticated_participants>false</allow_unauthenticated_participants>
            <enable_join_access_control>true</enable_join_access_control>
            <discovery_protection_kind>ENCRYPT</discovery_protection_kind>
            <liveliness_protection_kind>ENCRYPT</liveliness_protection_kind>
            <rtps_protection_kind>SIGN</rtps_protection_kind>
            <topic_access_rules>
                <topic_rule>
                    <topic_expression>*</topic_expression>
                    <enable_discovery_protection>true</enable_discovery_protection>
                    <enable_liveliness_protection>true</enable_liveliness_protection>
                    <enable_read_access_control>true</enable_read_access_control>
                    <enable_write_access_control>true</enable_write_access_control>
                    <metadata_protection_kind>ENCRYPT</metadata_protection_kind>
                    <data_protection_kind>ENCRYPT</data_protection_kind>
                </topic_rule>
            </topic_access_rules>
        </domain_rule>
    </domain_access_rules>
</dds>

@MiguelCompany
Copy link
Member

@ruffsl Could you please also share the permissions files being used?

@ruffsl
Copy link
Author

ruffsl commented Dec 3, 2018

See example keystore here: https://github.com/ruffsl/keymint_ws/tree/master/install

@richiware richiware changed the title Secure DDS interoperability | Connection issues with RTI Connext Secure DDS interoperability | Connection issues with RTI Connext [3539] Dec 5, 2018
@MiguelCompany
Copy link
Member

Hi @ruffsl

We have made some important fixes related to endpoint discovery that may have been the root cause of your problem. We plan to merge release 1.7.1 (#393) this week. Could you check if this issue is solved when using that branch of Fast-RTPS?

Thank you!

@ruffsl
Copy link
Author

ruffsl commented Mar 7, 2019

I've repeated the previous test with the latest ros2 master branches, as of writing. When a FastRTP listener connects to a Connext talker, Connext prints out some warnings during the handshake although the subscription overall is successful:

RTI_Security_CertHelper_verifyCertSignature:EVP_DigestVerifyFinal
RTI_Security_Authentication_process_final_handshake_message:failed to verify challenge signature
RTI_Security_Authentication_process_handshake:failed to process remote reply signature
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!failed to verify challenge signature

However, when a FastRTP talker joins in with a Connext talker and listener, both the Connext talker and listener print errors that the security handshake has failed, and the Connext listener does not subscribe to the FastRTP talker at all. The Error message sequent from the Connext talker:

RTI_Security_CertHelper_verifyCertSignature:EVP_DigestVerifyFinal
RTI_Security_Authentication_process_final_handshake_message:failed to verify challenge signature
RTI_Security_Authentication_process_handshake:failed to process remote final signature
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!failed to verify challenge signature
RTI_Security_Authentication_process_handshake:received unexpected handshake message
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!security function process_handshake returned VALIDATION_FAILED
...
RTI_Security_Authentication_process_handshake:received unexpected handshake message
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!security function process_handshake returned VALIDATION_FAILED

And the error message sequent from the Connext listener:

RTI_Security_Authentication_process_handshake:received unexpected handshake message
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!security function process_handshake returned VALIDATION_FAILED
RTI_Security_CertHelper_verifyCertSignature:EVP_DigestVerifyFinal
RTI_Security_Authentication_process_final_handshake_message:failed to verify challenge signature
RTI_Security_Authentication_process_handshake:failed to process remote final signature
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!failed to verify challenge signature
...
RTI_Security_Authentication_process_handshake:received unexpected handshake message
DDS_DomainParticipantTrustPlugins_forwardProcessHandshake:!security function process_handshake returned VALIDATION_FAILED

@Yingliangzhe
Copy link

Yingliangzhe commented May 3, 2021

How is the status of this issue?
On my PC I have tried with the commands below:
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run mini_pub_sub mini_publisher in one Terminal
and RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run mini_pub_sub mini_subscriber in another, then I have

COMMENDBeWriterService_assertRemoteReader:Discovered remote reader with GUID 0X10FF93B,0X1B310300,0X1000000,0X200C7 using a non-addressable locator.
This can occur if the transport is not installed and/or enabled in the local participant.
See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info.
can't reach: locator: 16://55F9:3B00:0000:0000:0000:0000:0000:0000:7412
COMMENDSrWriterService_assertRemoteReader:Discovered remote reader with GUID 0X10FF93B,0X1B310300,0X1000000,0X4C7 using a non-addressable locator.
This can occur if the transport is not installed and/or enabled in the local participant.
See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info.
can't reach: locator: 16://55F9:3B00:0000:0000:0000:0000:0000:0000:7412
COMMENDSrWriterService_assertRemoteReader:Discovered remote reader with GUID 0X10FF93B,0X1B310300,0X1000000,0X3C7 using a non-addressable locator.
This can occur if the transport is not installed and/or enabled in the local participant.
See https://community.rti.com/kb/what-does-cant-reach-locator-error-message-mean for additional info.
can't reach: locator: 16://55F9:3B00:0000:0000:0000:0000:0000:0000:7412
[INFO] [1620053087.242722750] [mini_pub]: Publishing: [interfaces.msg.MatrixRow(matrix_row=array([ 23.3, 45.5, 101. , 5. ], dtype=float32)), interfaces.msg.MatrixRow(matrix_row=array([ 23.3, 45.5, 101. , 5. ], dtype=float32))]

I can still send and receive the message.

vice versa. like
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run mini_pub_sub mini_publisher and
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run mini_pub_sub mini_subscriber

@MiguelCompany Does that mean, that you have already solved this interoperability issue with connext?

@MiguelCompany
Copy link
Member

@Yingliangzhe Thanks for testing. I do think this should have been solved. But I would like @ruffsl to confirm and to close this issue if he thinks everything is ok now.

@EduPonz EduPonz closed this as completed Aug 12, 2021
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

No branches or pull requests

5 participants