<?xml version="1.0" encoding="UTF-8"?>
<ds:data-stream-collection      xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2"
                                                                        xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
                                                                        xmlns:xlink="http://www.w3.org/1999/xlink"
                                                                        id="scap_data_collection_from_xccdf_rabbitmq.xml"
                                                                        schematron-version="1.2">

        <ds:data-stream id="scap_collection_datastream_from_xccdf_rabbitmq-1.0.xml" scap-version="1.2" use-case="OTHER">
                <ds:checklists>

                        <ds:component-ref id="scap_rabbitmq_cref_xccdf-1.0.xml" xlink:href="#scap_rabbitmq_comp_xccdf-1.0.xml">
                                <cat:catalog>
                                        <cat:uri name="rabbitmq-oval.xml" uri="#scap_rabbitmq_cref_oval.xml"/>
                                </cat:catalog>
                        </ds:component-ref>

                </ds:checklists>

                <ds:checks>
                        <ds:component-ref id="scap_rabbitmq_cref_oval.xml" xlink:href="#scap_rabbitmq_comp_oval.xml"/>
                </ds:checks>

        </ds:data-stream>

        <ds:component id="scap_rabbitmq_comp_oval.xml" timestamp="2017-10-19T23:40:40">

                <oval_definitions       xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5"
                                                                xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"
                                                                xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"
                                                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                                                xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd
                                                                http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd
                                                                http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd">


                        <generator>
                                <oval:product_name>Rabbitmq Hardening</oval:product_name>
                                <oval:schema_version>5.10.1</oval:schema_version>
                                <oval:timestamp>2016-11-18T05:41:16</oval:timestamp>
                        </generator>

                        <definitions>

                                <definition id="oval:rabbit:def:13" version="1" class="vulnerability">
                                        <metadata>
                                                <title>1.3-s: Check that TLS is configured</title>
                                                <description> This definition is used to check that RabbitMQ is handling TLS connections</description>
                                        </metadata>
                                        <criteria operator="AND">
                                                <criterion test_ref="oval:rabbit:tst:13" comment="SSL listenning port is 5671"/>
                                        </criteria>
                                </definition>

                        </definitions>

                        <tests>

                                <ind:textfilecontent54_test id="oval:rabbit:tst:13" comment="Check activation of SSL and listening port is 5671" version="1" check="at least one" check_existence="all_exist">
                                        <ind:object object_ref="oval:rabbit:obj:13"/>
                                </ind:textfilecontent54_test>

                        </tests>

                        <objects>

                                <ind:textfilecontent54_object id="oval:rabbit:obj:13" version="1">
                                        <ind:filepath>/etc/rabbitmq/rabbitmq.conf</ind:filepath>
                                        <ind:pattern operation="pattern match">^toto$</ind:pattern>
                                        <ind:instance datatype="int">1</ind:instance>
                                </ind:textfilecontent54_object>

                        </objects>

                </oval_definitions>

        </ds:component>

        <ds:component id="scap_rabbitmq_comp_xccdf-1.0.xml" timestamp="2018-04-03T23:40:42">

                <Benchmark xmlns="http://checklists.nist.gov/xccdf/1.2" id="xccdf_data_benchmark_RabbitMQ" resolved="1" xml:lang="en-US" style="SCAP_1.2">
        <status date="2018-03-29">draft</status>
        <title xml:lang="en-US">Guide to the Secure Configuration RabbitMQ</title>
        <description xml:lang="en-US">This guide presents a catalog of security-relevant</description>
        <platform idref="cpe:/o:centos:centos:7"/>
        <version>1.0</version>

         <Profile id="xccdf_rabbitmq_profile_standard">
            <title xml:lang="en-US">Standard RabbitMQ Security Profile</title>
            <description xml:lang="en-US">This profile contains rules to ensure standard security baseline   of RabbitMQ 3.7. Regardless of your system's workload all of these checks should pass.</description>
                        </Profile>

                        <Group id="xccdf_data_group_conf_rabbitmq">

                                <Rule id="xccdf_rabbitmq_rule_13" selected="true" severity="medium">
                                        <title>1.3-s: TLS secure communication configuration</title>
                                        <description>Configure RabbitMQ to handle TLS connections, parameter 1/6, the 6 parameters must be configured.</description>
                                        <rationale>Ensure that TLS is configured for secured communications</rationale>
                                        <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5">
                                        <check-content-ref href="rabbitmq-oval.xml" name="oval:rabbit:def:13"/>
                                        </check>
                                </Rule>

                        </Group>

                </Benchmark>

        </ds:component>

</ds:data-stream-collection>