Class UserUtil

java.lang.Object
org.openmetadata.service.util.UserUtil

public final class UserUtil extends Object
  • Method Details

    • addUsers

      public static void addUsers(AuthProvider authProvider, Set<String> adminUsers, String domain, Boolean isAdmin)
    • updateUserWithHashedPwd

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

      public static User addOrUpdateUser(User user)
    • user

      public static User user(String name, String domain, String updatedBy)
    • 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
    • getRoleForBot

      public static List<EntityReference> getRoleForBot(String botName)
    • getUserOrBot

      public static EntityReference getUserOrBot(String name)