Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-209

When used incorrect user/role settings in JAAS (GuestLoginModule), python client is unable to close connection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • None
    • None

      Python client is unable to detach & close the connection/channel after message is sent/received when user credentials are not passed.
      It lefts open channel after disposition and keeps receiving empty frames.

      $ /var/dtests/node_data/clients/aac5_sender.py -b 192.168.122.14:5672/jms.queue.test_default_username_right_password_right2  --count 1 --log-msgs dict
      [0x1c3a040]:  -> SASL
      [0x1c3a040]:  <- SASL
      [0x1c3a040]:0 <- @sasl-mechanisms(64) [sasl-server-mechanisms=@PN_SYMBOL[:PLAIN, :ANONYMOUS]]
      [0x1c3a040]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS, initial-response=b"anonymous@localhost.localdomain"]
      [0x1c3a040]:0 <- @sasl-outcome(68) [code=0]
      [0x1c3a040]:  -> AMQP
      [0x1c3a040]:0 -> @open(16) [container-id="f18cbb09-8346-4e24-bc6e-c44f4fd29b2b", hostname="192.168.122.14", channel-max=32767]
      [0x1c3a040]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
      [0x1c3a040]:0 -> @attach(18) [name="f18cbb09-8346-4e24-bc6e-c44f4fd29b2b-jms.queue.test_default_username_right_password_right2", handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=false], target=@target(41) [address="jms.queue.test_default_username_right_password_right2", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
      [0x1c3a040]:  <- AMQP
      [0x1c3a040]:0 <- @open(16) [container-id="", hostname="", max-frame-size=4294967295, channel-max=65535, idle-time-out=30000]
      [0x1c3a040]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1, incoming-window=2147483647, outgoing-window=2147483647, handle-max=65535]
      [0x1c3a040]:0 <- @attach(18) [name="f18cbb09-8346-4e24-bc6e-c44f4fd29b2b-jms.queue.test_default_username_right_password_right2", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [], target=@target(41) [address="jms.queue.test_default_username_right_password_right2"]]
      [0x1c3a040]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, next-outgoing-id=1, outgoing-window=2147483647, handle=0, delivery-count=0, link-credit=200]
      {'address': None, 'annotations': None, 'body': 'None', 'content': 'None', 'content_encoding': 'None', 'content_type': 'text/plain', 'correlation_id': None, 'creation_time': 0.000000, 'delivery_count': 0, 'durable': False, 'expiry_time': 0.000000, 'first_acquirer': False, 'group_id': None, 'group_sequence': 0, 'id': None, 'inferred': False, 'instructions': None, 'priority': 4, 'properties': {}, 'reply_to': None, 'reply_to_group_id': None, 'subject': None, 'ttl': 0.000000, 'user_id': ''}
      [0x1c3a040]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"1", message-format=0, settled=false, more=false] (93) "\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00-\x00\x00\x00\x0d@@@@@@\xa3\x0atext/plain@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x04\x00\x00\x00\x00\x00Sw\xa1\x04None"
      [0x1c3a040]:0 <- @disposition(21) [role=true, first=0, last=0, settled=false, state=@rejected(37) [error=@error(29) [condition=:failed, description="AMQ119032: User: null does not have permission='SEND' on address jms.queue.test_default_username_right_password_right2"]]]
      [0x1c3a040]:0 -> @disposition(21) [role=false, first=0, last=0, settled=true]
      [0x1c3a040]:0 -> (EMPTY FRAME)
      [0x1c3a040]:0 -> (EMPTY FRAME)
      [0x1c3a040]:0 -> (EMPTY FRAME)
      [0x1c3a040]:0 -> (EMPTY FRAME)
      [0x1c3a040]:0 -> (EMPTY FRAME)
      ...
      

      Note: with provided username/password sending works as expected

      $ /var/dtests/node_data/clients/aac5_sender.py -b tckuser:tckuser@192.168.122.14:5672/jms.queue.test_default_username_right_password_right2  --count 1 --log-msgs dict
      [0xe7b010]:  -> SASL
      [0xe7b010]:  <- SASL
      [0xe7b010]:0 <- @sasl-mechanisms(64) [sasl-server-mechanisms=@PN_SYMBOL[:PLAIN, :ANONYMOUS]]
      [0xe7b010]:0 -> @sasl-init(65) [mechanism=:PLAIN, initial-response=b"\x00tckuser\x00tckuser"]
      [0xe7b010]:0 <- @sasl-outcome(68) [code=0]
      [0xe7b010]:  -> AMQP
      [0xe7b010]:0 -> @open(16) [container-id="329bae36-c652-4f0e-b14c-e211849c9102", hostname="192.168.122.14", channel-max=32767]
      [0xe7b010]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
      [0xe7b010]:0 -> @attach(18) [name="329bae36-c652-4f0e-b14c-e211849c9102-jms.queue.test_default_username_right_password_right2", handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=false], target=@target(41) [address="jms.queue.test_default_username_right_password_right2", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
      [0xe7b010]:  <- AMQP
      [0xe7b010]:0 <- @open(16) [container-id="", hostname="", max-frame-size=4294967295, channel-max=65535, idle-time-out=30000]
      [0xe7b010]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1, incoming-window=2147483647, outgoing-window=2147483647, handle-max=65535]
      [0xe7b010]:0 <- @attach(18) [name="329bae36-c652-4f0e-b14c-e211849c9102-jms.queue.test_default_username_right_password_right2", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [], target=@target(41) [address="jms.queue.test_default_username_right_password_right2"]]
      [0xe7b010]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, next-outgoing-id=1, outgoing-window=2147483647, handle=0, delivery-count=0, link-credit=200]
      {'address': None, 'annotations': None, 'body': 'None', 'content': 'None', 'content_encoding': 'None', 'content_type': 'text/plain', 'correlation_id': None, 'creation_time': 0.000000, 'delivery_count': 0, 'durable': False, 'expiry_time': 0.000000, 'first_acquirer': False, 'group_id': None, 'group_sequence': 0, 'id': None, 'inferred': False, 'instructions': None, 'priority': 4, 'properties': {}, 'reply_to': None, 'reply_to_group_id': None, 'subject': None, 'ttl': 0.000000, 'user_id': ''}
      [0xe7b010]:0 -> @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"1", message-format=0, settled=false, more=false] (93) "\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00-\x00\x00\x00\x0d@@@@@@\xa3\x0atext/plain@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x00@R\x00@\x00St\xd1\x00\x00\x00\x04\x00\x00\x00\x00\x00Sw\xa1\x04None"
      [0xe7b010]:0 <- @disposition(21) [role=true, first=0, last=0, settled=true, state=@accepted(36) []]
      [0xe7b010]:0 -> @detach(22) [handle=0, closed=true]
      [0xe7b010]:0 -> @close(24) []
      [0xe7b010]:  -> EOS
      [0xe7b010]:0 <- @detach(22) [handle=0, closed=true]
      [0xe7b010]:0 <- @close(24) []
      [0xe7b010]:  <- EOS
      

      Note: With the first example of GuestLoginModule in documentation, it works as expected in all cases (not/providing username/password)

              rhn-support-jbertram Justin Bertram
              mtoth@redhat.com Michal Toth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: