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
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,8 @@ 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: org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException Operation type "
208
+
+ HiveOperationType.CREATEDATABASE + " not allowed for user:" + unAuthorizedUser;
208
209
assertEquals(expected, err);
209
210
}
210
211
}
@@ -221,7 +222,8 @@ public void testB_CreateTable_unAuthorizedUser() throws Exception {
221
222
hmsHandler.create_table(table);
222
223
} catch (Exceptione) {
223
224
Stringerr = e.getMessage();
224
-
Stringexpected = "Operation type " + HiveOperationType.CREATETABLE + " not allowed for user:" + unAuthorizedUser;
225
+
Stringexpected = "Got exception: org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException Operation type "
226
+
+ HiveOperationType.CREATETABLE + " not allowed for user:" + unAuthorizedUser;
225
227
assertEquals(expected, err);
226
228
}
227
229
}
@@ -297,7 +299,8 @@ public void testE_CreateRole__anyUser() throws Exception {
297
299
hmsHandler.create_role(role);
298
300
} catch (Exceptione) {
299
301
Stringerr = e.getMessage();
300
-
Stringexpected = "Operation type " + PreEventContext.PreEventType.AUTHORIZATION_API_CALL.name() + " not allowed for user:" + authorizedUser;
302
+
Stringexpected = "Got exception: org.apache.hadoop.hive.metastore.api.MetaException Operation type "
303
+
+ PreEventContext.PreEventType.AUTHORIZATION_API_CALL.name() + " not allowed for user:" + authorizedUser;
301
304
assertEquals(expected, err);
302
305
}
303
306
}
@@ -313,7 +316,8 @@ public void testF_CreateCatalog_anyUser() throws Exception {
0 commit comments