mattyb149 commented on a change in pull request #4156: NIFI-7273: Add flow 
metrics REST endpoint with for Prometheus scraping
URL: https://github.com/apache/nifi/pull/4156#discussion_r396525995
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-prometheus-bundle/nifi-prometheus-reporting-task/src/main/java/org/apache/nifi/reporting/prometheus/PrometheusRecordSink.java
 ##########
 @@ -62,13 +63,22 @@
     private volatile Map<String, Gauge> gauges;
     private static final CollectorRegistry RECORD_REGISTRY = new 
CollectorRegistry();
 
+    public static final PropertyDescriptor SSL_CONTEXT = new 
PropertyDescriptor.Builder()
+            .name("prometheus-reporting-task-ssl-context")
+            .displayName("SSL Context Service")
+            .description("The SSL Context Service to use in order to secure 
the server. If specified, the server will"
+                    + "accept only HTTPS requests; otherwise, the server will 
accept only HTTP requests")
+            .required(false)
+            .identifiesControllerService(RestrictedSSLContextService.class)
+            .build();
 
 Review comment:
   That's a good point, but this was just moving the existing properties into 
the existing Prometheus components (since we don't have a dependency on things 
like RestrictedSSLContextService in the module I added the REST call, I just 
moved the other common components to a util JAR), changing the default would 
prevent anyone from running over HTTP. I think that's why these properties 
default to false everywhere in NiFi, otherwise you must run a secure instance 
to use the "securable" components.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to