mattrpav commented on code in PR #2402:
URL: https://github.com/apache/activemq/pull/2402#discussion_r4297757259


##########
assembly/src/release/conf/jetty/jetty-webapp-prometheus.xml:
##########
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" 
"https://www.eclipse.org/jetty/configure_10_0.dtd";>
+
+<!-- Prometheus metrics web application (activemq-prometheus).
+    Mounts the metrics endpoint at /metrics on the web console listener.
+    Add this file to jettyExtraXmlFiles in conf/jetty-spring.properties and 
restart the broker.
+    Access follows the catch-all /* rule in jetty-security.xml (users and 
admins).
+    Add a /metrics/* rule there to restrict it further. -->
+<Configure class="org.eclipse.jetty.server.handler.ContextHandlerCollection" 
id="Contexts">
+
+  <Call name="addHandler">
+    <Arg>
+      <New class="org.eclipse.jetty.ee11.webapp.WebAppContext">
+        <Set name="contextPath">/metrics</Set>
+        <Set name="baseResourceAsString"><Property name="activemq.home" 
default="."/>/webapps/metrics</Set>
+        <Set name="logUrlOnStart">true</Set>
+        <!-- Destination types reported by /metrics?per_object=true.
+            Comma separated list of: queue, topic, temp-queue, temp-topic.
+            Default: queue,topic
+        <Call name="setInitParameter">
+          <Arg>destinationTypes</Arg>
+          <Arg>queue,topic,temp-queue,temp-topic</Arg>

Review Comment:
   What is the most secure default value? We need to ship locked down as much 
as possible to avoid DoS-style attacks with default config



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to