Skip to content

Commit 66b7c32

Browse files
Merge remote-tracking branch 'origin/develop'
2 parents 07a631c + 0ac2239 commit 66b7c32

File tree

151 files changed

+2337
-19715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+2337
-19715
lines changed

examples/connext_dds/asynchronous_publication/py/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
If you haven't used the RTI Connext Python API before, first check the
44
[Getting Started Guide](https://community.rti.com/static/documentation/connext-dds/7.0.0/doc/manuals/connext_dds_professional/getting_started_guide/index.html).
55

6+
Note that in this example the DDS ``PublishMode`` QoS that allows asynchronous
7+
publication (see the top-level [README](../README.md)) is unrelated to the
8+
DataReader method ``take_data_async``, which is a feature specific to the Python
9+
API that allows the application to receive data in an asynchronous manner.
10+
611
## Running the Example
712

813
In two separate command prompt windows for the publisher and subscriber run the
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Example Code: Basic Security
2+
3+
## Concept
4+
5+
RTI Security Plugins allow you to address your security requirements in a
6+
granular way. This example assumes that you have a familiarity with RTI Connext.
7+
8+
The main aspects of security that are covered are
9+
10+
- Authentication - Verifying the identity of the application and/or user that
11+
invokes actions on DDS.
12+
- Access Control - Provides a way to enforce policy decision on what DDS-related
13+
operations an authenticated entity can perform (i.e. which Domains it can join,
14+
which topics it can publish and subscribe to, etc)
15+
- Cryptography - Implements (or interfaces with libraries that implement)
16+
cryptographic operations such as encryption, decryption, hashing, digital
17+
signatures, etc
18+
- Logging - Auditing of all DDS security-related events.
19+
20+
Additionally, The Security Plugins can potentially run over any transport,
21+
including the builtin UDP transport with multicast and TCP transport.
22+
The OMG DDS Security specification addresses the security aspect of the
23+
communication in a one-to-many, friendly, data-centric way, enabling
24+
applications to define different security policies based on the nature of the
25+
shared data. This gives the benefits of no single point of failure, high
26+
performance, and high scalability.
27+
28+
In a DDS Secure system, a Governance Document defines the security requirements
29+
for communication. At the domain level, this file contains a mapping between
30+
Domain IDs and the security policies that DomainParticipants must follow to
31+
interact in that Domain.
32+
33+
As you can see, the rules that compose the Governance Document specify how your
34+
system is protected. All the DomainParticipants in your secure system need to
35+
load the same Governance Document, either by having a copy of it, or by
36+
accessing a single Governance Document from a common location.
37+
38+
In addition to meeting the security requirements specified in the Governance
39+
Document, every DomainParticipant joining a Secure Domain must be associated
40+
with a Permissions Document. This Permissions Document contains a set of grants,
41+
which determine what the local participant is allowed to do in the Domain.
42+
43+
For more information about using RTI Connext with security, follow the
44+
[Getting Started Guide](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/getting_started_guide/index.html)
45+
46+
## Example Description
47+
48+
This example is available in other programming languages in the
49+
`rti_workspace/<version>/examples/connext_dds/<language>/hello_security`
50+
folder created under your home directory when RTI Connext is installed.
51+
52+
In this example, the publisher application sends a message of "Hello World" with
53+
a number to indicate which sample it is. This number increments by one and by
54+
default will go until the user stops the programs. By default, the messages are
55+
sent using ecdsa but can be set to rsa or ecdsa secp384r1 by providing an
56+
argument at run time.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Example Code: Basic Security
2+
3+
## Running this Example
4+
5+
### Initial Setup
6+
7+
In order to run this example you require some security artifacts (certificates,
8+
signed Governance and Permissions Document). The easiest way to acquire them is
9+
to copy them from the rti_workspace examples. They can be found in
10+
`<rti_workspace>/<version>/examples/dds_security`. If this folder is copied in
11+
whole to `examples/connext_dds/basic_security` the example will work with no
12+
modifications to the SecureQos.xml file. Otherwise, the strings in
13+
SecureQos.xml must be updated to reflect the locations of these artifacts.
14+
15+
### Linux and macOS systems
16+
17+
Your LD_LIBRARY_PATH or (DYLD_LIBRARY_PATH for macOS) must include
18+
`$NDDSHOME/lib/<architecture>`.
19+
You must also include the path to your crypto libraries. They are in
20+
`$NDDSHOME/third_party/openssl-<version>/<architecture>/<release or debug>/lib`
21+
(location of libcrypto.so and libssl.so).
22+
If you are using the Security Plugins for wolfSSL, your LD_LIBRARY_PATH must
23+
include
24+
`$NDDSHOME/third_party/wolfssl-<version>/<architecture>/<release or debug>/lib`
25+
(location of libwolfssl.so).
26+
27+
If using Certicom Security Builder Engine for QNX, your LD_LIBRARY_PATH must
28+
include
29+
`$NDDSHOME/third_party/openssl-<version>/<architecture>/release/lib/:$CERTICOM_SBENGINEHOME/tools/sb/sb-$CERTICOMOS/lib/:$CERTICOM_SBENGINEHOME/lib/$CERTICOMOS.`
30+
31+
To run this example, type the following commands in two different command
32+
shells (one command in each shell), either on the same machine or on different
33+
machines:
34+
35+
> python3 secure_publisher.py
36+
> python3 secure_subscriber.py
37+
38+
### Windows systems
39+
40+
Your PATH must include
41+
`%NDDSHOME%\lib\<architecture>` and
42+
`%NDDSHOME%\third_party\openssl-<version>\<architecture>\<release or debug>\bin`
43+
(location of the libcrypto and libssl DLLs).
44+
45+
To run this example, type the following commands in two different command
46+
shells (one command in each shell), either on the same machine or on different
47+
machines:
48+
49+
> python3 secure_publisher.py
50+
> python3 secure_subscriber.py
51+
52+
### Accepted parameters
53+
54+
The following parameters are accepted:
55+
56+
- `-d` for the domain id
57+
- `-c` for the number of samples to send
58+
- `-p` for the profile (A, B, RSA_A, RSA_B, ECDSA_P384_A, or ECDSA_P384_B)
59+
60+
To run this example
61+
using the "rsa"(**) algorithm suite, add a `-p` command-line argument: "rsa".
62+
Pass "p384" (***) for the `-p` command-line argument if you want to use the
63+
"ecdsa secp384r1" algorithm suite.
64+
65+
- The "ecdsa" algorithm suite consists of ECDSA+P256+SHA256 (digital signature
66+
for identity trust chain and authentication) and ECDHE-CEUM+P256
67+
(key establishment).
68+
- The "rsa" algorithm suite consists of RSASSA-PKCS1-V1_5+2048+SHA256 (digital
69+
signature for identity trust chain), RSASSA-PSS-MGF1SHA256+2048+SHA256
70+
(digital signature for authentication) and ECDHE-CEUM+P256 (key establishment).
71+
- The "ecdsa secp384r1" algorithm suite consists of ECDSA+P384+SHA384 (digital
72+
signature for identity trust chain and authentication), and ECDHE-CEUM+P384
73+
(key establishment).
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
(c) 2023 Copyright, Real-Time Innovations, Inc. All rights reserved.
4+
RTI grants Licensee a license to use, modify, compile, and create derivative
5+
works of the Software. Licensee has the right to distribute object form only
6+
for use with RTI products. The Software is provided "as is", with no warranty
7+
of any type, including any warranty for fitness for any purpose. RTI is under
8+
no obligation to maintain or support the Software. RTI shall not be liable for
9+
any incidental or consequential damages arising out of the use or inability to
10+
use the software.
11+
-->
12+
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/7.2.0/rti_dds_qos_profiles.xsd">
13+
14+
<qos_library name="SecurityExampleProfiles">
15+
16+
<!-- Default QoS:
17+
18+
This profile contains the QoS that applications would use by
19+
default. We can use it as a base profile to inherit from and
20+
override some parameters.
21+
-->
22+
<qos_profile name="A" base_name="BuiltinQosLib::Generic.Security" is_default_qos="true">
23+
<domain_participant_qos>
24+
<property>
25+
<value>
26+
<element>
27+
<name>dds.sec.auth.identity_ca</name>
28+
<value>file:../dds_security/cert/ecdsa01/ca/ecdsa01RootCaCert.pem</value>
29+
</element>
30+
<element>
31+
<name>dds.sec.auth.identity_certificate</name>
32+
<value>file:../dds_security/cert/ecdsa01/identities/ecdsa01Peer01Cert.pem</value>
33+
</element>
34+
<element>
35+
<name>dds.sec.auth.private_key</name>
36+
<value>file:../dds_security/cert/ecdsa01/identities/ecdsa01Peer01Key.pem</value>
37+
</element>
38+
<element>
39+
<name>dds.sec.access.permissions_ca</name>
40+
<value>file:../dds_security/cert/ecdsa01/ca/ecdsa01RootCaCert.pem</value>
41+
</element>
42+
<element>
43+
<name>dds.sec.access.governance</name>
44+
<value>file:../dds_security/xml/signed/signed_Governance.p7s</value>
45+
</element>
46+
<element>
47+
<name>dds.sec.access.permissions</name>
48+
<value>file:../dds_security/xml/signed/signed_PermissionsA.p7s</value>
49+
</element>
50+
</value>
51+
</property>
52+
</domain_participant_qos>
53+
</qos_profile>
54+
<qos_profile name="B" base_name="A">
55+
<domain_participant_qos>
56+
<property>
57+
<value>
58+
<element>
59+
<name>dds.sec.auth.identity_certificate</name>
60+
<value>file:../dds_security/cert/ecdsa01/identities/ecdsa01Peer02Cert.pem</value>
61+
</element>
62+
<element>
63+
<name>dds.sec.auth.private_key</name>
64+
<value>file:../dds_security/cert/ecdsa01/identities/ecdsa01Peer02Key.pem</value>
65+
</element>
66+
<element>
67+
<name>dds.sec.auth.password</name>
68+
<value>VG9tQjEy</value>
69+
</element>
70+
<element>
71+
<name>dds.sec.access.permissions</name>
72+
<value>file:../dds_security/xml/signed/signed_PermissionsB.p7s</value>
73+
</element>
74+
</value>
75+
</property>
76+
</domain_participant_qos>
77+
</qos_profile>
78+
<qos_profile name="RSA_A" base_name="A">
79+
<domain_participant_qos>
80+
<property>
81+
<value>
82+
<element>
83+
<name>dds.sec.auth.identity_ca</name>
84+
<value>file:../dds_security/cert/rsa01/ca/rsa01RootCaCert.pem</value>
85+
</element>
86+
<element>
87+
<name>dds.sec.auth.identity_certificate</name>
88+
<value>file:../dds_security/cert/rsa01/identities/rsa01Peer01Cert.pem</value>
89+
</element>
90+
<element>
91+
<name>dds.sec.auth.private_key</name>
92+
<value>file:../dds_security/cert/rsa01/identities/rsa01Peer01Key.pem</value>
93+
</element>
94+
</value>
95+
</property>
96+
</domain_participant_qos>
97+
</qos_profile>
98+
<qos_profile name="RSA_B" base_name="RSA_A">
99+
<domain_participant_qos>
100+
<property>
101+
<value>
102+
<element>
103+
<name>dds.sec.auth.identity_certificate</name>
104+
<value>file:../dds_security/cert/rsa01/identities/rsa01Peer02Cert.pem</value>
105+
</element>
106+
<element>
107+
<name>dds.sec.auth.private_key</name>
108+
<value>file:../dds_security/cert/rsa01/identities/rsa01Peer02Key.pem</value>
109+
</element>
110+
<element>
111+
<name>dds.sec.auth.password</name>
112+
<value>Um9iRzg3</value>
113+
</element>
114+
<element>
115+
<name>dds.sec.access.permissions</name>
116+
<value>file:../dds_security/xml/signed/signed_PermissionsB.p7s</value>
117+
</element>
118+
</value>
119+
</property>
120+
</domain_participant_qos>
121+
</qos_profile>
122+
<qos_profile name="ECDSA_P384_A" base_name="A">
123+
<domain_participant_qos>
124+
<property>
125+
<value>
126+
<element>
127+
<name>dds.sec.auth.identity_ca</name>
128+
<value>file:../dds_security/cert/ecdsa07_p384/ca/ecdsa07RootCaCert.pem</value>
129+
</element>
130+
<element>
131+
<name>dds.sec.auth.identity_certificate</name>
132+
<value>file:../dds_security/cert/ecdsa07_p384/identities/ecdsa07Peer02Cert.pem</value>
133+
</element>
134+
<element>
135+
<name>dds.sec.auth.private_key</name>
136+
<value>file:../dds_security/cert/ecdsa07_p384/identities/ecdsa07Peer02Key.pem</value>
137+
</element>
138+
</value>
139+
</property>
140+
</domain_participant_qos>
141+
</qos_profile>
142+
<qos_profile name="ECDSA_P384_B" base_name="ECDSA_P384_A">
143+
<domain_participant_qos>
144+
<property>
145+
<value>
146+
<element>
147+
<name>dds.sec.auth.identity_certificate</name>
148+
<value>file:../dds_security/cert/ecdsa07_p384/identities/ecdsa07Peer03Cert.pem</value>
149+
</element>
150+
<element>
151+
<name>dds.sec.auth.private_key</name>
152+
<value>file:../dds_security/cert/ecdsa07_p384/identities/ecdsa07Peer03Key.pem</value>
153+
</element>
154+
<element>
155+
<name>dds.sec.access.permissions</name>
156+
<value>file:../dds_security/xml/signed/signed_PermissionsB.p7s</value>
157+
</element>
158+
</value>
159+
</property>
160+
</domain_participant_qos>
161+
</qos_profile>
162+
</qos_library>
163+
</dds>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct HelloWorld {
2+
string<128> msg;
3+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# (c) 2023 Copyright, Real-Time Innovations, Inc. All rights reserved.
3+
#
4+
# RTI grants Licensee a license to use, modify, compile, and create derivative
5+
# works of the Software solely for use with RTI products. The Software is
6+
# provided "as is", with no warranty of any type, including any warranty for
7+
# fitness for any purpose. RTI is under no obligation to maintain or support
8+
# the Software. RTI shall not be liable for any incidental or consequential
9+
# damages arising out of the use or inability to use the software.
10+
#
11+
12+
from dataclasses import field
13+
from typing import Union, Sequence, Optional
14+
import rti.idl as idl
15+
from enum import IntEnum
16+
import sys
17+
import os
18+
19+
20+
@idl.struct(
21+
member_annotations={
22+
"msg": [idl.bound(128)],
23+
}
24+
)
25+
class HelloWorld:
26+
msg: str = ""

0 commit comments

Comments
 (0)