You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/HiveMetaStoreAuthorizer.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ public final void onEvent(PreEventContext preEventContext)
Copy file name to clipboardExpand all lines: ql/src/test/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/TestHiveMetaStoreAuthorizer.java
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,9 @@ public void testA_CreateDatabase_unAuthorizedUser() throws Exception {
204
204
hmsHandler.create_database(db);
205
205
} catch (Exceptione) {
206
206
Stringerr = e.getMessage();
207
-
Stringexpected = "Operation type " + HiveOperationType.CREATEDATABASE + " not allowed for user:" + unAuthorizedUser;
207
+
Stringexpected = "Got exception: "
208
+
+ "org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException Operation type "
209
+
+ HiveOperationType.CREATEDATABASE + " not allowed for user:" + unAuthorizedUser;
208
210
assertEquals(expected, err);
209
211
}
210
212
}
@@ -221,7 +223,9 @@ public void testB_CreateTable_unAuthorizedUser() throws Exception {
221
223
hmsHandler.create_table(table);
222
224
} catch (Exceptione) {
223
225
Stringerr = e.getMessage();
224
-
Stringexpected = "Operation type " + HiveOperationType.CREATETABLE + " not allowed for user:" + unAuthorizedUser;
226
+
Stringexpected = "Got exception: "
227
+
+ "org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException Operation type "
228
+
+ HiveOperationType.CREATETABLE + " not allowed for user:" + unAuthorizedUser;
225
229
assertEquals(expected, err);
226
230
}
227
231
}
@@ -297,7 +301,8 @@ public void testE_CreateRole__anyUser() throws Exception {
297
301
hmsHandler.create_role(role);
298
302
} catch (Exceptione) {
299
303
Stringerr = e.getMessage();
300
-
Stringexpected = "Operation type " + PreEventContext.PreEventType.AUTHORIZATION_API_CALL.name() + " not allowed for user:" + authorizedUser;
304
+
Stringexpected = "Got exception: org.apache.hadoop.hive.metastore.api.MetaException Operation type "
305
+
+ PreEventContext.PreEventType.AUTHORIZATION_API_CALL.name() + " not allowed for user:" + authorizedUser;
301
306
assertEquals(expected, err);
302
307
}
303
308
}
@@ -313,7 +318,8 @@ public void testF_CreateCatalog_anyUser() throws Exception {
0 commit comments