Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Using discoveryAgentUrl will cause all discovered agents to be non secured #193
I am trying to setup Apache ActiveMQ so it has discovery easily out of the box if people enable it.
As the url is blank by default, I am configuring it in a web.xml file as shown
This ensures I can configure the correct path.
Now I disable the discoveryAgentUrl init parameter and let jolokia return a default value, to show that the agent is secured.
As the default discovery renders the wrong path, as that becomes /api and not /api/jolokia. See the screenshot below from a web browser with the json returned
Notice that the json has
Now if I enable the discoveryAgentUrl init-parameter and do this again, the json returned is as shown below. As you can see the
You are right, this is not consistent. In fact, when an URL is tried to be autodetected then the agentUrl is lazily extracted from the first request that comes in. This also can autodetect the security mode (
However, when an URL is provided, no autodetection is tried, even not for the security mode (which is this case sticks undefined). It would be better to allow a config parameter as you suggest and to do autodetection if this parameter is not given (even when the URL is provided).
I'll will implement that for 1.2.4