AWS MQ用户写入未经授权的队列

时间:2019-03-01 22:54:31

标签: python amazon-web-services authentication activemq stomp

我有一个用于测试环境的AWS MQ的单节点代理实例。这是我的授权图:

<authorizationPlugin>
      <map>
        <authorizationMap>
          <authorizationEntries>
            <authorizationEntry admin="admins" queue="&gt;" read="admins" write="admins"/>
            <authorizationEntry admin="admins" queue="client.*" read="admins,client" write="admins"/>
          </authorizationEntries>
          <!-->tempDestinationAuthorizationEntry>
            <tempDestinationAuthorizationEntry admin="tempDestinationAdmins" read="tempDestinationAdmins" write="tempDestinationAdmins"/>
          </tempDestinationAuthorizationEntry>
          -->
        </authorizationMap>
      </map>
    </authorizationPlugin>

现在,我有一个属于客户端组的用户和一个使用属于client组的用户凭据的python发布者。我使用AWSMQ Broker Console创建了该用户。我的理解是,属于组client的用户不应该写任何以client.*开头的队列。这是python片段:

destination = "/queue/client.test"

conn = stomp.Connection(host_and_ports = [(host, port)])
conn.set_ssl(for_hosts=[(host, port)], ssl_version=ssl.PROTOCOL_TLS)
conn.start()
conn.connect(user, password, wait=True)

total = 100
random_message = "Hello world from py"

a = datetime.datetime.now()
for i in range(0, total):
  conn.send(destination, random_message, persistent='true')

b = datetime.datetime.now()

任何有关此事的建议都会很有帮助。

0 个答案:

没有答案