Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/214#discussion_r43455362 --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/impersonation/TestImpersonationQueries.java --- @@ -258,8 +286,35 @@ public void testMultiLevelImpersonationJoinOneSideExceedsMaxUserHops() throws Ex assertNotNull("UserRemoteException is expected", ex); assertThat(ex.getMessage(), - containsString("Cannot issue token for view expansion as issuing the token exceeds the maximum allowed number " + - "of user hops (3) in chained impersonation")); + containsString("Cannot issue token for view expansion as issuing the token exceeds the maximum allowed number " + + "of user hops (3) in chained impersonation")); + } + + @Test + public void sequenceFileChainedImpersonationWithView() throws Exception { + // create a view named "simple_seq_view" on "simple.seq". View is owned by user0:group0 and has permissions 750 + createView(org1Users[0], org1Groups[0], "simple_seq_view", + String.format("SELECT convert_from(t.binary_key, 'UTF8') as k FROM %s.`%s` t", MINIDFS_STORAGE_PLUGIN_NAME, + new Path(getUserHome(org1Users[0]), "simple.seq"))); + try { + updateClient(org1Users[1]); + test("SELECT k FROM %s.%s.%s", MINIDFS_STORAGE_PLUGIN_NAME, "tmp", "simple_seq_view"); + } catch (UserRemoteException e) { + assertNull("This test should pass.", e); + } --- End diff -- Adding more to the chain for testing purposes: ``` createView(org1Users[1], org1Groups[1], "simple_seq_view_2", String.format("SELECT k FROM %s.%s.%s", MINIDFS_STORAGE_PLUGIN_NAME, "tmp", "simple_seq_view")); try { updateClient(org1Users[2]); test("SELECT k FROM %s.%s.%s", MINIDFS_STORAGE_PLUGIN_NAME, "tmp", "simple_seq_view_2"); } catch (UserRemoteException e) { assertNull("This test should pass.", e); } ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---