7 Replies Latest reply on Nov 20, 2012 3:23 AM by amperdaar

    Security on Addresses

    halfpad

      Hi

       

      I am looking at HornetQ without JMS as a possible messaging solution for a system we are designing.

       

      I am trying to identify possible security problems of using queues.

       

      In my design I have a service behind a firewall with a queue for incoming messages from clients and multiple queues for outgoing messages to clients, one queue for each client. The outgoing queues are connected to the one address (say Address A) defined on the service. Each client must not be able to consume messages intended for another client. For this not to happen by default, I could add a filter to each of the queues, only allowing messages for the client it repressents to pass through.

       

      The problems I have are:

      1) If I create a consumer on a hacker client that consumes messages from Address A, this client will be able to intercept messages that were suppose to go to other clients.

      2) If this hacker client creates a consumer of the address of queue going to the service, it will also be able to intercept those messages.

       

      Are these concerns valid? And if they are, are there any solutions for them?

       

      I also have a third question: I could see from the documentation how to add a filter to a queue using the xml files, but how could I add a filter programitically?

       

      Thanks!

        • 1. Re: Security on Addresses
          ataylor

          The problems I have are:

          1) If I create a consumer on a hacker client that consumes messages from Address A, this client will be able to intercept messages that were suppose to go to other clients.

          2) If this hacker client creates a consumer of the address of queue going to the service, it will also be able to intercept those messages.

          If you configure it correctly then this cant happen, simply assign the roles to each client for the address and permissions for each address

          • 2. Re: Security on Addresses
            halfpad

            Andy Taylor wrote:

             

            If you configure it correctly then this cant happen, simply assign the roles to each client for the address and permissions for each address

             

            Do I need to this in the xml file, or is there a way to do it programatically? I need to do it programatically as the number clients won't be known when HornetQ starts up.

            • 3. Re: Security on Addresses
              ataylor

              you can set it using the management API via addAddressSettings on HornetQServerControl

              • 4. Re: Security on Addresses
                amperdaar

                It doesn't look like Intercept is bound to any roles. Couldn't a hacker client just add a intercept to a server from the client side and bypass any security put in place? 

                • 5. Re: Security on Addresses
                  amperdaar

                  Hi

                   

                  I had a look at addAddressSettings and addSecuritySettings, but HornetQServerControl is an interface and I see in the code that calling super would not help either. This means that I have to add this functionality. Is this assumption correct? If I'm way of course, could you give an example please? Thanks!

                  • 6. Re: Security on Addresses
                    ataylor

                    yes its an interface, used by the management interface, take a look at any of the management examples to see how they work

                    • 7. Re: Security on Addresses
                      amperdaar

                      Hi

                       

                      I ran into another dead end. I run a standalone server and have a custom SecurityManager. How do I manage the roles? It seems that I must add my custom role handling methods in the SecurityManager, but how will this work with addSecuritySettings. Or has this become a custom additional feature..