ChrisSamo632 commented on code in PR #6619:
URL: https://github.com/apache/nifi/pull/6619#discussion_r1015850257


##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service-api/src/main/java/org/apache/nifi/elasticsearch/AuthorizationScheme.java:
##########
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.elasticsearch;
+
+public enum AuthorizationScheme {
+    BASIC("Basic"),
+    API_KEY("API key");

Review Comment:
   I'd probably stick with `BASIC` being the default as that would mean 
`Username`/`Password` remain available by default when adding the Processor to 
the canvas, which matches the current behaviour and therefore is backwards 
compatible.
   
   If the user selects `NONE` then I guess we'd be hiding the existing 
Username/Password and new `API Key` property inputs (via `dependsOn`).
   
   If the user selected `PKI` then it would be great if the `SSLContext 
Controller` become mandatory, but I don't think that's currently possible, so 
in effect this would have the same effect as `NONE` on the available processor 
properties (we don't want to hide `SSL Context` if something other than `PKI` 
is selected here, as `https`/`TLS` might very well still be needed even if it's 
not used for Auth in Elasticsearch). One option might be to use some 
`customerValidation` for this though - if the user has selected `PKI`, they 
**must** also specify an `SSL Context` in their processor configuration.



-- 
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]

Reply via email to