Class UserUtil


  • public final class UserUtil
    extends Object
    • Method Detail

      • updateUserWithHashedPwd

        public static void updateUserWithHashedPwd​(User user,
                                                   String pwd)
      • addOrUpdateUser

        public static User addOrUpdateUser​(User user)
      • addOrUpdateBotUser

        public static User addOrUpdateBotUser​(User user)
        This method add auth mechanism in the following way:
        • If original user has already an authMechanism, add it to the user
        • Otherwise:
          • If airflow configuration is 'openmetadata' and server auth provider is not basic, add JWT auth mechanism from Airflow configuration
          • Otherwise:
            • If airflow configuration is 'basic', add JWT auth mechanism with a generated token which does not expire
            • Otherwise, add SSO auth mechanism from Airflow configuration