/** * Check if the privileges are acceptable for SQL Standard authorization implementation * @param hivePrivileges * @throws HiveAuthzPluginException */ public static void validatePrivileges(List<HivePrivilege> hivePrivileges) throws HiveAuthzPluginException { for (HivePrivilege hivePrivilege : hivePrivileges) { if (hivePrivilege.getColumns() != null && hivePrivilege.getColumns().size() != 0) { throw new HiveAuthzPluginException( "Privilege with columns are not currently supported with sql standard authorization:" + hivePrivilege); } //try converting to the enum to verify that this is a valid privilege type SQLPrivilegeType.getRequirePrivilege(hivePrivilege.getName()); } }
private List<HivePrivilege> expandAllPrivileges(List<HivePrivilege> hivePrivileges) { Set<HivePrivilege> hivePrivSet = new HashSet<HivePrivilege>(); for (HivePrivilege hivePrivilege : hivePrivileges) { if (hivePrivilege.getName().equals(ALL)) { // expand to all supported privileges for (SQLPrivilegeType privType : SQLPrivilegeType.values()) { hivePrivSet.add(new HivePrivilege(privType.name(), hivePrivilege.getColumns())); } } else { hivePrivSet.add(hivePrivilege); } } return new ArrayList<HivePrivilege>(hivePrivSet); }
/** * Check if the privileges are acceptable for SQL Standard authorization implementation * @param hivePrivileges * @throws HiveAuthzPluginException */ public static void validatePrivileges(List<HivePrivilege> hivePrivileges) throws HiveAuthzPluginException { for (HivePrivilege hivePrivilege : hivePrivileges) { if (hivePrivilege.getColumns() != null && hivePrivilege.getColumns().size() != 0) { throw new HiveAuthzPluginException( "Privilege with columns are not currently supported with sql standard authorization:" + hivePrivilege); } //try converting to the enum to verify that this is a valid privilege type SQLPrivilegeType.getRequirePrivilege(hivePrivilege.getName()); } }
private List<HivePrivilege> expandAllPrivileges(List<HivePrivilege> hivePrivileges) { Set<HivePrivilege> hivePrivSet = new HashSet<HivePrivilege>(); for (HivePrivilege hivePrivilege : hivePrivileges) { if (hivePrivilege.getName().equals(ALL)) { // expand to all supported privileges for (SQLPrivilegeType privType : SQLPrivilegeType.values()) { hivePrivSet.add(new HivePrivilege(privType.name(), hivePrivilege.getColumns())); } } else { hivePrivSet.add(hivePrivilege); } } return new ArrayList<HivePrivilege>(hivePrivSet); }
PrivilegeBag privBag = new PrivilegeBag(); for (HivePrivilege privilege : hivePrivileges) { if (privilege.getColumns() != null && privilege.getColumns().size() > 0) { throw new HiveAuthzPluginException("Privileges on columns not supported currently" + " in sql standard authorization mode");
PrivilegeBag privBag = new PrivilegeBag(); for (HivePrivilege privilege : hivePrivileges) { if (privilege.getColumns() != null && privilege.getColumns().size() > 0) { throw new HiveAuthzPluginException("Privileges on columns not supported currently" + " in sql standard authorization mode");
privObject.getType() == HivePrivilegeObject.HivePrivilegeObjectType.GLOBAL) { for (HivePrivilege priv : privileges) { List<String> columns = priv.getColumns(); if (columns != null && !columns.isEmpty()) { throw new HiveException( List<String> columns = priv.getColumns(); if (columns != null && !columns.isEmpty()) { if (!priv.supportsScope(PrivilegeScope.COLUMN_LEVEL_SCOPE)) {
privObject.getType() == HivePrivilegeObject.HivePrivilegeObjectType.GLOBAL) { for (HivePrivilege priv : privileges) { List<String> columns = priv.getColumns(); if (columns != null && !columns.isEmpty()) { throw new HiveException( List<String> columns = priv.getColumns(); if (columns != null && !columns.isEmpty()) { if (!priv.supportsScope(PrivilegeScope.COLUMN_LEVEL_SCOPE)) {
/** * Check if the privileges are acceptable for SQL Standard authorization implementation * @param hivePrivileges * @throws HiveAuthzPluginException */ public static void validatePrivileges(List<HivePrivilege> hivePrivileges) throws HiveAuthzPluginException { for (HivePrivilege hivePrivilege : hivePrivileges) { if (hivePrivilege.getColumns() != null && hivePrivilege.getColumns().size() != 0) { throw new HiveAuthzPluginException( "Privilege with columns are not currently supported with sql standard authorization:" + hivePrivilege); } //try converting to the enum to verify that this is a valid privilege type SQLPrivilegeType.getRequirePrivilege(hivePrivilege.getName()); } }
private List<HivePrivilege> expandAllPrivileges(List<HivePrivilege> hivePrivileges) { Set<HivePrivilege> hivePrivSet = new HashSet<HivePrivilege>(); for (HivePrivilege hivePrivilege : hivePrivileges) { if (hivePrivilege.getName().equals(ALL)) { // expand to all supported privileges for (SQLPrivilegeType privType : SQLPrivilegeType.values()) { hivePrivSet.add(new HivePrivilege(privType.name(), hivePrivilege.getColumns())); } } else { hivePrivSet.add(hivePrivilege); } } return new ArrayList<HivePrivilege>(hivePrivSet); }
PrivilegeBag privBag = new PrivilegeBag(); for (HivePrivilege privilege : hivePrivileges) { if (privilege.getColumns() != null && privilege.getColumns().size() > 0) { throw new HiveAuthzPluginException("Privileges on columns not supported currently" + " in sql standard authorization mode");
privObject.getType() == HivePrivilegeObject.HivePrivilegeObjectType.GLOBAL) { for (HivePrivilege priv : privileges) { List<String> columns = priv.getColumns(); if (columns != null && !columns.isEmpty()) { throw new HiveException( List<String> columns = priv.getColumns(); if (columns != null && !columns.isEmpty()) { if (!priv.supportsScope(PrivilegeScope.COLUMN_LEVEL_SCOPE)) {