Skip to content

Commit fcd82fc

Browse files
committed
Updated security configuration to match best practices.
1 parent f25c713 commit fcd82fc

12 files changed

Lines changed: 129 additions & 42 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,13 @@ DDS Security defines authentication, access control, and encryption capabilities
321321

322322
DDS Security is meant to be a pluggable component to the system architecture. This reference architecture demonstrates the flexibility of the RTI Security Plugins, and how a system can be secured purely through configuration. It should be noted that enabling security does have an effect on performance - both at initialization due to authentication and in steady-state operation due to encryption. It is because of this, that a system's architecture should be designed with security in mind, even if application code has no dependency on the use of security.
323323

324-
The reference architecture configures security in [SecureAppsQos.xml](./system_arch/qos/SecureAppsQos.xml) with:
324+
The reference architecture configures security in [SecureAppsQos.xml](./system_arch/qos/SecureAppsQos.xml) following the [Builtin Security Plugins domain-level protection](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/users_manual/p3_advanced/threat_modeling.html#dds-security-threat-protection) pattern with topic-level protection for sensitive topics:
325325

326326
| Component | Security Features
327327
| ---------------------- | -----------------
328-
| **LAN Communications** | `OperationalDomain` governance, participant-specific certificates and permissions
329-
| **WAN Communications** | `TeleopWanDomain` governance for WAN connections (Module 03), including PSK-protected RTPS
328+
| **LAN Communications** | `OperationalDomain` governance with `ENCRYPT_WITH_ORIGIN_AUTHENTICATION` RTPS protection, PSK encryption (`OperationalDomain.psk`), participant-specific certificates and permissions
329+
| **WAN Communications** | `TeleopWanDomain` governance with `ENCRYPT_WITH_ORIGIN_AUTHENTICATION` RTPS protection, PSK encryption (`TeleopWanDomain.psk`) for WAN connections (Module 03)
330+
| **Topic-level protection** | `t/Vitals` and `t/MotorControl` topics use `metadata_protection_kind=ENCRYPT` for insider confidentiality protection
330331
| **RTI Services** | Dedicated security profiles for Recording/Replay Services and Routing Services
331332

332333
For independent, security-specific observer integrations (not part of the demo applications), use [SecureExternalAppsQos.xml](./system_arch/qos/SecureExternalAppsQos.xml). It provides the `SecureExternalAppsQosLib::SecureSystemObserver` QoS snippet, which is intended to be composed into external DomainParticipants.
@@ -352,12 +353,12 @@ Check out the the [system_arch](./system_arch/) folder, where the system archite
352353
- [RTI XML-Based Application Creation](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/xml_application_creation/xml_based_app_creation_guide/XMLAppCreationGSG_title.htm#)
353354
- [RTI System Designer](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/tools/system_designer/index.html)
354355
- [RTI Core Libraries Users Manual](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/users_manual/users_manual/title.htm#)
355-
- [RTI Security Plugins](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_secure/users_manual/index.html)
356+
- [RTI Security Plugins](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/users_manual/index.html)
356357
- [RTI Connext Modern C++ API](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/api/connext_dds/api_cpp2/index.html) *, used in Module 01: Digital Operating Room*
357358
- [RTI Connext Python API](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/api/connext_dds/api_python/index.html) *, used in Module 01: Digital Operating Room*
358359
- [RTI Recording Service & Replay Service](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/services/recording_service/introduction.html) *, used in Module 02: RTI Recording Service & RTI Replay Service*
359360
- [Connext Real-Time WAN Transport](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/users_manual/users_manual/PartRealtimeWAN.htm) *, used in Module 03: Remote Teleoperation with RTI Real-Time WAN Transport*
360361
- [RTI Routing Service](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/services/routing_service/index.html) *, used in Module 03: Remote Teleoperation with RTI Real-Time WAN Transport*
361362
- [RTI Cloud Discovery Service](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/addon_products/cloud_discovery_service/index.html) *, used in Module 03: Remote Teleoperation with RTI Real-Time WAN Transport*
362-
- [RTI Security Plugins Users Manual](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_secure/users_manual/index.html) *, used in Module 04: Security Threat Demonstration*
363+
- [RTI Security Plugins Users Manual](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/users_manual/index.html) *, used in Module 04: Security Threat Demonstration*
363364
- [RTI Connext Third-Party Software](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_professional/release_notes_3rdparty/index.html)

modules/03-remote-teleoperation/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Together, the RTI Real-Time WAN Transport, RTI Security Plugins, and RTI Cloud D
3737

3838
- **Low-latency communication** across WAN connections
3939
- **Automatic NAT traversal** capabilities
40-
- **Secure data transmission** with built-in authentication, encryption and access control
40+
- **Secure data transmission** with domain-level protection (`ENCRYPT_WITH_ORIGIN_AUTHENTICATION` + PSK encryption) and topic-level encryption for sensitive topics (`t/Vitals`, `t/MotorControl`)
4141
- **Bandwidth optimization** for efficient data transfer (when compared to TCP-based communication)
4242
- **Connection resilience** with automatic reconnection
4343

modules/04-security-threat/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,21 @@ Watch the threat app's Activity Log: when the secured OR comes up, the injector'
160160

161161
### 2. Understanding Why Each Attack Is Blocked
162162

163-
Each attack mode corresponds to a different stage of the DDS Security handshake:
163+
Each attack mode corresponds to a different stage of the DDS Security handshake. Even if an attacker passes one layer, subsequent layers still block the attack:
164164

165165
| Mode | What happens | Why |
166166
| --- | --- | --- |
167167
| **Rogue CA** | Participant is created but never matches | The identity certificate is signed by an untrusted CA root. The OR participants do not list the rogue CA in their `identity_ca` trust store, so the authentication handshake fails. |
168168
| **Forged Permissions** | Participant is created but never matches | Authentication succeeds (identity signed by trusted CA), but the permissions document is signed by the rogue CA. Since the OR's `permissions_ca` is the trusted CA, the signature mismatch causes access control validation to fail. |
169169
| **Expired Certificate** | Participant creation fails immediately | The identity certificate was signed by the trusted CA but its `notAfter` field is in the past. The DDS Security authentication plugin validates certificate expiration during identity validation — for the local participant, this occurs during DomainParticipant creation, causing it to fail immediately. The status badge shows **ATTACK FAILED** (red). |
170170

171-
For a deeper dive into the DDS Security handshake, refer to the [RTI Security Plugins User's Manual](https://community.rti.com/static/documentation/connext-dds/7.7.0/doc/manuals/connext_dds_secure/users_manual/index.htm).
171+
Beyond authentication and permissions, the system also enforces **cryptographic protection at multiple levels**:
172+
173+
- **Domain-level protection from outsiders:** `rtps_psk_protection_kind=ENCRYPT` protects pre-authentication traffic, preventing passive eavesdropping before the handshake completes.
174+
- **Domain-level protection from insiders:** `rtps_protection_kind=ENCRYPT_WITH_ORIGIN_AUTHENTICATION` ensures all RTPS traffic is encrypted with per-writer keys and origin-authenticated — even an authenticated insider cannot forge another participant's messages.
175+
- **Topic-level protetion from insiders:** `t/Vitals` and `t/MotorControl` use `metadata_protection_kind=ENCRYPT`, meaning their submessage metadata is encrypted with keys shared only among authorized endpoints — a compromised participant without topic-level permissions cannot decrypt these topics.
176+
177+
For a deeper dive into the DDS Security handshake, refer to the [RTI Security Plugins User's Manual](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/users_manual/p2_core/authentication.html#handshake).
172178

173179
---
174180

system_arch/qos/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ Both files contain only 1 QoS library: ***DpQosLib***. This QoS library contains
180180

181181
[SecureAppsQos.xml](./SecureAppsQos.xml) defines secure profiles for the demo DomainParticipants and services in a similar way to **NonSecureAppsQos.xml**, but with security configuration added.
182182

183-
[SecureAppsQos.xml](./SecureAppsQos.xml) defines a QoS snippet - *LanCommonSecurityConfig* defines common configuration to enable security for local domains (LAN connections). It references common permissions CA, identity CA, and governance files.
183+
[SecureAppsQos.xml](./SecureAppsQos.xml) defines a QoS snippet - *LanCommonSecurityConfig* defines common configuration to enable security for local domains (LAN connections). It references common permissions CA, identity CA, governance files, and the OperationalDomain PSK seed file. The governance uses `rtps_protection_kind=ENCRYPT_WITH_ORIGIN_AUTHENTICATION` with `rtps_psk_protection_kind=ENCRYPT` for domain-level protection, plus topic-level protection (`metadata_protection_kind=ENCRYPT`) on `t/Vitals` and `t/MotorControl`.
184184

185-
[SecureAppsQos.xml](./SecureAppsQos.xml) defines a QoS snippet - *WanCommonSecurityConfig* defines common configuration to enable security for remote domains (WAN connections). It references common permissions CA, identity CA, and governance files.
185+
[SecureAppsQos.xml](./SecureAppsQos.xml) defines a QoS snippet - *WanCommonSecurityConfig* defines common configuration to enable security for remote domains (WAN connections). It references common permissions CA, identity CA, governance files, and the TeleopWanDomain PSK seed file. The same domain-level protection applies (`rtps_protection_kind=ENCRYPT_WITH_ORIGIN_AUTHENTICATION`, `rtps_psk_protection_kind=ENCRYPT`), but the WAN governance applies *stricter* topic-level protection: a catch-all `*` rule with `metadata_protection_kind=ENCRYPT` protects the submessage metadata of **every** topic, rather than only `t/Vitals` and `t/MotorControl`. The secure log topic `DDS:Security:LogTopicV2` keeps its own `SIGN`/`ENCRYPT`.
186186

187187
## External security snippets: [SecureExternalAppsQos.xml](SecureExternalAppsQos.xml)
188188

system_arch/qos/SecureAppsQos.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ inability to use the software. -->
8787
<name>dds.sec.access.governance</name>
8888
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/domain_scope/OperationalDomain/governance/OperationalDomain/signed/TrustedPermissionsCa/OperationalDomain.p7s</value>
8989
</element>
90+
<element>
91+
<name>dds.sec.crypto.rtps_psk_secret_passphrase</name>
92+
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/domain_scope/OperationalDomain/OperationalDomain.psk</value>
93+
</element>
9094
</value>
9195
</property>
9296
</domain_participant_qos>

system_arch/qos/SecureExternalAppsQos.xml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,12 @@ inability to use the software. -->
4343
</base_name>
4444
<property>
4545
<value>
46-
<!-- Permissions CA: validates S/MIME signatures on governance and permissions XMLs.
47-
Points to the intermediate Permissions CA that signs these documents. -->
48-
<element>
49-
<name>dds.sec.access.permissions_ca</name>
50-
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/ca/TrustedPermissionsCa/certs/TrustedRootCa/TrustedPermissionsCa.crt</value>
51-
</element>
5246
<!-- Identity CA: validates identity certificate chains.
5347
Points to the intermediate Identity CA that signs participant certs. -->
5448
<element>
5549
<name>dds.sec.auth.identity_ca</name>
5650
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/ca/TrustedIdentityCa/certs/TrustedRootCa/TrustedIdentityCa.crt</value>
5751
</element>
58-
<element>
59-
<name>dds.sec.access.governance</name>
60-
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/domain_scope/OperationalDomain/governance/OperationalDomain/signed/TrustedPermissionsCa/OperationalDomain.p7s</value>
61-
</element>
6252
<element>
6353
<name>dds.sec.auth.identity_certificate</name>
6454
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/identity/operating-room/SystemObserver/SystemObserver/certs/TrustedIdentityCa/SystemObserver.chain.pem</value>
@@ -67,10 +57,28 @@ inability to use the software. -->
6757
<name>dds.sec.auth.private_key</name>
6858
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/identity/operating-room/SystemObserver/SystemObserver/private/SystemObserver.key</value>
6959
</element>
60+
61+
<!-- Permissions CA: validates S/MIME signatures on governance and permissions XMLs.
62+
Points to the intermediate Permissions CA that signs these documents. -->
63+
<element>
64+
<name>dds.sec.access.permissions_ca</name>
65+
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/ca/TrustedPermissionsCa/certs/TrustedRootCa/TrustedPermissionsCa.crt</value>
66+
</element>
67+
<element>
68+
<name>dds.sec.access.governance</name>
69+
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/domain_scope/OperationalDomain/governance/OperationalDomain/signed/TrustedPermissionsCa/OperationalDomain.p7s</value>
70+
</element>
7071
<element>
7172
<name>dds.sec.access.permissions</name>
7273
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/domain_scope/OperationalDomain/permissions/SystemObserver/signed/TrustedPermissionsCa/SystemObserver.p7s</value>
7374
</element>
75+
76+
<!-- PSK: used to encrypt RTPS traffic. Points to the pre-shared key file. -->
77+
<element>
78+
<name>dds.sec.crypto.rtps_psk_secret_passphrase</name>
79+
<value>file:$(RTI_SECURITY_ARTIFACTS_DIR)/domain_scope/OperationalDomain/OperationalDomain.psk</value>
80+
</element>
81+
7482
<!-- Read-only observer: it has no publish permissions, so it must not
7583
emit to the distributed secure-log topic. Disable secure logging. -->
7684
<element>

system_arch/security/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ system_arch/security/
5959
│ └── TrustedPermissionsCa/ # Intermediate CA for permissions signing
6060
├── domain_scope/ # Per-domain governance & permissions
6161
│ ├── OperationalDomain/
62+
│ │ ├── OperationalDomain.psk # PSK passphrase seed (generated)
6263
│ │ ├── governance/<name>/<name>.xml # Governance XML (committed)
6364
│ │ │ └── signed/<issuer>/ # Signed governance (.p7s)
6465
│ │ └── permissions/<role>/<role>.xml # Permissions XML (committed)
@@ -84,7 +85,9 @@ system_arch/security/
8485
- **Chain files:** Identity certificates include a `.chain.pem` containing both the leaf cert and its issuing CA cert, as required by the RTI Security Plugins.
8586
- **Signed XML:** Governance and permissions XML files are S/MIME-signed by the appropriate intermediate CA. The signed `.p7s` files are what Connext loads at runtime.
8687
- **Per-participant permissions:** Each participant has its own permissions document specifying the exact topics it may publish/subscribe to, with a default `DENY` rule. For example, the `SystemObserver` participant grants `subscribe` on any topic and no `publish` rule at all — a least-privilege, read-only observer that can watch the full data flow but can never write to the bus.
87-
- **PSK passphrases:** Pre-Shared Key seed files (`.psk`) are generated per domain scope and stored alongside the governance/permissions artifacts (e.g. `domain_scope/TeleopWanDomain/TeleopWanDomain.psk`). The file format is `<id>:<seed>` where `<id>` is an integer in [0, 254]. Participants load the passphrase via the `dds.sec.crypto.rtps_psk_secret_passphrase` property.
88+
- **PSK passphrases:** Pre-Shared Key seed files (`.psk`) are generated per domain scope and stored alongside the governance/permissions artifacts (e.g. `domain_scope/OperationalDomain/OperationalDomain.psk`, `domain_scope/TeleopWanDomain/TeleopWanDomain.psk`). The file format is `<id>:<seed>` where `<id>` is an integer in [0, 254]. Participants load the passphrase via the `dds.sec.crypto.rtps_psk_secret_passphrase` property. Both domains use `rtps_psk_protection_kind=ENCRYPT` in their governance to protect pre-authentication RTPS traffic.
89+
- **Domain-level protection:** Both `OperationalDomain` and `TeleopWanDomain` use the [Builtin Security Plugins for domain-level protection](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/users_manual/p3_advanced/threat_modeling.html#dds-security-threat-protection) pattern: `rtps_protection_kind=ENCRYPT_WITH_ORIGIN_AUTHENTICATION` provides insider integrity and availability protection; `rtps_psk_protection_kind=ENCRYPT` secures pre-authentication traffic.
90+
- **Topic-level protection:** In the `OperationalDomain` (LAN) governance, the `t/Vitals` and `t/MotorControl` topics use `metadata_protection_kind=ENCRYPT` for [topic-level protection](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_secure/users_manual/p3_advanced/threat_modeling.html#dds-security-threat-protection), ensuring only participants with matching permissions can decrypt those topics' submessage metadata — even if authenticated to the domain. The `TeleopWanDomain` (WAN) governance is stricter: a catch-all `*` rule applies `metadata_protection_kind=ENCRYPT` to **every** topic, with the `DDS:Security:LogTopicV2` rule ordered ahead of it so the secure log retains its own `SIGN`/`ENCRYPT` protection.
8891

8992
## Good Practices for DDS Security
9093

system_arch/security/domain_scope/OperationalDomain/governance/OperationalDomain/OperationalDomain.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,27 @@ inability to use the software. -->
2222
<enable_join_access_control>true</enable_join_access_control>
2323
<discovery_protection_kind>NONE</discovery_protection_kind>
2424
<liveliness_protection_kind>NONE</liveliness_protection_kind>
25-
<rtps_protection_kind>ENCRYPT</rtps_protection_kind>
25+
<rtps_protection_kind>ENCRYPT_WITH_ORIGIN_AUTHENTICATION</rtps_protection_kind>
26+
<rtps_psk_protection_kind>ENCRYPT</rtps_psk_protection_kind>
2627
<topic_access_rules>
28+
<topic_rule>
29+
<topic_expression>t/Vitals</topic_expression>
30+
<enable_discovery_protection>false</enable_discovery_protection>
31+
<enable_liveliness_protection>false</enable_liveliness_protection>
32+
<enable_read_access_control>true</enable_read_access_control>
33+
<enable_write_access_control>true</enable_write_access_control>
34+
<metadata_protection_kind>ENCRYPT</metadata_protection_kind>
35+
<data_protection_kind>NONE</data_protection_kind>
36+
</topic_rule>
37+
<topic_rule>
38+
<topic_expression>t/MotorControl</topic_expression>
39+
<enable_discovery_protection>false</enable_discovery_protection>
40+
<enable_liveliness_protection>false</enable_liveliness_protection>
41+
<enable_read_access_control>true</enable_read_access_control>
42+
<enable_write_access_control>true</enable_write_access_control>
43+
<metadata_protection_kind>ENCRYPT</metadata_protection_kind>
44+
<data_protection_kind>NONE</data_protection_kind>
45+
</topic_rule>
2746
<topic_rule>
2847
<topic_expression>*</topic_expression>
2948
<enable_discovery_protection>false</enable_discovery_protection>

0 commit comments

Comments
 (0)