@ThreadSafe public final class SecurityUtils extends Object
Modifier and Type | Method and Description |
---|---|
static LoginContext |
createLoginContext(AuthType authType,
Subject subject,
ClassLoader classLoader,
Configuration configuration,
CallbackHandler callbackHandler)
Creates a new
LoginContext with the correct class loader. |
static String |
getGroup(UserState userState,
AlluxioConfiguration conf) |
static String |
getGroupFromGrpcClient(AlluxioConfiguration conf) |
static String |
getOwner(UserState userState) |
static String |
getOwnerFromGrpcClient(AlluxioConfiguration conf) |
static boolean |
isAuthenticationEnabled(AlluxioConfiguration conf)
Checks if authentication is enabled.
|
static boolean |
isAuthorizationEnabled(AlluxioConfiguration conf)
Checks if authorization is enabled.
|
static boolean |
isSecurityEnabled(AlluxioConfiguration conf)
Checks if security is enabled.
|
public static boolean isSecurityEnabled(AlluxioConfiguration conf)
conf
- Alluxio configurationpublic static boolean isAuthenticationEnabled(AlluxioConfiguration conf)
conf
- Alluxio configurationpublic static boolean isAuthorizationEnabled(AlluxioConfiguration conf)
conf
- Alluxio configurationpublic static String getOwnerFromGrpcClient(AlluxioConfiguration conf)
conf
- Alluxio configurationpublic static String getGroupFromGrpcClient(AlluxioConfiguration conf)
conf
- Alluxio configurationpublic static String getOwner(UserState userState)
userState
- the UserStatepublic static String getGroup(UserState userState, AlluxioConfiguration conf)
userState
- the UserStateconf
- the configurationpublic static LoginContext createLoginContext(AuthType authType, Subject subject, ClassLoader classLoader, Configuration configuration, CallbackHandler callbackHandler) throws LoginException
LoginContext
with the correct class loader.authType
- the AuthType
to usesubject
- the Subject
to useclassLoader
- the ClassLoader
to useconfiguration
- the Configuration
to usecallbackHandler
- the CallbackHandler
LoginContext
instanceLoginException
- if LoginContext cannot be createdCopyright © 2023. All Rights Reserved.