Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2639

SecureThriftRpcClient client privileged calls throw IllegalAccessError

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Accessing secure thrift rpc client, throws the following error

      Exception in thread "main" java.lang.IllegalAccessError: tried to access class org.apache.thrift.transport.TSaslTransport from class org.apache.flume.api.SecureThriftRpcClient$UgiSaslClientTransport
      at org.apache.flume.api.SecureThriftRpcClient$UgiSaslClientTransport.access$001(SecureThriftRpcClient.java:82)
      at org.apache.flume.api.SecureThriftRpcClient$UgiSaslClientTransport$1.run(SecureThriftRpcClient.java:101)
      at org.apache.flume.api.SecureThriftRpcClient$UgiSaslClientTransport$1.run(SecureThriftRpcClient.java:98)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
      at org.apache.flume.auth.UGIExecutor.execute(UGIExecutor.java:45)
      at org.apache.flume.auth.KerberosAuthenticator.execute(KerberosAuthenticator.java:63)
      at org.apache.flume.api.SecureThriftRpcClient$UgiSaslClientTransport.open(SecureThriftRpcClient.java:97)
      at org.apache.flume.api.ThriftRpcClient$ClientWrapper.<init>(ThriftRpcClient.java:412)
      at org.apache.flume.api.ThriftRpcClient$ConnectionPoolManager.checkout(ThriftRpcClient.java:469)
      at org.apache.flume.api.ThriftRpcClient.append(ThriftRpcClient.java:133)
      at org.apache.flume.api.TestThriftSecureRpcClient.testKerberos(TestThriftSecureRpcClient.java:57)
      at org.apache.flume.api.TestThriftSecureRpcClient.main(TestThriftSecureRpcClient.java:52)
      [root@jrufus-ktest-1 flume]# vim flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java

      1. FLUME-2639.patch
        1 kB
        Johny Rufus
      2. FLUME-2639-1.patch
        1 kB
        Johny Rufus

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in flume-trunk #720 (See https://builds.apache.org/job/flume-trunk/720/)
        FLUME-2639. SecureThriftRpcClient client privileged calls throw IllegalAccessError (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=49150fe6d4fa11d07a19e3ed106ccb0453a18c84)

        • flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in flume-trunk #720 (See https://builds.apache.org/job/flume-trunk/720/ ) FLUME-2639 . SecureThriftRpcClient client privileged calls throw IllegalAccessError (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=49150fe6d4fa11d07a19e3ed106ccb0453a18c84 ) flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
        Hide
        hudson Hudson added a comment -

        UNSTABLE: Integrated in Flume-trunk-hbase-98 #77 (See https://builds.apache.org/job/Flume-trunk-hbase-98/77/)
        FLUME-2639. SecureThriftRpcClient client privileged calls throw IllegalAccessError (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=49150fe6d4fa11d07a19e3ed106ccb0453a18c84)

        • flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
        Show
        hudson Hudson added a comment - UNSTABLE: Integrated in Flume-trunk-hbase-98 #77 (See https://builds.apache.org/job/Flume-trunk-hbase-98/77/ ) FLUME-2639 . SecureThriftRpcClient client privileged calls throw IllegalAccessError (hshreedharan: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=49150fe6d4fa11d07a19e3ed106ccb0453a18c84 ) flume-ng-auth/src/main/java/org/apache/flume/api/SecureThriftRpcClient.java
        Hide
        hshreedharan Hari Shreedharan added a comment -

        Committed! Thanks Johny!

        Show
        hshreedharan Hari Shreedharan added a comment - Committed! Thanks Johny!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 8ccbb0b4b8767c87d680a5c6e5221f0ec280e88e in flume's branch refs/heads/flume-1.6 from Hari Shreedharan
        [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=8ccbb0b ]

        FLUME-2639. SecureThriftRpcClient client privileged calls throw IllegalAccessError

        (Johny Rufus via Hari)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 8ccbb0b4b8767c87d680a5c6e5221f0ec280e88e in flume's branch refs/heads/flume-1.6 from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=8ccbb0b ] FLUME-2639 . SecureThriftRpcClient client privileged calls throw IllegalAccessError (Johny Rufus via Hari)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 49150fe6d4fa11d07a19e3ed106ccb0453a18c84 in flume's branch refs/heads/trunk from Hari Shreedharan
        [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=49150fe ]

        FLUME-2639. SecureThriftRpcClient client privileged calls throw IllegalAccessError

        (Johny Rufus via Hari)

        Show
        jira-bot ASF subversion and git services added a comment - Commit 49150fe6d4fa11d07a19e3ed106ccb0453a18c84 in flume's branch refs/heads/trunk from Hari Shreedharan [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=49150fe ] FLUME-2639 . SecureThriftRpcClient client privileged calls throw IllegalAccessError (Johny Rufus via Hari)
        Hide
        hshreedharan Hari Shreedharan added a comment -

        +1. Running tests now and committing.

        Show
        hshreedharan Hari Shreedharan added a comment - +1. Running tests now and committing.
        Hide
        hshreedharan Hari Shreedharan added a comment -

        Offline discussion with Johny - this seems to be something done by the privileged calls. Looks like the stack is inspected and then the exception is thrown based on where the call comes from.

        Show
        hshreedharan Hari Shreedharan added a comment - Offline discussion with Johny - this seems to be something done by the privileged calls. Looks like the stack is inspected and then the exception is thrown based on where the call comes from.
        Hide
        jrufus Johny Rufus added a comment -

        Added comments

        Show
        jrufus Johny Rufus added a comment - Added comments
        Hide
        hshreedharan Hari Shreedharan added a comment -

        Is open() protected? Why would this not be caught at compile time? This looks like something specific to the secure access..can you investigate a bit more?

        Show
        hshreedharan Hari Shreedharan added a comment - Is open() protected? Why would this not be caught at compile time? This looks like something specific to the secure access..can you investigate a bit more?
        Hide
        jrufus Johny Rufus added a comment -

        Hari Shreedharan, Accessing base class instance method via UgiSaslClientTransport.super.open() causes IllegarAccessError, so reverting as per the original method using baseOpen()

        Show
        jrufus Johny Rufus added a comment - Hari Shreedharan , Accessing base class instance method via UgiSaslClientTransport.super.open() causes IllegarAccessError, so reverting as per the original method using baseOpen()

          People

          • Assignee:
            jrufus Johny Rufus
            Reporter:
            jrufus Johny Rufus
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development