Interface RBACDecoratorMBean

  • All Known Implementing Classes:
    RBACDecorator

    public interface RBACDecoratorMBean

    MBean that optimizes access to Karaf's RBAC services.

    When doing client-side initialization, hawtio invokes two time-consuming operations:

    • LIST of available MBeans (with metadata consisting in attrs, ops, description
    • EXEC for org.apache.karaf.management.JMXSecurityMBean#canInvoke(java.util.Map)
    This becomes unacceptable when we have hundreds of similar MBeans (like ActiveMQ queues or Camel components/endpoints/processors/routes/consumers/...

    The role of this MBean is to combine LIST+EXEC/RBAC operations into one - and return map that is complete, but optimized (uses shared JSON elements that can be processed by hawtio client app itself).

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void decorate​(Map<String,​Object> map)
      Decorates Map (that can be nicely handled by Jolokia) containing everything that is initially needed by hawtio client application.
      boolean getVerify()
      Returns if it is in verify mode.
      void setVerify​(boolean verify)
      Sets verify mode.
    • Method Detail

      • decorate

        void decorate​(Map<String,​Object> map)
               throws Exception
        Decorates Map (that can be nicely handled by Jolokia) containing everything that is initially needed by hawtio client application. It's an optimized and dedicated method that runs much faster than sequence of relevant Jolokia operations (LIST+EXEC with maxDepth=7).
        Throws:
        Exception
      • getVerify

        boolean getVerify()
        Returns if it is in verify mode. When it runs in verify mode, consistency of RBAC information is checked upon decorate.
        Returns:
        verify mode
      • setVerify

        void setVerify​(boolean verify)
        Sets verify mode.
        Parameters:
        verify - verify mode to set