diff options
Diffstat (limited to 'qpid/java/systests/etc')
35 files changed, 1614 insertions, 0 deletions
diff --git a/qpid/java/systests/etc/bin/fail.py b/qpid/java/systests/etc/bin/fail.py new file mode 100644 index 0000000000..517f31d075 --- /dev/null +++ b/qpid/java/systests/etc/bin/fail.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +# +# +# 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. + +import os +import re +import datetime + +from optparse import OptionParser + +BASE_CMD = "mvn -Dskip.python.test=true %s test" + +def main(): + parser = OptionParser() + parser.add_option("-t", "--test", dest="test", + action="store", type="string", + help="run specific tests") + parser.add_option("-c", "--continuous", dest="continuous", + action="store_true", default=False, + help="run tests after failures, don't stop") + + + (options, args) = parser.parse_args() + + # determine command to run + if (options.test != None): + cmd = (BASE_CMD % ("-Dtest="+options.test)) + else: + cmd = (BASE_CMD % ("")) + + run_forever = options.continuous + + + failed_runs = [] + iteration = 0 + fail_match = re.compile("BUILD SUCCESSFUL") + done = False + + while (run_forever or not (len(failed_runs) > 0)): + iteration = iteration + 1 + if (run_forever): + extra_text = (", %d failures so far: %s:" % (len(failed_runs), failed_runs)) + else: + extra_text = "" + print ("%s Test run %d%s" % (datetime.datetime.today().isoformat(), iteration, extra_text)) + (child_stdin, child_stdout_and_stderr) = os.popen4(cmd) + output = child_stdout_and_stderr.read() + child_stdin.close() + child_stdout_and_stderr.close() + matches = fail_match.search(output) + if (matches == None): + failed_runs.append(iteration) + output_name = ("test-run-%d.out" % (iteration)) + #write testouput + test_output = file(output_name, "w") + test_output.write(output) + test_output.close() + #tar test-output and surefire reports together + find_stdout = os.popen("find . -type d -name surefire-reports") + surefire_dirs = find_stdout.read().replace('\n', ' ') + find_stdout.close() + tarcmd = ("tar -zcf test-failures-%d.tar.gz %s %s" % (iteration, output_name, surefire_dirs)) + tar_stdout = os.popen(tarcmd) + tar_output = tar_stdout.read() + tar_exitstatus = tar_stdout.close() + print ("Something failed! Check %s" % (output_name)) + if (tar_exitstatus != None): + print ("tar exited abornmally, aborting\n %s" % (tar_output)) + run_forever = False + +if __name__ == "__main__": + main()
\ No newline at end of file diff --git a/qpid/java/systests/etc/bin/testclients.sh b/qpid/java/systests/etc/bin/testclients.sh new file mode 100755 index 0000000000..002f3d98bb --- /dev/null +++ b/qpid/java/systests/etc/bin/testclients.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +# 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. +# +for x in `seq 1 $1`; +do + java -cp qpid-integrationtests-1.0-incubating-M2-SNAPSHOT-all-test-deps.jar -Dlog4j.configuration=file:/home/rupert/qpid/trunk/qpid/java/etc/mylog4j.xml org.apache.qpid.test.framework.distributedtesting.TestClient -n java$x & +done diff --git a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml b/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml new file mode 100644 index 0000000000..39805cbc48 --- /dev/null +++ b/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <work>${QPID_WORK}</work> + <conf>${QPID_HOME}/etc</conf> + <passwordDir>${conf}</passwordDir> + <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory> + <cache-directory>${QPID_WORK}/cache</cache-directory> + <connector> + <transport>nio</transport> + <port>5672</port> + <socketReceiveBuffer>32768</socketReceiveBuffer> + <socketSendBuffer>32768</socketSendBuffer> + </connector> + <management> + <enabled>false</enabled> + <jmxport>8999</jmxport> + </management> + <advanced> + <filterchain enableExecutorPool="true"/> + <enablePooledAllocator>false</enablePooledAllocator> + <enableDirectBuffers>false</enableDirectBuffers> + <framesize>65535</framesize> + <compressBufferOnQueue>false</compressBufferOnQueue> + </advanced> + + <security> + <principal-databases> + <principal-database> + <name>passwordfile</name> + <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> + <attributes> + <attribute> + <name>passwordFile</name> + <value>${passwordDir}/passwd</value> + </attribute> + </attributes> + </principal-database> + </principal-databases> + + <jmx> + <principal-database>passwordfile</principal-database> + </jmx> + </security> + + <virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml</virtualhosts> + + <heartbeat> + <delay>0</delay> + <timeoutFactor>2.0</timeoutFactor> + </heartbeat> + <queue> + <auto_register>true</auto_register> + </queue> +</broker> + + diff --git a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml b/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml new file mode 100644 index 0000000000..e87be87154 --- /dev/null +++ b/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + 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. + +--> + +<configuration> +<work>${QPID_WORK}</work> +<conf>${QPID_HOME}/etc</conf> +<passwordDir>${conf}</passwordDir> +<plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory> +<cache-directory>${QPID_WORK}/cache</cache-directory> +<connector> +<transport>nio</transport> +<port>5672</port> +<socketReceiveBuffer>32768</socketReceiveBuffer> +<socketSendBuffer>32768</socketSendBuffer> +</connector> +<management> +<enabled>false</enabled> +<jmxport>8999</jmxport> +</management> +<advanced> +<filterchain enableExecutorPool="true"/> +<enablePooledAllocator>false</enablePooledAllocator> +<enableDirectBuffers>false</enableDirectBuffers> +<framesize>65535</framesize> +<compressBufferOnQueue>false</compressBufferOnQueue> +</advanced> +<security> +<principal-databases> +<principal-database> +<name>passwordfile</name> +<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> +<attributes> +<attribute> +<name>passwordFile</name> +<value>${passwordDir}/passwd</value> +</attribute> +</attributes> +</principal-database> +</principal-databases> +<jmx> +<principal-database>passwordfile</principal-database> +</jmx> +</security> +<virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml +<default>dev-only</default> +<virtualhost> +<name>dev-only</name> +<dev-only> +<store> +<class>org.apache.qpid.server.store.MemoryMessageStore</class> +<environment-path>${work}/bdbstore/dev-only-store</environment-path> +</store> +<queues> +<exchange>amq.direct</exchange> +<maximumQueueDepth>102400</maximumQueueDepth> +<maximumMessageSize>20480</maximumMessageSize> +<maximumMessageAge>60000</maximumMessageAge> +<queue> +<name>dev-queue</name> +</queue> +</queues> +</dev-only> +</virtualhost> +</virtualhosts> +<heartbeat> +<delay>0</delay> +<timeoutFactor>2.0</timeoutFactor> +</heartbeat> +<queue> +<auto_register>true</auto_register> +</queue> +</configuration> diff --git a/qpid/java/systests/etc/config-systests-acl-settings.xml b/qpid/java/systests/etc/config-systests-acl-settings.xml new file mode 100644 index 0000000000..eebc75f05f --- /dev/null +++ b/qpid/java/systests/etc/config-systests-acl-settings.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-acl.xml</virtualhosts> +</broker> + + diff --git a/qpid/java/systests/etc/config-systests-acl.xml b/qpid/java/systests/etc/config-systests-acl.xml new file mode 100644 index 0000000000..535108235e --- /dev/null +++ b/qpid/java/systests/etc/config-systests-acl.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.config}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/config-systests-acl-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/config-systests-aclv2-settings.xml b/qpid/java/systests/etc/config-systests-aclv2-settings.xml new file mode 100644 index 0000000000..fbf218fdfa --- /dev/null +++ b/qpid/java/systests/etc/config-systests-aclv2-settings.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <security> + <aclv2>${QPID_HOME}/etc/global-default.txt</aclv2> + </security> + + <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-aclv2.xml</virtualhosts> +</broker> + + diff --git a/qpid/java/systests/etc/config-systests-aclv2.xml b/qpid/java/systests/etc/config-systests-aclv2.xml new file mode 100644 index 0000000000..33563e7891 --- /dev/null +++ b/qpid/java/systests/etc/config-systests-aclv2.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.config}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/config-systests-aclv2-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/config-systests-derby-settings.xml b/qpid/java/systests/etc/config-systests-derby-settings.xml new file mode 100644 index 0000000000..3ed3a9e33b --- /dev/null +++ b/qpid/java/systests/etc/config-systests-derby-settings.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-derby.xml</virtualhosts> +</broker> + + diff --git a/qpid/java/systests/etc/config-systests-derby.xml b/qpid/java/systests/etc/config-systests-derby.xml new file mode 100644 index 0000000000..ba27a0c020 --- /dev/null +++ b/qpid/java/systests/etc/config-systests-derby.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.config}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/config-systests-derby-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/config-systests-firewall-2.xml b/qpid/java/systests/etc/config-systests-firewall-2.xml new file mode 100644 index 0000000000..05c3eaff9f --- /dev/null +++ b/qpid/java/systests/etc/config-systests-firewall-2.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <prefix>${QPID_HOME}</prefix> + <work>${QPID_WORK}</work> + <conf>${prefix}/etc</conf> + <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory> + <cache-directory>${QPID_WORK}/cache</cache-directory> + <connector> + <!-- To enable SSL edit the keystorePath and keystorePassword + and set enabled to true. + To disasble Non-SSL port set sslOnly to true --> + <ssl> + <enabled>false</enabled> + <sslOnly>false</sslOnly> + <keystorePath>/path/to/keystore.ks</keystorePath> + <keystorePassword>keystorepass</keystorePassword> + </ssl> + <qpidnio>false</qpidnio> + <protectio> + <enabled>false</enabled> + <readBufferLimitSize>262144</readBufferLimitSize> + <writeBufferLimitSize>262144</writeBufferLimitSize> + </protectio> + <transport>nio</transport> + <port>5672</port> + <sslport>8672</sslport> + <socketReceiveBuffer>32768</socketReceiveBuffer> + <socketSendBuffer>32768</socketSendBuffer> + </connector> + <management> + <enabled>false</enabled> + <jmxport>8999</jmxport> + <ssl> + <enabled>false</enabled> + <!-- Update below path to your keystore location, eg ${conf}/qpid.keystore --> + <keyStorePath>${prefix}/../test-profiles/test_resources/ssl/keystore.jks</keyStorePath> + <keyStorePassword>password</keyStorePassword> + </ssl> + </management> + <advanced> + <filterchain enableExecutorPool="true"/> + <enablePooledAllocator>false</enablePooledAllocator> + <enableDirectBuffers>false</enableDirectBuffers> + <framesize>65535</framesize> + <compressBufferOnQueue>false</compressBufferOnQueue> + <enableJMSXUserID>false</enableJMSXUserID> + <locale>en_US</locale> + </advanced> + + <security> + <principal-databases> + <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed --> + <principal-database> + <name>passwordfile</name> + <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> + <attributes> + <attribute> + <name>passwordFile</name> + <value>${conf}/passwd</value> + </attribute> + </attributes> + </principal-database> + </principal-databases> + + <msg-auth>false</msg-auth> + + <jmx> + <principal-database>passwordfile</principal-database> + </jmx> + + <firewall default-action="deny"/> + </security> + + <virtualhosts>${conf}/virtualhosts-systests-firewall-2.xml</virtualhosts> + + <heartbeat> + <delay>0</delay> + <timeoutFactor>2.0</timeoutFactor> + </heartbeat> + <queue> + <auto_register>true</auto_register> + </queue> + + <status-updates>ON</status-updates> + +</broker> + + diff --git a/qpid/java/systests/etc/config-systests-firewall-3.xml b/qpid/java/systests/etc/config-systests-firewall-3.xml new file mode 100644 index 0000000000..861a3b33a3 --- /dev/null +++ b/qpid/java/systests/etc/config-systests-firewall-3.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <prefix>${QPID_HOME}</prefix> + <work>${QPID_WORK}</work> + <conf>${prefix}/etc</conf> + <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory> + <cache-directory>${QPID_WORK}/cache</cache-directory> + <connector> + <!-- To enable SSL edit the keystorePath and keystorePassword + and set enabled to true. + To disasble Non-SSL port set sslOnly to true --> + <ssl> + <enabled>false</enabled> + <sslOnly>false</sslOnly> + <keystorePath>/path/to/keystore.ks</keystorePath> + <keystorePassword>keystorepass</keystorePassword> + </ssl> + <qpidnio>false</qpidnio> + <protectio> + <enabled>false</enabled> + <readBufferLimitSize>262144</readBufferLimitSize> + <writeBufferLimitSize>262144</writeBufferLimitSize> + </protectio> + <transport>nio</transport> + <port>5672</port> + <sslport>8672</sslport> + <socketReceiveBuffer>32768</socketReceiveBuffer> + <socketSendBuffer>32768</socketSendBuffer> + </connector> + <management> + <enabled>false</enabled> + <jmxport>8999</jmxport> + <ssl> + <enabled>false</enabled> + <!-- Update below path to your keystore location, eg ${conf}/qpid.keystore --> + <keyStorePath>${prefix}/../test-profiles/test_resources/ssl/keystore.jks</keyStorePath> + <keyStorePassword>password</keyStorePassword> + </ssl> + </management> + <advanced> + <filterchain enableExecutorPool="true"/> + <enablePooledAllocator>false</enablePooledAllocator> + <enableDirectBuffers>false</enableDirectBuffers> + <framesize>65535</framesize> + <compressBufferOnQueue>false</compressBufferOnQueue> + <enableJMSXUserID>false</enableJMSXUserID> + <locale>en_US</locale> + </advanced> + + <security> + <principal-databases> + <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed --> + <principal-database> + <name>passwordfile</name> + <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> + <attributes> + <attribute> + <name>passwordFile</name> + <value>${conf}/passwd</value> + </attribute> + </attributes> + </principal-database> + </principal-databases> + + <msg-auth>false</msg-auth> + + <jmx> + <principal-database>passwordfile</principal-database> + </jmx> + + <firewall default-action="deny"> + <rule access="allow" network="127.0.0.1"/> + </firewall> + </security> + + <virtualhosts>${conf}/virtualhosts-systests-firewall-3.xml</virtualhosts> + + <heartbeat> + <delay>0</delay> + <timeoutFactor>2.0</timeoutFactor> + </heartbeat> + <queue> + <auto_register>true</auto_register> + </queue> + + <status-updates>ON</status-updates> + +</broker> + + diff --git a/qpid/java/systests/etc/config-systests-firewall-settings.xml b/qpid/java/systests/etc/config-systests-firewall-settings.xml new file mode 100644 index 0000000000..aa73be0646 --- /dev/null +++ b/qpid/java/systests/etc/config-systests-firewall-settings.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <security> + <firewall> + <rule access="allow" network="127.0.0.1"/> + </firewall> + </security> + + <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests-firewall.xml</virtualhosts> +</broker> diff --git a/qpid/java/systests/etc/config-systests-firewall.xml b/qpid/java/systests/etc/config-systests-firewall.xml new file mode 100644 index 0000000000..c0ce71210f --- /dev/null +++ b/qpid/java/systests/etc/config-systests-firewall.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.config}" optional="true"/> + <xml fileName="${QPID_FIREWALL_CONFIG_SETTINGS}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/config-systests-firewall-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/config-systests-settings.xml b/qpid/java/systests/etc/config-systests-settings.xml new file mode 100644 index 0000000000..751ff133cb --- /dev/null +++ b/qpid/java/systests/etc/config-systests-settings.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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> + <management> + <enabled>false</enabled> + <ssl> + <enabled>false</enabled> + <keyStorePath>${QPID_HOME}/../test-profiles/test_resources/ssl/keystore.jks</keyStorePath> + <keyStorePassword>password</keyStorePassword> + </ssl> + </management> + <virtualhosts>${QPID_HOME}/etc/virtualhosts-systests.xml</virtualhosts> +</broker> diff --git a/qpid/java/systests/etc/config-systests.xml b/qpid/java/systests/etc/config-systests.xml new file mode 100644 index 0000000000..5d7d878e76 --- /dev/null +++ b/qpid/java/systests/etc/config-systests.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.config}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/config-systests-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/config.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/global-default.txt b/qpid/java/systests/etc/global-default.txt new file mode 100644 index 0000000000..01b2c41809 --- /dev/null +++ b/qpid/java/systests/etc/global-default.txt @@ -0,0 +1,31 @@ +# +# 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. +# + +CONFIG expand=true + +# This section grants the admin user access to all management methods +ACL ALLOW admin ALL METHOD + +# This section grants the client user access to all management methods except logging +ACL DENY client ALL METHOD component="LoggingManagement" +ACL ALLOW client ALL METHOD + +# This section grants the server user access to all management methods except configuration +ACL DENY server ALL METHOD component="ConfigurationManagement" +ACL ALLOW server ALL METHOD diff --git a/qpid/java/systests/etc/global-externaladminacl-changeloggerleveldenied.txt b/qpid/java/systests/etc/global-externaladminacl-changeloggerleveldenied.txt new file mode 100644 index 0000000000..a59b3176cb --- /dev/null +++ b/qpid/java/systests/etc/global-externaladminacl-changeloggerleveldenied.txt @@ -0,0 +1,24 @@ +# +# 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. +# + +# This section denies the admin user access to logging +ACL DENY admin UPDATE METHOD component="LoggingManagement" name="setRuntimeRootLoggerLevel" + +# This section grants the admin user access to management methods +ACL ALLOW admin ALL METHOD diff --git a/qpid/java/systests/etc/global-externaladminacl-getallloggerlevelsdenied.txt b/qpid/java/systests/etc/global-externaladminacl-getallloggerlevelsdenied.txt new file mode 100644 index 0000000000..ff024b5ee8 --- /dev/null +++ b/qpid/java/systests/etc/global-externaladminacl-getallloggerlevelsdenied.txt @@ -0,0 +1,25 @@ +# +# 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. +# + +# This section denies the admin user access to logging methods +ACL DENY admin ACCESS METHOD component="LoggingManagement" name="getAvailableLoggerLevels" + +# This section grants the admin user access to all management methods +ACL ALLOW admin ALL METHOD + diff --git a/qpid/java/systests/etc/test-default.txt b/qpid/java/systests/etc/test-default.txt new file mode 100644 index 0000000000..95e733d077 --- /dev/null +++ b/qpid/java/systests/etc/test-default.txt @@ -0,0 +1,73 @@ +# +# 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. +# + +# This section grants virtualhost access rights +ACL ALLOW client ACCESS VIRTUALHOST +ACL ALLOW server ACCESS VIRTUALHOST + +# This section grants publish rights to an exchange + routing key pair + +# Allow clients to publish requests +ACL ALLOW client PUBLISH EXCHANGE name="amq.direct" routingKey="example.RequestQueue" + +# Allow the processor to respond to a client on their Temporary Topic +ACL ALLOW server PUBLISH EXCHANGE name="amq.direct" routingKey="tmp_*" +ACL ALLOW server PUBLISH EXCHANGE name="amq.direct" routingKey="TempQueue*" + +# This section grants users the ability to consume from the broker + +# Allow client to consume from temporary queues +ACL ALLOW client CONSUME QUEUE temporary=true + +# Only allow the server to consume from the Request Queue +ACL ALLOW server CONSUME QUEUE name="example.RequestQueue" + +# Allow client and server to consume from kipper queues +ACL ALLOW client CONSUME QUEUE name="clientid:kipper" +ACL ALLOW server CONSUME QUEUE name="clientid:kipper" + +# This section grants users the ability to create/delete queues and exchanges + +# Allow clients to create and delete temporary and kipper queue on this exchange +ACL ALLOW client CREATE QUEUE temporary=true +ACL ALLOW client DELETE QUEUE temporary=true +ACL ALLOW client CREATE QUEUE durable="true" +ACL ALLOW client DELETE QUEUE durable="true" + +# Allow the server to create the Request Queue and kipper queue +ACL ALLOW server CREATE QUEUE name="example.RequestQueue" +ACL ALLOW server CREATE QUEUE name="clientid:kipper" + +## Allow client and server exchange access for the relevant queues +ACL ALLOW client BIND EXCHANGE name="amq.direct" temporary=true +ACL ALLOW client UNBIND EXCHANGE name="amq.direct" temporary=true +ACL ALLOW client BIND EXCHANGE name="amq.direct" durable=true +ACL ALLOW client UNBIND EXCHANGE name="amq.direct" durable=true +ACL ALLOW server BIND EXCHANGE name="amq.direct" queueName="example.RequestQueue" + +## Allow client and server exchange access for the relevant topics +ACL ALLOW client BIND EXCHANGE name="amq.topic" durable=true routingKey=kipper +ACL ALLOW client UNBIND EXCHANGE name="amq.topic" durable=true routingKey=kipper +ACL ALLOW server BIND EXCHANGE name="amq.topic" durable=true routingKey=kipper + +# Action[operation=BIND,objectType=EXCHANGE,properties={OWNER=client, DURABLE=true, QUEUE_NAME=IllegalQueue, AUTO_DELETE=false, ROUTING_KEY=IllegalQueue, NAME=amq.direct, TEMPORARY=false, EXCLUSIVE=false}] + + +ACL ALLOW client CREATE EXCHANGE +ACL ALLOW server CREATE EXCHANGE diff --git a/qpid/java/systests/etc/test-externalacljmx-deleteexchangefailure.txt b/qpid/java/systests/etc/test-externalacljmx-deleteexchangefailure.txt new file mode 100644 index 0000000000..197fe9dabe --- /dev/null +++ b/qpid/java/systests/etc/test-externalacljmx-deleteexchangefailure.txt @@ -0,0 +1,26 @@ +# +# 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. +# + +# This section grants virtualhost management rights +ACL ALLOW admin ALL METHOD + +# testDeleteExchangeFailure() +ACL ALLOW admin CREATE EXCHANGE name="amq.kipper.delete" +ACL DENY admin DELETE EXCHANGE name="amq.kipper.delete" + diff --git a/qpid/java/systests/etc/test-externalacljmx.txt b/qpid/java/systests/etc/test-externalacljmx.txt new file mode 100644 index 0000000000..f8a94bd44a --- /dev/null +++ b/qpid/java/systests/etc/test-externalacljmx.txt @@ -0,0 +1,35 @@ +# +# 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. +# + +# This section grants management access to the virtualhost +ACL ALLOW admin ALL METHOD +ACL ALLOW client ALL METHOD +ACL ALLOW server ALL METHOD + +# Allow create kipper queue +ACL ALLOW admin CREATE QUEUE name="kipper" owner = client # kipper +ACL ALLOW admin BIND EXCHANGE name="amq.direct" + +# testCreateExchangeSuccess(), testDeleteExchangeSuccess() +ACL ALLOW admin CREATE EXCHANGE name="amq.kipper.success" +ACL ALLOW admin DELETE EXCHANGE name="amq.kipper.success" + +# testCreateExchangeFailure() +ACL DENY admin CREATE EXCHANGE name="amq.kipper.failure" + diff --git a/qpid/java/systests/etc/test-logging.txt b/qpid/java/systests/etc/test-logging.txt new file mode 100644 index 0000000000..76c6e442e0 --- /dev/null +++ b/qpid/java/systests/etc/test-logging.txt @@ -0,0 +1,23 @@ +# +# 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. +# + +ACL ALLOW client CREATE QUEUE name="allow" +ACL ALLOW-LOG client CREATE QUEUE name="allow-log" +ACL DENY client CREATE QUEUE name="deny" +ACL DENY-LOG client CREATE QUEUE name="deny-log" diff --git a/qpid/java/systests/etc/test2-default.txt b/qpid/java/systests/etc/test2-default.txt new file mode 100644 index 0000000000..0855e631d7 --- /dev/null +++ b/qpid/java/systests/etc/test2-default.txt @@ -0,0 +1,21 @@ +# +# 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. +# + +# This section grants all access rights +ACL ALLOW guest ALL ALL
\ No newline at end of file diff --git a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml b/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml new file mode 100644 index 0000000000..1b6845662b --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<virtualhosts> + <default>dev-only</default> + <virtualhost> + <name>dev-only</name> + <dev-only> + <queues> + <exchange>amq.direct</exchange> + <!-- Small defaults for development --> + <maximumQueueDepth>102400</maximumQueueDepth> <!-- 100k --> + <maximumMessageSize>20480</maximumMessageSize> <!-- 20kb --> + <maximumMessageAge>60000</maximumMessageAge> <!-- 1 mins --> + + <queue> + <name>dev-queue</name> + </queue> + </queues> + <store> + <class>org.apache.qpid.server.store.MemoryMessageStore</class> + <environment-path>${QPID_WORK}/bdbstore/dev-only-store</environment-path> + </store> + </dev-only> + </virtualhost> +</virtualhosts> +
\ No newline at end of file diff --git a/qpid/java/systests/etc/virtualhosts-systests-acl-settings.xml b/qpid/java/systests/etc/virtualhosts-systests-acl-settings.xml new file mode 100644 index 0000000000..ffbace569f --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-acl-settings.xml @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<virtualhosts> + <virtualhost> + <name>test</name> + <test> + <queues> + <exchange>amq.direct</exchange> + <!-- 4Mb --> + <maximumQueueDepth>4235264</maximumQueueDepth> + <!-- 2Mb --> + <maximumMessageSize>2117632</maximumMessageSize> + <!-- 10 mins --> + <maximumMessageAge>600000</maximumMessageAge> + </queues> + + + <security> + <access_control_list> + <!-- This section grants pubish rights to an exchange + routing key pair --> + <publish> + <exchanges> + <exchange> + <name>amq.direct</name> + <routing_keys> + <!-- Allow clients to publish requests --> + <routing_key> + <value>example.RequestQueue</value> + <users> + <user>client</user> + </users> + </routing_key> + + <!-- Allow the processor to respond to a client on their Temporary Topic --> + <routing_key> + <value>tmp_*</value> + <users> + <user>server</user> + </users> + </routing_key> + <routing_key> + <value>TempQueue*</value> + <users> + <user>server</user> + </users> + </routing_key> + </routing_keys> + </exchange> + </exchanges> + </publish> + + <!-- This section grants users the ability to consume from the broker --> + <consume> + <queues> + <temporary> + <users> + <user>client</user> + </users> + </temporary> + + <!-- Only allow the server to consume from the Request Queue--> + <queue> + <name>example.RequestQueue</name> + <users> + <user>server</user> + </users> + </queue> + + <!-- Allow client and server to consume from the kipper Queue--> + <queue> + <name>clientid:kipper</name> + <users> + <user>client</user> + <user>server</user> + </users> + </queue> + </queues> + </consume> + + <!-- This section grants users the ability to create queues and exchanges --> + <create> + <queues> + <temporary> + <users> + <user>client</user> + </users> + </temporary> + + <!-- Allow clients to create queue on this exchange--> + <queue> + <exchanges> + <exchange> + <name>amq.direct</name> + <users> + <user>client</user> + <user>server</user> + </users> + </exchange> + <exchange> + <name>amq.topic</name> + <users> + <user>client</user> + <user>server</user> + </users> + </exchange> + </exchanges> + </queue> + + <!-- everyone can create the kipper queue --> + <queue> + <name>clientid:kipper</name> + <users> + <user>client</user> + <user>server</user> + </users> + </queue> + + <!-- Allow the server to create the Request Queue--> + <queue> + <name>example.RequestQueue</name> + <users> + <user>server</user> + </users> + </queue> + </queues> + </create> + + <delete> + <queues> + <!-- only client can delete the kipper queue --> + <queue> + <name>clientid:kipper</name> + <users> + <user>client</user> + </users> + </queue> + </queues> + </delete> + </access_control_list> + </security> + </test> + </virtualhost> + + <virtualhost> + <name>test2</name> + <test2> + <security> + <access_control_list> + <!-- This section grants specific users full permissions to all artifacts in this virtualhost --> + <access> + <users> + <user>guest</user> + </users> + </access> + </access_control_list> + </security> + </test2> + </virtualhost> +</virtualhosts> + + diff --git a/qpid/java/systests/etc/virtualhosts-systests-acl.xml b/qpid/java/systests/etc/virtualhosts-systests-acl.xml new file mode 100644 index 0000000000..4a56c39de0 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-acl.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.virtualhosts}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts-systests-acl-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/virtualhosts-systests-aclv2-settings.xml b/qpid/java/systests/etc/virtualhosts-systests-aclv2-settings.xml new file mode 100644 index 0000000000..db1ad33a39 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-aclv2-settings.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<virtualhosts> + <virtualhost> + <name>test</name> + <test> + <queues> + <exchange>amq.direct</exchange> + <!-- 4Mb --> + <maximumQueueDepth>4235264</maximumQueueDepth> + <!-- 2Mb --> + <maximumMessageSize>2117632</maximumMessageSize> + <!-- 10 mins --> + <maximumMessageAge>600000</maximumMessageAge> + </queues> + + <security> + <aclv2>${QPID_HOME}/etc/test-default.txt</aclv2> + </security> + </test> + </virtualhost> + + <virtualhost> + <name>test2</name> + <test2 /> + </virtualhost> +</virtualhosts> + + diff --git a/qpid/java/systests/etc/virtualhosts-systests-aclv2.xml b/qpid/java/systests/etc/virtualhosts-systests-aclv2.xml new file mode 100644 index 0000000000..eb96577487 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-aclv2.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.virtualhosts}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts-systests-aclv2-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/virtualhosts-systests-derby-settings.xml b/qpid/java/systests/etc/virtualhosts-systests-derby-settings.xml new file mode 100644 index 0000000000..ed5ffbb1fd --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-derby-settings.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<virtualhosts> + <directory>${QPID_HOME}/virtualhosts</directory> + <default>test</default> + + <virtualhost> + <localhost> + <store> + <class>org.apache.qpid.server.store.DerbyMessageStore</class> + <environment-path>${QPID_WORK}/derbyDB/localhost-store</environment-path> + </store> + </localhost> + </virtualhost> + + <virtualhost> + <development> + <store> + <class>org.apache.qpid.server.store.DerbyMessageStore</class> + <environment-path>${QPID_WORK}/derbyDB/development-store</environment-path> + </store> + </development> + </virtualhost> + + <virtualhost> + <test> + <store> + <class>org.apache.qpid.server.store.DerbyMessageStore</class> + <environment-path>${QPID_WORK}/derbyDB/test-store</environment-path> + </store> + </test> + </virtualhost> +</virtualhosts> + + diff --git a/qpid/java/systests/etc/virtualhosts-systests-derby.xml b/qpid/java/systests/etc/virtualhosts-systests-derby.xml new file mode 100644 index 0000000000..171be37416 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-derby.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.virtualhosts}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts-systests-derby-settings.xml"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/virtualhosts-systests-firewall-2.xml b/qpid/java/systests/etc/virtualhosts-systests-firewall-2.xml new file mode 100644 index 0000000000..20908e6eb4 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-firewall-2.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<virtualhosts> + <default>test</default> + + <virtualhost> + <name>test</name> + <test> + <store> + <class>org.apache.qpid.server.store.MemoryMessageStore</class> + </store> + </test> + </virtualhost> + + <virtualhost> + <name>test2</name> + <test2> + <store> + <class>org.apache.qpid.server.store.MemoryMessageStore</class> + </store> + <security> + <firewall default-action="deny"> + <rule access="allow" network="127.0.0.1"/> + </firewall> + </security> + </test2> + </virtualhost> +</virtualhosts>
\ No newline at end of file diff --git a/qpid/java/systests/etc/virtualhosts-systests-firewall-3.xml b/qpid/java/systests/etc/virtualhosts-systests-firewall-3.xml new file mode 100644 index 0000000000..90377f345f --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-firewall-3.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<virtualhosts> + <default>test</default> + + <virtualhost> + <name>test</name> + <test> + <store> + <class>org.apache.qpid.server.store.MemoryMessageStore</class> + </store> + </test> + </virtualhost> + + <virtualhost> + <name>test2</name> + <test2> + <store> + <class>org.apache.qpid.server.store.MemoryMessageStore</class> + </store> + <security> + <firewall default-action="deny"/> + </security> + </test2> + </virtualhost> +</virtualhosts> + + diff --git a/qpid/java/systests/etc/virtualhosts-systests-firewall.xml b/qpid/java/systests/etc/virtualhosts-systests-firewall.xml new file mode 100644 index 0000000000..51ab6739b3 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests-firewall.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.virtualhosts}" optional="true"/> + <xml fileName="${QPID_FIREWALL_VIRTUALHOSTS_SETTINGS}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts.xml"/> + </override> +</configuration> diff --git a/qpid/java/systests/etc/virtualhosts-systests.xml b/qpid/java/systests/etc/virtualhosts-systests.xml new file mode 100644 index 0000000000..71f1cc9889 --- /dev/null +++ b/qpid/java/systests/etc/virtualhosts-systests.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + - + - 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. + - + --> +<configuration> + <system/> + <override> + <xml fileName="${test.virtualhosts}" optional="true"/> + <xml fileName="${QPID_HOME}/etc/virtualhosts.xml"/> + </override> +</configuration> |
