Search code examples
apache-camelapache-karafhawtio

Role Based Access Control to Camel Routes within Karaf and HawtIO


We have a requirement to enable Role Base Access Control on Camel routes. Say group 'A' manages a group of Camel routes so only group 'A' can stop/start this group of Camel routes. Monitoring capability can be viewed by support and development groups.

We are going towards Karaf and HawtIO for the container and the UI with Camel. Is the above requirement doable within HawtIO/Karaf/Camel stack? I have seen that we can enable access to HawtIO through JAAS but it seems like once you are in, you are in which is not what we are looking for.

Any help is appreciated.


Solution

  • You cannot do this per Camel route that is too fine grained. The Karaf RBAC allows to configure roles per JMX mbean operation and attributes.

    The call to stop a route is using an operation on the CamelContextMBean and calling stopRoute with the name of the route. So you cannot use RBAC as all users would use the same operation.

    You would need to add some custom code into hawtio to do some kind of validation yourself.

    Besides start/stop of routes based on groups. What other access control on Camel etc are you looking for? We may gather a number of requirements and see if there is something we could add to hawtio / Camel / Karaf etc.