exceptionfactory commented on a change in pull request #4968:
URL: https://github.com/apache/nifi/pull/4968#discussion_r605770267



##########
File path: 
nifi-nar-bundles/nifi-single-user-iaa-providers-bundle/nifi-single-user-iaa-providers/src/main/java/org/apache/nifi/authorization/single/user/SingleUserAuthorizer.java
##########
@@ -0,0 +1,55 @@
+/*
+ * 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.authorization.single.user;
+
+import org.apache.nifi.authorization.AuthorizationRequest;
+import org.apache.nifi.authorization.AuthorizationResult;
+import org.apache.nifi.authorization.Authorizer;
+import org.apache.nifi.authorization.AuthorizerConfigurationContext;
+import org.apache.nifi.authorization.AuthorizerInitializationContext;
+import org.apache.nifi.authorization.exception.AuthorizationAccessException;
+import org.apache.nifi.authorization.exception.AuthorizerCreationException;
+import org.apache.nifi.authorization.exception.AuthorizerDestructionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Single User Authorizer
+ */
+public class SingleUserAuthorizer implements Authorizer {

Review comment:
       Thanks for the feedback @bbende!  I considered some options for 
integration with the the existing file-based providers, but part of the 
challenge is having the generated username available to the file-based 
providers.
   
   One alternative solution is to use a standard default username and set that 
value in the `Initial Admin Identity` property of the file-based provider.  
That would remove the need for the username generation in the 
`SingleUserLoginIdentityProvider`, but it would also set a default username 
across the board.
   
   On the other hand, this question could be addressed in future issues when it 
comes to changing the default configuration files.  With the goal here of 
providing single user access, a user would have to perform additional work to 
authenticate using client certificates, so I'm not sure if authorizing client 
certificate access should be a concern.




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


Reply via email to