DISPATCH-311: promote remaining test .json config; fix defaults to match doc defaults
diff --git a/python/qpid_dispatch/management/qdrouter.policyRuleset.settings.txt b/python/qpid_dispatch/management/qdrouter.policyRuleset.settings.txt
index ec8e8a9..2f40fef 100644
--- a/python/qpid_dispatch/management/qdrouter.policyRuleset.settings.txt
+++ b/python/qpid_dispatch/management/qdrouter.policyRuleset.settings.txt
@@ -63,20 +63,21 @@
"maxSessions": {
"type": "integer",
"description": "Maximum number of sessions that may be created on this connection. Zero implies system default. (AMQP Open, channel-max)",
- "default": 10,
+ "default": 2147483647,
"required": false,
"create": true
},
"maxSenders": {
"type": "integer",
"description": "Maximum number of sending links that may be created on this connection. Zero implies system default.",
- "default": 10,
+ "default": 2147483647,
"required": false,
"create": true
},
"maxReceivers": {
"type": "integer",
"description": "Maximum number of receiving links that may be created on this connection. Zero implies system default.",
+ "default": 2147483647,
"required": false,
"create": true
},
diff --git a/python/qpid_dispatch_internal/policy/policy_local.py b/python/qpid_dispatch_internal/policy/policy_local.py
index 571b8d0..d5a9be4 100644
--- a/python/qpid_dispatch_internal/policy/policy_local.py
+++ b/python/qpid_dispatch_internal/policy/policy_local.py
@@ -705,7 +705,7 @@
Test function to load a policy.
@return:
"""
- ruleset_str = '["vhostName": "photoserver", "maxConnections": 50, "maxConnectionsPerUser": 5, "maxConnectionsPerHost": 20, "allowUnknownUser": true,'
+ ruleset_str = '["vhost", {"vhostName": "photoserver", "maxConnections": 50, "maxConnectionsPerUser": 5, "maxConnectionsPerHost": 20, "allowUnknownUser": true,'
ruleset_str += '"groups": {'
ruleset_str += '"anonymous": { "users": "anonymous", "remoteHosts": "*", "maxFrameSize": 111111, "maxMessageSize": 111111, "maxSessionWindow": 111111, "maxSessions": 1, "maxSenders": 11, "maxReceivers": 11, "allowDynamicSource": false, "allowAnonymousSender": false, "sources": "public", "targets": "" },'
ruleset_str += '"users": { "users": "u1, u2", "remoteHosts": "*", "maxFrameSize": 222222, "maxMessageSize": 222222, "maxSessionWindow": 222222, "maxSessions": 2, "maxSenders": 22, "maxReceivers": 22, "allowDynamicSource": false, "allowAnonymousSender": false, "sources": "public, private", "targets": "public" },'
diff --git a/tests/policy-1/management-access.json b/tests/policy-1/management-access.json
index 08803af..b8bbcf1 100644
--- a/tests/policy-1/management-access.json
+++ b/tests/policy-1/management-access.json
@@ -29,15 +29,17 @@
"maxConnectionsPerUser": 5,
"maxConnectionsPerHost": 20,
"allowUnknownUser": true,
- "settings": {
- "default" : {
+ "groups": {
+ "$default" : {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
"maxSessions": 2,
"maxSenders": 22,
"maxReceivers": 22,
- "allowDynamicSource": true,
+ "allowDynamicSource": true,
"allowAnonymousSender": true,
"sources": "$management",
"targets": "$management"
@@ -51,15 +53,17 @@
"maxConnectionsPerUser": 5,
"maxConnectionsPerHost": 20,
"allowUnknownUser": true,
- "settings": {
- "default" : {
+ "groups": {
+ "$default" : {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
"maxSessions": 2,
"maxSenders": 22,
"maxReceivers": 22,
- "allowDynamicSource": true,
+ "allowDynamicSource": true,
"allowAnonymousSender": true,
"sources": "$management",
"targets": "$management"
@@ -73,15 +77,17 @@
"maxConnectionsPerUser": 5,
"maxConnectionsPerHost": 20,
"allowUnknownUser": true,
- "settings": {
- "default" : {
+ "groups": {
+ "$default" : {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
"maxSessions": 2,
"maxSenders": 22,
"maxReceivers": 22,
- "allowDynamicSource": true,
+ "allowDynamicSource": true,
"allowAnonymousSender": true,
"sources": "$management",
"targets": "$management"
diff --git a/tests/policy-1/policy-boardwalk.json b/tests/policy-1/policy-boardwalk.json
index 2b2393b..e29a405 100644
--- a/tests/policy-1/policy-boardwalk.json
+++ b/tests/policy-1/policy-boardwalk.json
@@ -25,24 +25,11 @@
"maxConnections": 10,
"maxConnectionsPerUser": 2,
"maxConnectionsPerHost": 5,
- "userGroups": {
- "anonymous": "anonymous",
- "users": "u1 u2 u3",
- "superuser": "ellen"
- },
- "ingressHostGroups": {
- "Ten18": "10.18.0.0-10.18.255.255",
- "EllensWS": "72.135.2.9",
- "TheLabs": "10.48.0.0-10.48.255.255, 192.168.0.0-192.168.255.255",
- "Localhost": "127.0.0.1, ::1"
- },
- "ingressPolicies": {
- "anonymous": "Ten18, TheLabs",
- "superuser": "Localhost, EllensWS"
- },
"allowUnknownUser": true,
- "settings": {
+ "groups": {
"anonymous": {
+ "users": "anonymous",
+ "remoteHosts": "10.18.0.0-10.18.255.255, 10.48.0.0-10.48.255.255, 192.168.0.0-192.168.255.255",
"maxFrameSize": 111111,
"maxMessageSize": 111111,
"maxSessionWindow": 111111,
@@ -55,6 +42,8 @@
"targets": ""
},
"users": {
+ "users": "u1, u2, u3",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
@@ -67,6 +56,8 @@
"targets": "public"
},
"superuser": {
+ "users": "ellen",
+ "remoteHosts": "127.0.0.1, ::1, 72.135.2.9",
"maxFrameSize": 666666,
"maxMessageSize": 666666,
"maxSessionWindow": 666666,
@@ -78,7 +69,9 @@
"sources": "public, private, management, root",
"targets": "public, private, management, root"
},
- "default": {
+ "$default": {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
diff --git a/tests/policy-1/policy-safari.json b/tests/policy-1/policy-safari.json
index 66a489b..2fa99a1 100644
--- a/tests/policy-1/policy-safari.json
+++ b/tests/policy-1/policy-safari.json
@@ -24,25 +24,11 @@
"maxConnections": 10,
"maxConnectionsPerUser": 2,
"maxConnectionsPerHost": 5,
- "userGroups": {
- "anonymous": "anonymous",
- "clients": "moja mbili",
- "guides": "kata hapa"
- },
- "ingressHostGroups": {
- "basecamp": "72.135.2.9",
- "mobile": "10.48.0.0-10.48.255.255, 192.168.0.0-192.168.255.255",
- "Localhost": "127.0.0.1, ::1",
- "TheWorld": "*"
- },
- "ingressPolicies": {
- "anonymous": "TheWorld",
- "clients": "basecamp",
- "guides": "basecamp, mobile, Localhost"
- },
"allowUnknownUser": true,
- "settings": {
+ "groups": {
"anonymous": {
+ "users": "anonymous",
+ "remoteHosts": "*",
"maxFrameSize": 111111,
"maxMessageSize": 111111,
"maxSessionWindow": 111111,
@@ -55,6 +41,8 @@
"targets": ""
},
"clients": {
+ "users": "moja, mbili",
+ "remoteHosts": "72.135.2.9",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
@@ -67,6 +55,8 @@
"targets": "public"
},
"guides": {
+ "users": "kata, hapa",
+ "remoteHosts": "72.135.2.9, 10.48.0.0-10.48.255.255, 192.168.0.0-192.168.255.255, 127.0.0.1, ::1",
"maxFrameSize": 666666,
"maxMessageSize": 666666,
"maxSessionWindow": 666666,
@@ -78,7 +68,9 @@
"sources": "public, private, management, root",
"targets": "public, private, management, root"
},
- "default": {
+ "$default": {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
diff --git a/tests/policy-3/test-sender-receiver-limits.json b/tests/policy-3/test-sender-receiver-limits.json
index d14652b..f9535cb 100644
--- a/tests/policy-3/test-sender-receiver-limits.json
+++ b/tests/policy-3/test-sender-receiver-limits.json
@@ -7,15 +7,17 @@
"maxConnectionsPerUser": 2,
"maxConnectionsPerHost": 4,
"allowUnknownUser": true,
- "settings": {
- "default" : {
+ "groups": {
+ "$default" : {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
"maxSessions": 2,
"maxSenders": 2,
"maxReceivers": 4,
- "allowDynamicSource": true,
+ "allowDynamicSource": true,
"allowAnonymousSender": true,
"sources": "*",
"targets": "*"
@@ -29,15 +31,17 @@
"maxConnectionsPerUser": 2,
"maxConnectionsPerHost": 4,
"allowUnknownUser": true,
- "settings": {
- "default" : {
+ "groups": {
+ "$default" : {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
"maxSessions": 2,
"maxSenders": 2,
"maxReceivers": 4,
- "allowDynamicSource": true,
+ "allowDynamicSource": true,
"allowAnonymousSender": true,
"sources": "*",
"targets": "*"
@@ -51,15 +55,17 @@
"maxConnectionsPerUser": 2,
"maxConnectionsPerHost": 4,
"allowUnknownUser": true,
- "settings": {
- "default" : {
+ "groups": {
+ "$default" : {
+ "users": "*",
+ "remoteHosts": "*",
"maxFrameSize": 222222,
"maxMessageSize": 222222,
"maxSessionWindow": 222222,
"maxSessions": 2,
"maxSenders": 2,
"maxReceivers": 4,
- "allowDynamicSource": true,
+ "allowDynamicSource": true,
"allowAnonymousSender": true,
"sources": "*",
"targets": "*"