public class SQLAuthorizationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
SQLAuthorizationUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addMissingPrivMsg(Collection<SQLPrivTypeGrant> missingPrivs,
HivePrivilegeObject hivePrivObject,
List<String> deniedMessages) |
static void |
assertNoDeniedPermissions(HivePrincipal hivePrincipal,
HiveOperationType hiveOpType,
List<String> deniedMessages) |
static RequiredPrivileges |
getPrivilegesFromFS(org.apache.hadoop.fs.Path filePath,
HiveConf conf,
String userName)
Map permissions for this uri to SQL Standard privileges
|
static HivePrincipal |
getValidatedPrincipal(HivePrincipal hPrincipal)
Validate the principal type, and convert role name to lower case
|
static List<HivePrincipal> |
getValidatedPrincipals(List<HivePrincipal> hivePrincipals)
Calls getValidatedPrincipal on each principal in list and updates the list
|
static void |
validatePrivileges(List<HivePrivilege> hivePrivileges)
Check if the privileges are acceptable for SQL Standard authorization implementation
|
public static void validatePrivileges(List<HivePrivilege> hivePrivileges) throws HiveAuthzPluginException
hivePrivileges
- HiveAuthzPluginException
public static void addMissingPrivMsg(Collection<SQLPrivTypeGrant> missingPrivs, HivePrivilegeObject hivePrivObject, List<String> deniedMessages)
public static RequiredPrivileges getPrivilegesFromFS(org.apache.hadoop.fs.Path filePath, HiveConf conf, String userName) throws HiveAuthzPluginException
filePath
- conf
- userName
- HiveAuthzPluginException
public static void assertNoDeniedPermissions(HivePrincipal hivePrincipal, HiveOperationType hiveOpType, List<String> deniedMessages) throws HiveAccessControlException
HiveAccessControlException
public static HivePrincipal getValidatedPrincipal(HivePrincipal hPrincipal) throws HiveAuthzPluginException
hPrincipal
- HiveAuthzPluginException
public static List<HivePrincipal> getValidatedPrincipals(List<HivePrincipal> hivePrincipals) throws HiveAuthzPluginException
hivePrincipals
- HiveAuthzPluginException
Copyright © 2017 The Apache Software Foundation. All rights reserved.