Package org.openmetadata.service.util
Class UserUtil
- java.lang.Object
-
- org.openmetadata.service.util.UserUtil
-
public final class UserUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UseraddOrUpdateBotUser(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 configurationstatic UseraddOrUpdateUser(User user)static voidaddUsers(AuthProvider authProvider, Set<String> adminUsers, String domain, Boolean isAdmin)static List<EntityReference>getRoleForBot(String botName)static voidupdateUserWithHashedPwd(User user, String pwd)static Useruser(String name, String domain, String updatedBy)
-
-
-
Method Detail
-
addUsers
public static void addUsers(AuthProvider authProvider, Set<String> adminUsers, String domain, Boolean isAdmin)
-
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)
-
-