jedcunningham commented on code in PR #48036:
URL: https://github.com/apache/airflow/pull/48036#discussion_r2007730819


##########
airflow/cli/commands/local_commands/standalone_command.py:
##########
@@ -179,24 +180,48 @@ def calculate_env(self):
             else:
                 self.print_output("standalone", "Forcing executor to 
LocalExecutor")
                 env["AIRFLOW__CORE__EXECUTOR"] = 
executor_constants.LOCAL_EXECUTOR
+
+        # Make sure we're using SimpleAuthManager
+        simple_auth_manager_classpath = (
+            
"airflow.api_fastapi.auth.managers.simple.simple_auth_manager.SimpleAuthManager"
+        )
+        if conf.get("core", "auth_manager") != simple_auth_manager_classpath:
+            self.print_output("standalone", "Forcing auth manager to 
SimpleAuthManager")
+            env["AIRFLOW__CORE__AUTH_MANAGER"] = simple_auth_manager_classpath
+            os.environ["AIRFLOW__CORE__AUTH_MANAGER"] = 
simple_auth_manager_classpath  # also in this process!
+
         return env
 
+    def find_user_info(self):
+        if conf.get("core", "simple_auth_manager_users") != "admin:admin":

Review Comment:
   We only need to init the auth manager if we need to generate the admin 
password.
   
   If someone has updated the `simple_auth_manager_users` config, they've 
already moved away from a single user named "admin", so providing them more 
guidance here isn't really necessary.
   
   Basically, trying to strike roughly the same behavior of, if you've 
configured stuff yourself already, we let you do your thing. If you are in the 
fresh/default environment, we give you some pointers.



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