ROS 2 Security (SROS 2) is the integrated security framework for the Robot Operating System 2 that provides authentication, encryption, integrity, and access control for all node-to-node communications. It leverages the underlying Data Distribution Service (DDS) Security specification, implementing it through a suite of command-line utilities and libraries that manage X.509 certificates and security policies. This transforms the default, open ROS 2 graph into a cryptographically secure network where every participant must prove its identity and is only permitted authorized interactions.
Glossary
ROS 2 Security (SROS 2)

What is ROS 2 Security (SROS 2)?
ROS 2 Security, implemented through the SROS 2 utilities, is a comprehensive framework for securing communications within a ROS 2 robotic system.
The framework operates by generating a Public Key Infrastructure (PKI) for the robotic system, where each node possesses a unique identity certificate. Security policies, defined in XML files, specify permissions—dictating which nodes can publish or subscribe to which topics, or call which services. At runtime, the DDS Security plugins enforce these policies, ensuring encrypted Transport Layer Security (TLS) channels and validating all actions against the access control lists. This enables secure multi-robot systems and is critical for deployment in safety-sensitive or adversarial environments.
Core Security Mechanisms
ROS 2 Security, implemented through the SROS 2 utilities, provides a framework for securing ROS 2 communications with authentication, encryption, and access control using DDS Security plugins and X.509 certificates.
Encryption (Confidentiality)
All data transmitted between authenticated ROS 2 nodes is encrypted to ensure confidentiality. This protects sensitive sensor data, control commands, and system state from eavesdropping. SROS 2 leverages the DDS Security: Crypto plugin to perform transparent encryption and decryption of messages on topics and services. Common algorithms like AES-GCM are used, providing both encryption and integrity verification for the payload, securing data in transit across potentially untrusted networks.
Access Control (Permissions)
Fine-grained access control policies govern what actions an authenticated identity is allowed to perform. These policies are defined in XML files and specify permissions such as:
- Publish/Subscribe to specific topics
- Call/Provide specific services
- Read/Write specific parameters
For example, a navigation node may be permitted to subscribe to
/odometrybut not to/camera/image_raw. This principle of least privilege minimizes the impact of a compromised node by restricting its capabilities within the system.
Governance & Permission Documents
Security configuration is defined by two key XML documents. The Governance Document sets high-level security rules for an entire DDS Domain, specifying allowed security plugins and encryption algorithms. The Permissions Document is identity-specific, mapping a node's certificate to its exact set of allowed actions (topics, services). During startup, the DDS Security plugin validates the node's certificate and loads its corresponding permissions, enforcing the defined policy.
SROS 2 Command Line Tools
The sros2 utilities automate the complex process of generating and managing the security artifacts. Key commands include:
sros2 key generate: Creates a Certificate Authority (CA) and private keys.sros2 key create: Issues identity certificates for nodes.sros2 policy generate: Automatically generates permission policies by introspecting a running ROS 2 system. These tools abstract the underlying PKI (Public Key Infrastructure) complexity, making it practical to deploy security in real robotic systems.
Domain Isolation & ROS_DOMAIN_ID
A fundamental, non-cryptographic security mechanism is network segmentation using the ROS_DOMAIN_ID. Nodes with different domain IDs (0-232) operate in completely isolated communication graphs. This simple integer acts as a virtual network partition, preventing accidental or malicious cross-talk between independent robotic systems sharing the same physical network. It is a critical first layer of defense, often used in conjunction with cryptographic security for multi-robot or multi-tenant deployments.
How ROS 2 Security (SROS 2) Works
ROS 2 Security, implemented through the SROS 2 utilities, is a framework for securing ROS 2 communications with authentication, encryption, and access control using DDS Security plugins and X.509 certificates.
ROS 2 Security (SROS 2) is the security framework integrated into the Robot Operating System 2 that provides end-to-end protection for robotic communications. It leverages the underlying Data Distribution Service (DDS) Security specification to enforce authentication, data encryption, and fine-grained access control across the ROS 2 graph. This is achieved by generating and managing X.509 certificates and governance documents that define security policies for nodes, topics, services, and actions.
The SROS 2 command-line utilities (ros2 security) automate the creation of a Public Key Infrastructure (PKI) and the necessary security artifacts. At runtime, the DDS Security plugin within each ROS 2 node enforces the policies, ensuring only authorized nodes can join the secure domain and exchange protected messages. This framework is critical for production deployments where robotic systems must be resilient to eavesdropping, spoofing, and unauthorized command injection, especially in multi-tenant or safety-critical environments.
Security Configuration Levels
A comparison of the three primary security enforcement modes available in ROS 2 Security (SROS 2), detailing the scope of protection and the required configuration complexity for each.
| Security Feature / Attribute | Enforcement: Disabled | Enforcement: Permissive | Enforcement: Strict |
|---|---|---|---|
Authentication (Node Identity) | |||
Encryption (Data in Transit) | |||
Access Control (Permissions) | |||
Cryptographic Material Required | None | X.509 Certificates & Keys | X.509 Certificates, Keys, & Governance/Permissions Files |
Primary Use Case | Development / Debugging | Performance Profiling / Incremental Rollout | Production Deployment |
Communication Overhead | < 1% | 5-15% latency increase | 10-25% latency increase |
Configuration Complexity | None (Default) | Moderate (Identity only) | High (Full policy) |
Protection Against Eavesdropping | |||
Protection Against Spoofing | |||
Protection Against Unauthorized Pub/Sub |
Implementation & Ecosystem
ROS 2 Security, implemented through the SROS 2 utilities, provides a framework for securing ROS 2 communications with authentication, encryption, and access control using DDS Security plugins and X.509 certificates.
DDS Security Integration
ROS 2 Security is built directly on the Data Distribution Service (DDS) Security specification (v1.1). This provides a standardized, middleware-level security model. The SROS 2 tools generate the necessary configuration files and credentials that enable DDS Security plugins (like RTI Connext DDS Secure or eProsima Fast DDS Secure) to enforce:
- Authentication: Verifying the identity of nodes using X.509 certificates.
- Encryption: Securing data in transit with cryptographic algorithms (e.g., AES-GCM).
- Access Control: Governing which nodes can publish/subscribe to specific topics or call services based on permissions files.
Certificate Authority & Identity Management
SROS 2 establishes a Public Key Infrastructure (PKI) for the ROS 2 graph. A central Certificate Authority (CA) is created to sign certificates for all participants. Each ROS 2 node receives a unique identity comprising:
- A private key (kept secure).
- A signed identity certificate (proving its identity).
- A permissions certificate (defining its allowed actions). This model allows for fine-grained identity-based security, where trust is rooted in the CA, and compromised nodes can be revoked by invalidating their certificates.
Governance & Permissions Files
Security policies are defined in two XML documents:
- Governance File: Sets the global security rules for the domain, including the list of enabled security plugins (Authentication, Encryption, Access Control) and their properties (e.g., allowed cipher suites).
- Permissions File: A node-specific rulebook that grants fine-grained access. It uses subject names from certificates to specify exact allowances, such as:
- Publish to
/cmd_vel - Subscribe to
/scan - Call the
/compute_pathservice SROS 2 utilities auto-generate these files from a high-level policy description, simplifying management.
- Publish to
Access Control Models
SROS 2 supports two primary models for defining node permissions:
- Topic-Based Access Control: Permissions are granted based on ROS communication constructs (topics, services, actions). This is the most common model, mapping directly to the ROS graph.
- Partition-Based Access Control: Permissions are granted based on DDS partitions—logical groups within a domain. This offers an alternative, DDS-native grouping mechanism that can be useful for certain architectural patterns. Permissions can specify allow or deny rules, enabling the implementation of least-privilege security principles where nodes only have the minimum access required for their function.
SROS 2 Command-Line Utilities
The sros2 package provides command-line tools to manage the security lifecycle:
sros2 keys create: Generates the root CA and key pairs.sros2 keys generate: Creates identity and permission keys/certificates for a specific node or enclave.sros2 distribution: Securely distributes keys and certificates to remote machines.sros2 policy: Generates governance and permissions XML files from a YAML policy template. These utilities abstract the complexity of the underlying DDS Security configuration, making it operable for robotics engineers without deep PKI expertise.
Enclaves for Process Isolation
An enclave is a security context within a ROS 2 process. A single Linux process can host multiple nodes, each in its own enclave with distinct security credentials. This enables:
- Secure composition: Multiple nodes with different security postures can run in one process, isolated by enclave boundaries.
- Performance: Avoids the overhead of inter-process communication (IPC) for tightly coupled, trusted nodes.
- Resource efficiency: Reduces memory and launch complexity compared to one-process-per-node. Enclaves are a key feature for balancing security granularity with system performance.
Frequently Asked Questions
ROS 2 Security, implemented through the SROS 2 utilities, provides a framework for securing ROS 2 communications with authentication, encryption, and access control using DDS Security plugins and X.509 certificates.
ROS 2 Security (SROS 2) is the framework and set of utilities that implement authentication, encryption, and fine-grained access control for ROS 2 communications by leveraging the underlying Data Distribution Service (DDS) Security specification. It works by generating and managing a Public Key Infrastructure (PKI) of X.509 certificates, which are used to cryptographically verify the identity of nodes (authentication) and encrypt all network traffic (encryption). The SROS 2 tools (ros2 security) automate the creation of these certificates and the generation of security policy files that define which nodes are permitted to publish or subscribe to specific topics or call services, thereby enforcing a zero-trust security model within the ROS 2 graph.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
ROS 2 Security (SROS 2) is built upon a layered architecture of cryptographic standards and middleware plugins. These related concepts define the specific components and mechanisms that enforce authentication, encryption, and access control within a robotic system.
DDS Security
DDS Security is the underlying Object Management Group (OMG) standard that provides the pluggable security framework for ROS 2. It defines the cryptographic protocols and Quality of Service (QoS) policies that SROS 2 configures and manages. Its core plugins handle:
- Authentication: Verifying the identity of nodes using X.509 certificates.
- Cryptography: Encrypting and signing all data in transit.
- Access Control: Enforcing permissions defined in governance and permission files.
- Logging: Generating auditable security event logs. ROS 2 leverages a DDS Security-compliant middleware implementation (e.g., Cyclone DDS, RTI Connext) to activate these protections.
X.509 Certificate
An X.509 certificate is a digital identity credential used in public key infrastructure (PKI) to authenticate participants in a ROS 2 graph. In SROS 2, each node, and often each domain, requires a unique certificate. Key attributes include:
- Subject Name: A unique identifier for the node (e.g.,
/talker_node). - Public Key: Used to verify digital signatures and for key exchange.
- Issuer Signature: A cryptographic signature from a Certificate Authority (CA) that validates the certificate's authenticity.
- Validity Period: A defined timeframe during which the certificate is active.
The SROS 2 utilities (
ros2 security) automate the creation and management of these certificates, forming a chain of trust from a root CA down to individual node certificates.
Governance File
A Governance file is an XML document that defines the high-level security policies for an entire ROS 2 domain. It acts as a rulebook that all participants must follow. Its primary functions are:
- Enabling Security Plugins: Specifies which DDS Security plugins (Authentication, Cryptography, Access Control) are required.
- Domain Rule Set: Defines default rules for topics and services, such as whether communication is allowed, encrypted, or signed.
- Topic Access Rules: Can specify granular permissions for specific topic names or use wildcards (e.g.,
rt/*). The governance file is signed by a domain CA and distributed to all nodes, ensuring a consistent security baseline across the system.
Permissions File
A Permissions file is an XML document that grants specific access rights to a single node or a group of nodes, as identified by their X.509 certificates. It is the node's "keycard" that defines what it is allowed to do. It contains:
- Grants: Sections tied to a specific node's subject name.
- Allow/Deny Rules: Explicit permissions for publishing, subscribing, or making service requests on specific topics and services.
- Validity Period: A timeframe matching the node's certificate validity. Each node loads its own signed permissions file. The Access Control plugin cross-references a node's requests against this file and the domain's governance file to enforce fine-grained access control.
Secure ROS 2 Domain
A Secure ROS 2 Domain is a logical network partition (defined by a ROS_DOMAIN_ID) where all communication is protected by DDS Security policies. It is the operational environment created by deploying SROS 2. Key characteristics include:
- Cryptographic Isolation: Nodes without valid, trusted credentials cannot join or discover the domain.
- End-to-End Protection: Data is encrypted between publisher and subscriber, even if routed through intermediate processes.
- Policy Enforcement: All communication adheres to the rules in the signed governance and permissions files. This contrasts with an unsecured domain, where nodes can freely discover and communicate, which is suitable only for trusted, isolated development networks.
ROS 2 Security Enclave
A Security Enclave is a logical grouping of ROS 2 nodes that share a common set of security artifacts (certificates, keys, permissions). It is a conceptual container for managing trust boundaries within a larger system.
- Purpose: To simplify security administration by applying identical policies to a related set of nodes (e.g., all nodes on a single robot, or all navigation-related nodes).
- Management: Nodes within an enclave typically share a common intermediate CA, making certificate revocation and policy updates more efficient.
- Segmentation: Different enclaves can be established for different subsystems (perception, control, fleet management) to enforce the principle of least privilege and limit the impact of a potential compromise.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us