blob: b1bda4c02f66286e0b31e9c8f44316fb8c2674b8 [file]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<broker xmlns="http://activemq.apache.org/schema/activemq/apollo" security_factory="org.apache.activemq.apollo.stomp.test.UserOwnershipSecurityFactory">
<authentication domain="StompSecurityTest"/>
<access_rule allow="connect_group" action="connect"/>
<access_rule allow="can_send_create_consume_queue" kind="queue" action="send create consume"/>
<access_rule allow="can_send_create_queue" kind="queue" action="send create"/>
<access_rule allow="can_send_queue" kind="queue" action="send"/>
<access_rule allow="can_receive_queue" kind="queue" action="receive"/>
<access_rule allow="can_consume_queue" kind="queue" action="consume"/>
<access_rule allow="can_send_create_topic" kind="topic" action="send create"/>
<access_rule allow="can_send_topic" kind="topic" action="send"/>
<access_rule allow="can_recieve_topic" kind="topic" action="receive create"/>
<access_rule allow="can_consume_create_ds" kind="dsub" action="consume create"/>
<access_rule allow="can_consume_ds" kind="dsub" action="consume"/>
<access_rule allow="can_recieve_topic" kind="dsub" action="receive create"/>
<access_rule allow="guest" action="connect"/>
<access_rule allow="guest" action="create destroy send receive consume" kind="topic queue dsub" id_regex="test.*"/>
<!-- only allow connects over the tcp2 connector -->
<access_rule allow="connector_restricted" action="connect" connector="tcp2"/>
<virtual_host id="default">
<host_name>localhost</host_name>
</virtual_host>
<connector id="tcp" bind="tcp://0.0.0.0:0">
<stomp>
<add_user_header kind="org.apache.activemq.jaas.UserPrincipal">JMSXUserID</add_user_header>
<add_user_header kind="org.apache.activemq.apollo.broker.security.SourceAddressPrincipal">sender-ip</add_user_header>
</stomp>
</connector>
<connector id="tcp2" bind="tcp://0.0.0.0:0">
</connector>
<connector id="stomp-udp" bind="udp://0.0.0.0:0" protocol="stomp-udp">
<stomp>
<add_user_header kind="org.apache.activemq.apollo.broker.security.SourceAddressPrincipal">sender-ip</add_user_header>
</stomp>
</connector>
</broker>