Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.12.0
-
None
-
None
Description
Policy vhost object member group is type map. But nowhere in the configuration is the specification of what is in the map. In this particular case the map keys are vhost names and the values are objects of type vhostUserGroupSettings.
Policy gets no help from the configuration Entity system in dealing with these maps. That is, policy must implement the defaults with in-line code. The defaults specified in qdrouter.json are unused.
Recent work with policy and qdstat reveals another place where policy is disconnected from the Entity system: qdmanage queries return only a map's configured values and not all configured object's attributes with defaults. One cannot use qdmanage to see what a vhostUserGroupSetting value is used at run-time unless the value was specified in the config file. Since qdstat uses qdmanage then qdstat cannot display those values either.
As an illustration here is a simple config file with simple policy and one vhost:
policy { enableVhostPolicy: True } vhost { hostname: 0.0.0.0 allowUnknownUser: true groups: { "$default": { "users": "*", "remoteHosts": "*", "allowDynamicSource": true, "allowAnonymousSender": true, "sources": "*", "targets": "*"} } }
And here are the results of querying the policy and vhost. Note that the policy and vhost objects include attributes that were not specified in the config. Also note that the vhost group has only the six configured settings and that the remainder of the 21 attributes are absent.
> qdmanage query --type policy [ { "maxConnections": 65535, "maxMessageSize": 0, "enableVhostPolicy": true, "enableVhostNamePatterns": false, "policyDir": "", "defaultVhost": "$default", "connectionsProcessed": 1, "connectionsDenied": 0, "connectionsCurrent": 1, "linksDenied": 0, "maxMessageSizeDenied": 0, "totalDenials": 0, "name": "policy/None", "identity": "policy/None", "type": "org.apache.qpid.dispatch.policy" } ] > qdmanage query --type vhost [ { "hostname": "0.0.0.0", "maxConnections": 65535, "maxConnectionsPerUser": 65535, "maxConnectionsPerHost": 65535, "allowUnknownUser": true, "groups": { "$default": { "users": "*", "remoteHosts": "*", "allowDynamicSource": true, "allowAnonymousSender": true, "sources": "*", "targets": "*" } }, "name": "vhost/0.0.0.0", "identity": "vhost/0.0.0.0", "type": "org.apache.qpid.dispatch.vhost" } ]