当前位置: 首页 > news >正文

Fast DDS Security--仿问控制

Fast DDS中提供了两种级别的仿问控制:

1 Domain Governance: 定义域级别的安全策略(全局规则).

2 DomainParticipant Permissions : 定义参与者的具体权限(个体规则)

先说一下Domain Governance,配置文件如下所示:

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="omg_shared_ca_domain_governance.xsd">
    <domain_access_rules>
        <domain_rule>
            <domains>
                <id_range>
                    <min>0</min>
                    <max>230</max>
                </id_range>
            </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>HelloWorldTopic</topic_expression>
                    <enable_discovery_protection>true</enable_discovery_protection>
                    <enable_liveliness_protection>false</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>

里面定义了域级别的配置,下面是详细解释:

再说一下 DomainParticipant Permissions,里面定义了某个Participant所在的domain ID范围,以及Publish和Suscribe的Topic。如体如下所示

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.omg.org/spec/DDS-Security/20170801/omg_shared_ca_permissions.xsd">
    <permissions>
        <grant name="ParticipantPermissions">
            <subject_name>emailAddress=example@eprosima.com, CN=DomainParticipantName, O=eProsima, ST=MA, C=ES</subject_name>
            <validity>
                <not_before>2013-06-01T13:00:00</not_before>
                <not_after>2038-06-01T13:00:00</not_after>
            </validity>
            <allow_rule>
                <domains>
                    <id_range>
                        <min>0</min>
                        <max>230</max>
                    </id_range>
                </domains>
                <publish>
                    <topics>
                        <topic>HelloWorldTopic</topic>
                    </topics>
                </publish>
            </allow_rule>
            <default>DENY</default>
        </grant>

        <!-- Fill the subject name with the information specified in the Participant certificate -->
        <grant name="OtherParticipantPermissions">
            <subject_name> emailAddress=xxx@eprosima.com, CN=xxx, OU=x, O=x, ST=XX, C=XX</subject_name>
            <validity>
                <not_before>2013-06-01T13:00:00</not_before>
                <not_after>2038-06-01T13:00:00</not_after>
            </validity>
            <allow_rule>
                <domains>
                    <id_range>
                        <min>0</min>
                        <max>230</max>
                    </id_range>
                </domains>
                <subscribe>
                    <topics>
                        <topic>HelloWorldTopic</topic>
                    </topics>
                </subscribe>
            </allow_rule>
            <default>DENY</default>
        </grant>
    </permissions>
</dds>

相关文章:

  • 《OpenCV》—— dlib(换脸操作)
  • Figma桌面客户端安装与协作设计入门指南(附官方下载链接)
  • 《React 属性与状态江湖:从验证到表单受控的实战探险》
  • Apache Hudi 性能测试报告
  • MVCC的理解(Multi-Version Concurrency Control,多版本并发控制)
  • 蓝桥杯备考:排队顺序(链表)
  • Spring Boot 整合 Redis
  • Python数据分析之数据可视化
  • 数据结构——堆
  • 使用异或完成两个整数的交换
  • 如何使用 CSS 实现黑色遮罩效果
  • VMware安装Windows server 2016
  • 使用const声明常量】
  • 如何为项目选择合适的EMI滤波器——共模与差模干扰分析
  • 【菜鸟飞】Conda安装部署与vscode的结合使用
  • 第27周JavaSpringboot电商进阶开发 1.企业级用户验证
  • C++手动实现一个线性探测法HashMap
  • 如何使用Opentelemetry+jaeger对Go与Java项目实现分布式链路追踪
  • Filezilla快速搭建与linux虚拟机通讯
  • YOLO结合bytetrack对车辆目标跟踪计数
  • 网文书单|推荐4本网文,可以当作《绍宋》代餐
  • 中国纪检监察刊文:力戒形式主义官僚主义关键是要坚持实事求是
  • 打击网络侵权盗版!四部门联合启动“剑网2025”专项行动
  • 市场监管总局等五部门约谈外卖平台企业
  • 三亚通报救护车省外拉警报器开道旅游:违规违法,责令公司停业整顿
  • 乌方:泽连斯基只接受与普京会谈,拒见其他俄代表