Charles E. Rolke created DISPATCH-1706:
------------------------------------------

             Summary: Policy vhostUserGroupSettings not handled as a config 
Entity
                 Key: DISPATCH-1706
                 URL: https://issues.apache.org/jira/browse/DISPATCH-1706
             Project: Qpid Dispatch
          Issue Type: Bug
          Components: Management Agent, Policy Engine
    Affects Versions: 1.12.0
            Reporter: Charles E. Rolke


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:
{code:java}
policy {
    enableVhostPolicy: True
}

vhost {
    hostname: 0.0.0.0
    allowUnknownUser: true
    groups: {
        "$default": {
            "users": "*",
            "remoteHosts": "*",
            "allowDynamicSource": true,
            "allowAnonymousSender": true,
            "sources": "*",
            "targets": "*"}
    }
}
 {code}
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.
{code:java}
> 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"
  }
]
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to