Field guide
ROS 2 Security: Check Enforcement, Identity, and Permissions
A source-based ROS 2 Jazzy acceptance matrix for secure startup, enclave identity, signed permissions, and denied topic access before deployment.
The short answer
Before accepting a secure ROS 2 deployment, require both a working authorized exchange and a deliberately denied exchange. Also require startup to fail when the required security configuration is unavailable. A node starting successfully is not proof that security was enforced, and two nodes failing to communicate is not proof that an access policy worked.
The distinction is concrete in the official ROS 2 Jazzy security tutorial. Its quiz describes a listener that launches in non-secure mode when security is enabled but key files cannot be located and enforcement is absent. When ROS_SECURITY_STRATEGY=Enforce is added with security enabled, that misconfigured listener fails to launch instead.
This guide turns those documented behaviors into a deployment-review worksheet. It covers the Jazzy DDS-Security documentation reviewed October 28, 2026, not every ROS distribution or middleware. We did not execute the ROS examples, conduct a penetration test, or test a physical robot. The matrix below separates documented expectations from observations your team must collect.
Separate identity, permission, and protected communication
The ROS 2 DDS-Security design document distinguishes three mechanisms used by its integration:
- Authentication: verify the identity of a DDS domain participant using certificates and a trusted certificate authority.
- Access control: restrict the operations an authenticated participant can perform, including topic access.
- Cryptography: provide encryption, signature, and related operations for the protected communication.
These mechanisms answer different questions. Recognizing a participant does not mean it should publish actuator commands. Encrypting a message does not mean the command is current or correct. A process reporting a security directory does not establish that every process in the deployment uses the intended identity and policy.
The design document was last modified in July 2020. Use it to understand the architecture, then check the distribution-specific instructions and actual middleware build. Its description is not a current interoperability test report. The Jazzy SROS2 README names tested middleware implementations, but that does not establish that an arbitrary pair of vendors can communicate securely. The Jazzy setup tutorial explicitly says secure communication between vendors is not supported in its documented context.
Freeze the configuration being accepted
Before checking behavior, write a small acceptance manifest. This is our proposed review record, not a ROS-defined compliance document.
| Field | What the reviewer needs |
|---|---|
| Software scope | ROS distribution, installed package versions, RMW implementation, middleware version, and security-plugin build configuration |
| Execution scope | Processes, hosts, launch or service definitions, and the actual environment each process receives |
| Identity | Intended enclave path and certificate identity for each participating context |
| Trust and policy | Trusted certificate authorities, signed governance and permissions artifacts, validity periods, and policy revision |
| Allowed exchange | Exact producer, consumer, topic, operation, and expected application observation |
| Denied exchange | A separate unauthorized operation with an explicit refusal criterion |
| Evidence | Startup status, relevant diagnostics, message observations, configuration identifiers, and reviewer decision |
The setup tutorial notes that support varies by distribution and middleware. It also specifies an additional security build flag for Fast DDS when building from source. Do not infer security-plugin availability from a successful non-secure demo. Record the build you actually intend to ship. Our developer stack guide places this check within the broader dependency and deployment contract.
Enabled is not the same as enforced
The Jazzy setup tutorial uses three environment settings:
export ROS_SECURITY_KEYSTORE=~/sros2_demo/demo_keystore
export ROS_SECURITY_ENABLE=true
export ROS_SECURITY_STRATEGY=Enforce
These are documentation examples for an isolated demo, not a complete production configuration. The tutorial requires the settings in each terminal used by the demo. For a deployed service, our recommendation is to verify the environment received by the actual launched process, rather than assuming an interactive shell represents it.
The design document describes true and Enforce as case-sensitive values. It also describes security as disabled by default and permissive behavior when enforcement is not selected. Do not use the strategy setting as a substitute for enabling security. Review both settings together and preserve their effective values in the acceptance record without copying private keys.
The documented demo starts its talker with a specific enclave:
ros2 run demo_nodes_cpp talker --ros-args --enclave /talker_listener/talker
That path is part of the test configuration, not a label to substitute casually. The design describes ROS_SECURITY_ENCLAVE_OVERRIDE as taking precedence over the command-line enclave selection. Check for an override before concluding which identity a process used. The Jazzy tutorial also uses this variable for secured command-line tools, so a diagnostic terminal can have a different configuration from the application being inspected.
A security acceptance matrix with explicit evidence limits
Use the following matrix only in an isolated software environment, disconnected from physical actuation and production networks. The expected results refer to the reviewed documentation and its demo conditions. They are not observed results from Physical AI Guide. Keep the observed-result column unfilled until your team runs the corresponding case.
| Case | Documented expectation or proposed acceptance criterion | Observation to record |
|---|---|---|
| Correct demo identities and security configuration | The Jazzy setup tutorial describes its talker and listener exchanging messages with authentication and encryption | Process configuration, successful authorized reception, and the method used to inspect traffic protection |
| Listener without security enabled | In the setup quiz, the listener launches but does not receive the secured talker’s messages | Startup result and message reception, keeping the talker’s configuration unchanged |
| Security enabled, key files not located, enforcement absent | In the setup quiz, the listener still launches in non-secure mode and receives no messages from the secured talker | Startup diagnostics and configuration that explain the non-secure fallback |
| Same missing-key configuration with security enabled and Enforce | In the setup quiz, the listener fails to launch rather than falling back | Startup failure and the relevant configuration error |
| Restricted talker, permitted topic | The access-control tutorial describes successful startup after its restricted policy is signed | Exact signed policy revision, enclave, and permitted exchange |
| Restricted talker remapped to a denied topic | The access-control tutorial says the remapped talker cannot launch with Enforce | Refusal diagnostics tied to the denied operation, not merely an empty listener |
| Real deployment launched by its service definition | Proposed additional acceptance check: repeat the relevant positive and negative cases using the deployed launch path | Differences between the interactive demo and the launched service, with unresolved cases marked unknown |
The first four cases come from the setup tutorial. The next two come from the access-control tutorial. The final row is our engineering recommendation, not a published ROS test result.
A secure talker rejecting a misconfigured listener is a useful boundary check. It does not prove that the listener itself refused non-secure startup. Those are separate assertions, which is why the matrix records startup and message reception separately.
Restrict permissions, then prove a denial
The Jazzy access-control tutorial edits permissions.xml and signs it to produce permissions.p7s. Its example permits the intended chatter exchange and supporting operations, with a default denial rule. It then demonstrates a topic remapping that the restricted policy does not permit.
Three details matter when reviewing an application-specific policy:
- The signed artifact matters. Editing the XML is not the complete documented update. The tutorial signs it with the Permissions CA and explicitly notes that signing requires access to that CA’s private key. Assign policy-signing responsibility without distributing that key through an ordinary evidence package.
- ROS topic names and DDS policy names differ. The tutorial uses DDS names such as
rt/chatter. Do not treat an apparent match between a ROS display name and an XML string as proof of correct authorization. - Supporting communication needs review too. The tutorial retains discovery and parameter-related permissions. A minimal-looking policy can break legitimate operation, while a broad wildcard can authorize more than the reviewer intended. Record the allowed operations rather than accepting a policy merely because it parses.
For an acceptance review, select a harmless permitted exchange and a harmless denied exchange. Keep everything else stable. Collect the error or refusal evidence that distinguishes authorization failure from an unrelated startup problem. Do not loosen permissions just to make a failing negative test disappear.
The tutorial’s demonstration remaps chatter to not_chatter. That is a software access-control check, not an instruction to send unauthorized commands to a live robot. An application-specific test should preserve the same bounded purpose without physical side effects.
Diagnose silence before calling it secure
“No messages arrived” is an ambiguous result. Even in the security tutorial, a listener can start but receive nothing because its security setup is incomplete. Separately, incompatible communication settings can prevent a legitimate exchange. Our ROS 2 QoS guide explains that compatibility problem.
Use a controlled sequence:
- Establish the documented authorized exchange under the frozen configuration.
- Change one identity, permission, or startup condition for the selected negative case.
- Observe startup and relevant diagnostics as well as application message reception.
- Restore the baseline and confirm it works again.
- Mark a case unresolved if the evidence cannot distinguish a deliberate refusal from another fault.
Command-line diagnostics need their own configuration. The setup tutorial recommends an enclave override for ros2cli, avoiding the daemon in its secured examples, and allowing time for discovery. An empty diagnostic result from an unconfigured tool is not a reliable inventory of a secured graph.
Hand over evidence without handing over secrets
A useful security handoff should identify what was accepted and what remains unknown. We recommend retaining:
- the configuration manifest and exact software scope;
- the intended identities and reviewed operations;
- identifiers or hashes for the signed policy artifacts, not private signing keys;
- positive and negative case results with timestamps and diagnostics;
- any skipped case and the reason it was not exercised;
- responsibility for issuing, changing, and replacing credentials and policies;
- the review trigger for a middleware, policy, identity, or launch-path change.
Do not paste private-key files into a ticket, public log, or shared test report. Preserve enough evidence to review the decision while keeping credential handling within the team’s security process. Our incident-recording guide covers the adjacent problem of packaging operational traces with clear provenance and access boundaries.
What this acceptance review does not establish
A passing matrix supports a bounded statement: the named software configuration permitted the reviewed operation, refused the selected unauthorized operation, and handled the selected missing-configuration case as recorded.
It does not establish universal resistance to attack, secure cross-vendor interoperability, acceptable real-time performance, or safe physical behavior. An authenticated command can still be stale, addressed to the wrong task, or physically inappropriate. Those need application checks and separate system validation. The robot safety standards guide addresses why a middleware security feature is not a functional-safety certificate.
The release decision should name the identities, allowed operations, denied cases, and observed startup behavior. “Security enabled” alone leaves too much unspecified.
Sources and scope
First-party references reviewed October 28, 2026. The Jazzy branches may change. No new source publication date, executed test result, or security certification is inferred.
- ROS 2 Jazzy: Setting up security, setup, middleware caveats, environment settings, enclave selection, command-line tools, and enabled-versus-enforced quiz results.
- ROS 2 Jazzy: Setting access controls, signed policy updates, DDS topic names, supporting permissions, and denied remapping.
- ROS 2 DDS-Security integration design, written July 2019 and last modified July 2020, authentication, authorization, cryptography, enclave files, override precedence, and permissive versus strict startup.
- SROS2 Jazzy README, project scope and named tested middleware implementations.
The acceptance manifest, combined matrix, evidence fields, diagnostic sequence, and handoff criteria are our editorial synthesis of these sources, not a claim of first-hand validation.
Frequently asked questions
Does ROS_SECURITY_ENABLE=true make ROS 2 fail closed?
Not by itself. In the official Jazzy tutorial, a listener with security enabled but missing key-file configuration can launch in non-secure mode when enforcement is absent. With security enabled and ROS_SECURITY_STRATEGY=Enforce, the same misconfigured listener fails to launch.
Does an authenticated ROS 2 node have permission to use every topic?
Identity and authorization are different checks. The documented DDS-Security integration uses signed governance and participant permissions. The Jazzy access-control tutorial restricts topic access and demonstrates a denied remapping under enforced security.
Does encrypted ROS 2 traffic prove that a robot is safe?
No. A protected communication path does not establish command freshness, correct task intent, safe motion, or functional-safety certification. Evaluate those application and physical-system requirements separately.