Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import static com.facebook.presto.spi.security.AccessDeniedException.denySelectColumns;
import static com.facebook.presto.spi.security.AccessDeniedException.denyShowColumnsMetadata;
import static com.facebook.presto.spi.security.AccessDeniedException.denyShowCreateTable;
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
import static com.google.common.base.Suppliers.memoizeWithExpiration;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static java.lang.String.format;
Expand All @@ -80,7 +81,8 @@
public class RangerBasedAccessControl
implements ConnectorAccessControl
{
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()
.configure(FAIL_ON_UNKNOWN_PROPERTIES, false);
private static final JsonCodec<Users> USER_INFO_CODEC = jsonCodec(Users.class);
private static final JsonCodec<List<String>> ROLES_INFO_CODEC = listJsonCodec(String.class);

Expand Down Expand Up @@ -133,7 +135,7 @@ private ServicePolicies getHiveServicePolicies(RangerBasedAccessControlConfig co
return OBJECT_MAPPER.readValue(httpClient.execute(request, createStringResponseHandler()).getBody(), ServicePolicies.class);
}
catch (IOException e) {
throw new PrestoException(HIVE_RANGER_SERVER_ERROR, format("Unable to fetch policies from %s hive service end point", config.getRangerHiveServiceName()));
throw new PrestoException(HIVE_RANGER_SERVER_ERROR, format("Unable to fetch policies from %s hive service end point", config.getRangerHiveServiceName()), e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
"impliedGrants": [],
"itemId": 1,
"label": "select",
"name": "select"
"name": "select",
"category": "data"
},
{
"impliedGrants": [],
Expand Down
Loading